A modern task management application built with Flask (Python backend) and Streamlit (Python frontend).
- User registration and login
- JWT-based authentication
- Password hashing with bcrypt
- Secure token management
- Create, read, update, and delete tasks
- Task priority levels (Low, Medium, High)
- Task statuses (Todo, In Progress, Done)
- Due date tracking
- Task descriptions
- Filter tasks by status
- Clean, intuitive Streamlit interface
- Real-time task updates
- User-friendly forms
- Status filtering
- Responsive layout
- Flask 2.3.3 - Web framework
- Flask-SQLAlchemy 3.0.5 - ORM
- Flask-JWT-Extended 4.5.2 - JWT authentication
- Flask-CORS 4.0.0 - Cross-origin support
- bcrypt 4.0.1 - Password hashing
- SQLite3 - Database
- Python 3.9+
- Streamlit 1.28.1 - Web UI framework
- Requests 2.31.0 - HTTP client
- Python 3.9+
Task Manager App/
βββ backend/ # Flask Backend
β βββ app.py # Flask application entry point
β βββ models.py # SQLAlchemy models
β βββ auth.py # Authentication routes
β βββ tasks.py # Task CRUD routes
β βββ config.py # Configuration
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment template
β
βββ frontend/ # Streamlit Frontend
β βββ app.py # Streamlit application
β βββ api_client.py # API client wrapper
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment template
β
βββ Documentation files
- Python 3.9 or higher
- pip (Python package manager)
-
Navigate to backend directory
cd backend -
Create and activate virtual environment
# Windows python -m venv venv venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Create .env file
cp .env.example .env
-
Start the backend
python app.py
The server will run on
http://localhost:5000
-
Navigate to frontend directory
cd frontend -
Create and activate virtual environment
# Windows python -m venv venv venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Create .env file
cp .env.example .env
-
Start the frontend
streamlit run app.py
The application will open at
http://localhost:8501
POST /api/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "password123"
}
Response:
{
"success": true,
"message": "User registered successfully",
"token": "jwt_token_here",
"user": {
"id": "user_id",
"name": "John Doe",
"email": "john@example.com"
}
}
POST /api/auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "password123"
}
Response:
{
"success": true,
"message": "Login successful",
"token": "jwt_token_here",
"user": {
"id": "user_id",
"name": "John Doe",
"email": "john@example.com"
}
}
GET /api/auth/me
Authorization: Bearer jwt_token_here
Response:
{
"success": true,
"user": {
"_id": "user_id",
"name": "John Doe",
"email": "john@example.com",
"createdAt": "2024-01-01T00:00:00.000Z"
}
}
GET /api/tasks?priority=High&stage=Todo&search=meeting
Authorization: Bearer jwt_token_here
Response:
{
"success": true,
"count": 5,
"tasks": [
{
"_id": "task_id",
"title": "Task Title",
"description": "Task Description",
"priority": "High",
"dueDate": "2024-12-31",
"stage": "Todo",
"userId": "user_id",
"createdAt": "2024-01-01T00:00:00.000Z"
}
]
}
GET /api/tasks/:id
Authorization: Bearer jwt_token_here
Response:
{
"success": true,
"task": {
"_id": "task_id",
"title": "Task Title",
"description": "Task Description",
"priority": "High",
"dueDate": "2024-12-31",
"stage": "Todo",
"userId": "user_id"
}
}
POST /api/tasks
Authorization: Bearer jwt_token_here
Content-Type: application/json
{
"title": "New Task",
"description": "Task description",
"priority": "Medium",
"dueDate": "2024-12-31",
"stage": "Todo"
}
Response:
{
"success": true,
"message": "Task created successfully",
"task": {
"_id": "task_id",
"title": "New Task",
"description": "Task description",
"priority": "Medium",
"dueDate": "2024-12-31",
"stage": "Todo",
"userId": "user_id",
"createdAt": "2024-01-01T00:00:00.000Z"
}
}
PUT /api/tasks/:id
Authorization: Bearer jwt_token_here
Content-Type: application/json
{
"title": "Updated Task",
"description": "Updated description",
"priority": "High",
"stage": "In Progress"
}
Response:
{
"success": true,
"message": "Task updated successfully",
"task": { ... }
}
DELETE /api/tasks/:id
Authorization: Bearer jwt_token_here
Response:
{
"success": true,
"message": "Task deleted successfully"
}
PORT=5000
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/task-manager
JWT_SECRET=your_jwt_secret_key_here_make_it_long_and_random
NODE_ENV=development
FRONTEND_URL=http://localhost:5173
VITE_API_URL=http://localhost:5000
-
Create Render account at https://render.com
-
Create new Web Service and connect your GitHub repository
-
Configure build settings:
- Build Command:
npm install - Start Command:
npm start
- Build Command:
-
Add environment variables in Render dashboard:
MONGODB_URIJWT_SECRETNODE_ENV=productionFRONTEND_URL=your-vercel-frontend-url
-
Deploy - Render will automatically deploy on push to main branch
-
Install Vercel CLI
npm install -g vercel
-
From client directory, deploy
vercel
-
Configure Vercel settings:
- Framework: Vite
- Build Command:
npm run build - Output Directory:
dist
-
Add environment variables:
VITE_API_URL=https://your-render-backend-url
-
Deploy - Push to GitHub and Vercel will auto-deploy
- Create MongoDB Atlas account at https://www.mongodb.com/cloud/atlas
- Create a cluster (Free tier available)
- Create a database user with username and password
- Get connection string and add to backend
.env:MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/task-manager
- JWT over Session: JWT is stateless, scalable, and works well with deployed applications on different servers
- httpOnly Cookies Alternative: For even better security, consider storing JWT in httpOnly cookies instead of localStorage
- Context API: Used for global auth and task state. Sufficient for this application size
- Alternative: Redux for larger applications with more complex state
- MongoDB: NoSQL database provides flexibility for task schema evolution
- Mongoose ODM: Provides schema validation and built-in hooks for password hashing
- RESTful: Standard REST conventions for intuitive API
- Query Parameters: Support for filtering and searching directly in endpoints
- User Authentication: Each task belongs to a specific user (userId required)
- JWT Secret: Long, random secret key is used (should be 32+ characters)
- CORS: Frontend and backend run on different origins during development
- Date Format: ISO 8601 format for dates
- Validation: Client-side validation complemented by server-side validation
- Token Expiration: JWT tokens expire after 30 days
{
_id: ObjectId,
name: String (required),
email: String (required, unique),
password: String (hashed, required),
createdAt: Date
}{
_id: ObjectId,
title: String (required),
description: String,
priority: String (Low, Medium, High),
dueDate: Date,
stage: String (Todo, In Progress, Done),
userId: ObjectId (reference to User),
createdAt: Date,
updatedAt: Date
}- Registration: User creates account β password hashed with bcrypt β JWT token generated
- Login: User enters credentials β password verified β JWT token returned β stored in localStorage
- Dashboard Access: Token sent in Authorization header β middleware verifies token β user redirected to dashboard
- Task Management:
- User creates task β sent to API with userId β stored in database
- User edits task β verifies ownership β updates record
- User deletes task β verifies ownership β removes record
- Filters applied on client-side for better UX
- 400: Bad Request (validation errors)
- 401: Unauthorized (invalid token)
- 403: Forbidden (not task owner)
- 404: Not Found (task/user doesn't exist)
- 500: Server Error
- Toast notifications for errors
- User-friendly error messages
- Automatic logout on 401 responses
- Form validation before submission
-
Register a new account
- Navigate to /register
- Fill in name, email, password
- Click Register
-
Login
- Use registered credentials
- Click Login
-
Create a task
- Click "Add New Task"
- Fill task details
- Click "Create Task"
-
Manage tasks
- Edit: Click edit icon on task card
- Delete: Click delete icon on task card
- Move: Update stage in edit modal
-
Filter tasks
- Use search, priority, and stage filters
- Click "Clear Filters" to reset
- Dark Mode Toggle
- Task Categories/Labels
- Task Attachments
- Team Collaboration
- Real-time Updates (WebSocket)
- Task Comments
- Recurring Tasks
- Task Time Tracking
- Export/Import Functionality
- Mobile App (React Native)
For issues or questions:
- Check the documentation above
- Review error messages and logs
- Check browser console for frontend errors
- Check server logs for backend errors
MIT License - Feel free to use this project for personal or commercial purposes.
Built with β€οΈ as a full-stack learning project.
Happy Task Managing! π