Backend & APIs / Todos-List
Todos List Application
AI-first task management platform that parses natural language into structured, multi-step workflows via LLaMA models with InferenceAPI on Hugging Face.
Open the full technical write-up
A full-stack todo list application with user authentication, built with React frontend and Flask backend.
What the project includes
- User registration and login with JWT authentication
- Create, read, update, and delete todos
- Mark todos as complete/incomplete
- Dark mode toggle
- Responsive design with Bootstrap
- Database storage (SQLite)
- RESTful API backend
How files are organized
Todos-List/
├── src/ # React frontend
│ ├── MyComponents/ # React components
│ ├── services/ # API service layer
│ └── App.js # Main application component
├── backend/ # Flask backend
│ ├── app.py # Main Flask application
│ ├── requirements.txt # Python dependencies
│ └── README.md # Backend documentation
└── README.md # This file
Quick Start
Prerequisites
- Node.js (v14 or higher)
- Python (v3.7 or higher)
- npm or yarn
Backend Setup
- Navigate to the backend directory:
cd backend
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install Python dependencies:
pip install -r requirements.txt
- Start the Flask server:
python app.py
The backend will run on http://localhost:5000
Frontend Setup
- In a new terminal, navigate to the project root:
cd Todos-List
- Install Node.js dependencies:
npm install
- Start the React development server:
npm start
The frontend will run on http://localhost:3000
Usage
- Open your browser and go to
http://localhost:3000 - Register a new account or login with existing credentials
- Start creating and managing your todos!
API Endpoints
Authentication
POST /api/auth/register- Register a new userPOST /api/auth/login- Login user
Todos (requires authentication)
GET /api/todos- Get all todos for the authenticated userPOST /api/todos- Create a new todoPUT /api/todos/- Update a todoDELETE /api/todos/- Delete a todoPATCH /api/todos//toggle- Toggle todo completion status
Technologies Used
Frontend
- React 17
- React Router DOM
- Bootstrap 5
- React Icons
Backend
- Flask
- Flask-SQLAlchemy
- Flask-JWT-Extended
- Flask-Bcrypt
- Flask-CORS
- SQLite
Development
Running in Development Mode
Both frontend and backend support hot reloading in development mode.
Database
The application uses SQLite database (todos.db) which is automatically created when you first run the backend.
Environment Variables
For production, consider setting up environment variables for:
SECRET_KEYJWT_SECRET_KEYDATABASE_URL
Security Notes
- Change the secret keys in production
- Use environment variables for sensitive configuration
- Consider using a more reliable database like PostgreSQL for production
- Implement proper CORS policies for production deployment