Skip to content

Commit e9e69bf

Browse files
authoredOct 6, 2023
Update README.md
Added the required documentation for the project!
1 parent 1dbe137 commit e9e69bf

File tree

1 file changed

+30
-30
lines changed
  • FLASK PROJECTS/Url Shortening App in Flask

1 file changed

+30
-30
lines changed
 

‎FLASK PROJECTS/Url Shortening App in Flask/README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,42 @@
22
![Star Badge](https://img.shields.io/static/v1?label=%F0%9F%8C%9F&message=If%20Useful&style=style=flat&color=BC4E99)
33
![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)
44

5-
# Firebase Authentication for Flask Application
5+
# URL Shortening Application in Flask
66

77
## 🛠️ Description
8-
This project enables developers to implement secure user authentication features in their Flask applications with ease using Firebase Authentication which offers various authentication methods, including email/password, social media login (such as Google, Facebook, Twitter), and more. It handles the entire authentication process, including user registration, login, and password reset, taking care of security best practices like password hashing and token-based authentication.
8+
This project is about developing a url shortening application in **Flask** and **MongoDB**. User will paste their long URLs in this application and will get a shortened url, which will redirect to the same long url once used in a browser.
99

1010
## ⚙️ Languages or Frameworks Used
11-
- Flask, Firebase
11+
- Flask, MongoDB
1212
- HTML, CSS, Bootstrap
1313

1414

1515
## 🌟 How to run
1616
- ### Install all the requirements
1717
Run `pip install -r requirements.txt` to install all the requirements.
18-
- ### Firebase Setup for Project
19-
20-
- Create a [firebase](https://firebase.google.com/) project, set up a web project and get all the `Project Configurations` from `Project Settings`.
21-
22-
- Navigate to the **Authentication** section in your firebase project and enable the `Email and Password`
23-
authentication.
18+
- ### MongoDB Setup for Project
19+
20+
- Download monogdb from the [official website](https://www.mongodb.com/try/download/community) and setup in your local system for testing.
21+
- Once it is setup locally, try creating documents and collections in mongodb to familiarize yourself with it.
22+
- You can also download the `MongoDB Compass`, which is the GUI version of Mongo Shell.
23+
- Once all the local testing is done, you can create a free cloud version of MongoDB in [MongoDB Atlas](https://www.mongodb.com/cloud/atlas/register) and get the following credentials from the dashboard of atlas:
24+
```bash
25+
export MONGO_URI=YOUR_MONGO_URI
26+
export MONGO_USERNAME=YOUR_MONGO_USERNAME
27+
export MONGO_PASSWORD=YOUR_MONGO_PASSWORD
28+
```
29+
2430

25-
- The `Project Configurations` will look as follows :-
26-
```bash
27-
"apiKey": YOUR_API_KEY ,
28-
"authDomain": YOUR_AUTH_DOMAIN,
29-
"databaseURL": YOUR_DATABASEURL,
30-
"projectId": YOUR_PROJECT_ID,
31-
"storageBucket": YOUR_STORAGE_BUCKET,
32-
"messagingSenderId": YOUR_MESSAGING_SENDER_ID,
33-
"appId": YOUR_APP_ID,
34-
"measurementId": YOUR_MEASUREMENT_ID
35-
```
3631
- ### Setup Environment for the project
3732
- Now create a `.env` file in your project dreictory and include the following parameters as it is :-
3833
```bash
39-
export FIREBASE_APIKEY=YOUR_API_KEY
40-
export FIREBASE_AUTHDOMAIN=YOUR_AUTH_DOMAIN
41-
export FIREBASE_DATABASEURL=YOUR_DATABASEURL
42-
export FIREBASE_PROJECT_ID=YOUR_PROJECT_ID
43-
export FIREBASE_STORAGE_BUCKET=YOUR_STORAGE_BUCKET
44-
export FIREBASE_MESSAGING_SENDER_ID=YOUR_MESSAGING_SENDER_ID
45-
export FIREBASE_APP_ID=YOUR_APP_ID
46-
export FIREBASE_MEASUREMENT_ID=YOUR_MEASUREMENT_ID
34+
export ENVIRONMENT=local | production (choose on the basis of local or production environment)
35+
export APP_SECRET=YOUR_APP_SECRET
36+
export APP_URL=YOUR_APP_URL (the short url)
37+
export MONGO_URI=YOUR_MONGO_URI
38+
export MONGO_USERNAME=YOUR_MONGO_USERNAME
39+
export MONGO_PASSWORD=YOUR_MONGO_PASSWORD
40+
export DB_NAME=YOUR_DATABASE_NAME
4741
```
4842

4943
- ### Now Just, Run the project
@@ -52,8 +46,14 @@ export FIREBASE_MEASUREMENT_ID=YOUR_MEASUREMENT_ID
5246

5347

5448
## 📺 Demo
55-
![image](https://github.com/MBSA-INFINITY/MBSA-Forms/assets/85332648/2200ef81-57de-4619-ba33-4bed2cf31780)
56-
![image](https://github.com/MBSA-INFINITY/MBSA-Forms/assets/85332648/ad83c91d-e140-4f4b-9b30-81b4903f1011)
49+
- Main screen of the application.
50+
![image](https://github.com/MBSA-INFINITY/Python-project-Scripts/assets/85332648/94825306-1803-4e48-95d1-4f65bd94fcc1)
51+
- Paste you long URL in the input.
52+
![image](https://github.com/MBSA-INFINITY/Python-project-Scripts/assets/85332648/a5dd5bf5-b311-4d72-b84f-ebf197e30009)
53+
- Click on Shorten and copy the `short url` to clipboard
54+
![image](https://github.com/MBSA-INFINITY/Python-project-Scripts/assets/85332648/4eeb3d39-ddfe-48b0-9c2c-23ffe01036cd)
55+
56+
5757

5858
## 🤖 Author
5959

0 commit comments

Comments
 (0)
Please sign in to comment.