This guide walks you through setting up and running the FastAPI NotesApp on your local machine.
Create a new directory on your local machine where the project will reside.
Open your newly created directory in VS Code or PyCharm.
Open the terminal and run the following command to clone the project:
git clone <repo_url> .(Ensure to replace <repo_url> with the actual repository URL.)
python -m venv venv # Create virtual environment
source venv/bin/activate # Activate virtual environment (Linux/Mac)
venv\Scripts\activate # Activate virtual environment (Windows)Run the following commands to install the necessary dependencies:
pip install "fastapi[standard]"
pip install jinja2
pip install -r requirements.txt-
Create a
configdirectory inside the project root (if it doesn’t already exist):mkdir config
-
Create a new file inside the
configdirectory nameddb.py. -
Open
db.pyand paste the following content:from pymongo import MongoClient MONGO_URI = "your_mongo_uri" conn = MongoClient(MONGO_URI)
(Replace your_mongo_uri with your actual MongoDB connection string.)
-
Login to MongoDB Atlas via the web application.
-
Create a new free cluster and wait for the setup to complete.

-
Dont forget to add current IP address in network access section.
-
Connect to the cluster:
-
Connect via MongoDB Compass:
-
Update
db.pyfile which you've created in step 6:- Replace
YOUR_MONGO_URIwith the copied connection string from MongoDB Compass.
- Replace
Start the FastAPI server using the following command:
fastapi dev index.pyOnce the server is running, your app should be accessible and look something like this:
Now you're ready to start using the FastAPI NotesApp! 🚀




