Here is an updated and comprehensive README.md
file for your Flask-based To-Do application with authentication and MongoDB:
A simple and robust To-Do application built using Flask, MongoDB, and JWT-based authentication. This application allows users to manage their tasks securely while maintaining user data integrity and privacy.
- User Authentication:
- Secure user registration and login using JWT (JSON Web Tokens).
- Passwords stored securely with bcrypt hashing.
- Task Management:
- Add, edit, delete, and mark tasks as complete.
- Tasks are personalized for each user.
- Database Integration:
- All data is stored in MongoDB, ensuring scalability and performance.
- RESTful Endpoints:
- Well-structured API routes for user authentication and task operations.
- Dynamic UI:
- A clean, responsive, and user-friendly interface to manage tasks.
- Screenshots Included:
- Visual representation of the application for quick insights.
- Backend: Flask
- Database: MongoDB (via PyMongo)
- Authentication: JWT and bcrypt
- Frontend: HTML, CSS, JavaScript
|-- app/
| |-- templates/ # HTML files
| |-- static/ # CSS, JavaScript, and Images
| |-- routes.py # API routes
| |-- models.py # Data models and MongoDB schema
| |-- __init__.py # Flask app initialization
|-- config.py # Configuration file for Flask and database
|-- requirements.txt # Python dependencies
|-- README.md # Project documentation
-
Clone the repository
git clone https://github.com/kaushal892004/ToDo_MongoDB.git cd flask-todo-app
-
Set up a virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up MongoDB
- Ensure MongoDB is installed and running on your system.
- Update the connection string in
config.py
.
-
Run the application
flask run
-
Access the app
Open your browser and go to http://127.0.0.1:5000.
Method | Endpoint | Description | Authentication |
---|---|---|---|
POST | /signup |
User registration | ❌ |
POST | /login |
User login | ❌ |
GET | /tasks |
Retrieve all tasks | ✅ |
POST | /tasks |
Add a new task | ✅ |
PUT | /tasks/<id> |
Update a specific task | ✅ |
DELETE | /tasks/<id> |
Delete a specific task | ✅ |
- Python 3.9+
- MongoDB 4.0+
- Flask 2.0+
- PyMongo, Flask-JWT-Extended, bcrypt
- Add categories and priorities for tasks.
- Implement task reminders via email.
- Enhance UI/UX with modern frameworks like React or Vue.js.
- Add real-time updates using WebSockets.
Feel free to fork this repository, make changes, and submit a pull request. Contributions are always welcome!
Let me know if you need help with further customizations!