mihirh19 / todo_web_app

FastAPI and MongoDB were used to create a backend web application that offers RESTful APIs for managing user tasks. With a simple and clear API interface, the programme enables users to create, retrieve, update, and delete to-do lists. FastAPI, a cutting-edge and quick Python web framework, powers the backend.

Home Page:https://todo-api-xgzn.onrender.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome to Todoist_FastAPI ๐Ÿ‘‹

Version Documentation Twitter: mihirh21

Todoist is a full stack todo application built with FARM stack. FastAPI and MongoDB on the backend and ReactJS on the frontend.

๐Ÿ  Homepage

How to run Locally?

Backend

To run the backend, you need to have local mongodb instance running on you can setup a deployed instance using MongoDB Atlas.

Setting up python environment

Run the following to create a virtual environment for the project. (Assuming you have python installed on local machine)

python -m virtualenv env
# OR
python -m venv env
#OR
python -m venv --system-site-packages env
#OR
python3 -m venv env
# if still doesn't work, google is your best friend!

If you're running the deployed instance, make sure to change the database connection string in .env file on the backend.

Setting up .env file

To setup .env file on the backend, create a file named .env in /backend/app. Add the following in the .env file.

JWT_SECRET_KEY=<RAMDOM_STRING>
JWT_REFRESH_SECRET_KEY=<RANDOM_SECTURE_LONG_STRING>
MONGO_CONNECTION_STRING=<MONGO_DB_CONNECTION_STRING>
# mongodb://localhost:27017/ <-- for local running instances

Installing dependencies

Assuming you are in the base directory.

cd backend
pip install -r requirements.txt

Activating virtual environment

# Windows
env/Scripts/activate
# MacOs + Linux
source env/bin/activate

Running the backend

Assuming you are in the backend directory.

uvicorn backend.app:app --reload

Author

๐Ÿ‘ค Mihir Hadavani

Show your support

Give a โญ๏ธ if this project helped you!

About

FastAPI and MongoDB were used to create a backend web application that offers RESTful APIs for managing user tasks. With a simple and clear API interface, the programme enables users to create, retrieve, update, and delete to-do lists. FastAPI, a cutting-edge and quick Python web framework, powers the backend.

https://todo-api-xgzn.onrender.com

License:MIT License


Languages

Language:Python 99.1%Language:Dockerfile 0.9%