A comprehensive full-stack productivity application for managing tasks, organizing workspaces, and scheduling your time. Mend helps you stay organized with an intuitive interface for creating todo lists, managing projects across multiple workspaces, and planning your schedule with a timetable system.
π Live Demo: https://mendapp.online
Mend/
βββ frontend/ # React + Vite frontend application
β βββ src/
β β βββ components/ # React components
β β βββ App.jsx # Main application component
β β βββ index.css # Global styles
β β βββ login.jsx # Authentication component
β β βββ addTask.jsx # Todo management component
β β βββ main.jsx # React entry point
β βββ index.html # HTML template
β βββ package.json # Frontend dependencies
β
βββ backend/ # FastAPI backend application
β βββ auth/ # Authentication routes and security
β β βββ routes.py # Auth endpoints (login, register)
β β βββ security.py # JWT and password utilities
β βββ main.py # FastAPI app and API endpoints
β βββ database.py # Database configuration
β βββ models.py # SQLAlchemy ORM models
β βββ schemas.py # Pydantic request/response schemas
β βββ requirements.txt # Python dependencies
β βββ .env # Environment variables (local)
β
βββ .env # Root environment configuration
βββ README.md # This file
βββ LICENSE # License file
cd backend
python -m venv venv
venv\Scripts\activate
source venv/bin/activate
pip install -r requirements.txt
.env file in the backend directory:
DATABASE_URL=postgresql://your_username:your_password@localhost:5432/todo_db
uvicorn main:app --reload
The API will be available at http://localhost:8000
cd frontend
npm install
npm run dev
The application will be available at http://localhost:5173
Create a backend/.env file with:
# PostgreSQL database connection
DATABASE_URL=postgresql://username:password@localhost:5432/todo_db
# Security (if applicable)
# SECRET_KEY=your_secret_key_here
# ALGORITHM=HS256
# ACCESS_TOKEN_EXPIRE_MINUTES=30
psql -U postgres
CREATE DATABASE todo_db;
Base.metadata.create_all()).Start PostgreSQL server (if not running)
cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
uvicorn main:app --reload
cd frontend
npm run dev
http://localhost:5173curl -X POST http://localhost:8000/auth/register \
-H "Content-Type: application/json" \
-d '{
"username": "john_doe",
"password": "secure_password"
}'
curl -X POST http://localhost:8000/auth/login \
-H "Content-Type: application/json" \
-d '{
"username": "john_doe",
"password": "secure_password"
}'
curl -X GET http://localhost:8000/workspaces \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
curl -X POST http://localhost:8000/workspaces \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Projects"}'
curl -X PATCH http://localhost:8000/workspaces/1 \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Updated Name"}'
curl -X DELETE http://localhost:8000/workspaces/1 \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
curl -X GET "http://localhost:8000/todos?workspace_id=1&completed=false" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
curl -X POST http://localhost:8000/todos \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Complete project",
"workspace_id": 1,
"completed": false,
"time_left_minutes": 120
}'
curl -X PATCH http://localhost:8000/todos/1 \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"completed": true,
"time_left_minutes": 60
}'
curl -X DELETE http://localhost:8000/todos/1 \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
curl -X GET "http://localhost:8000/timetable-items?day=monday" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
curl -X POST http://localhost:8000/timetable-items \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Team Meeting",
"day": "monday",
"time": "10:00 AM",
"workspace_id": 1
}'
curl -X PATCH http://localhost:8000/timetable-items/1 \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Updated Meeting"}'
curl -X DELETE http://localhost:8000/timetable-items/1 \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm build
# Preview production build
npm run preview
cd backend
# Activate virtual environment
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run development server with auto-reload
uvicorn main:app --reload
# Run with specific host/port
uvicorn main:app --host 0.0.0.0 --port 8000 --reload
Frontend:
Backend:
Use your .env file DATABASE_URL:
postgresql://username:password@localhost:5432/todo_db
# Connect to the database
psql -U your_username -d todo_db
# List all tables
\dt
# Backup database
pg_dump -U your_username -d todo_db > backup.sql
# Restore database
psql -U your_username -d todo_db < backup.sql
# Drop database (WARNING: destructive)
DROP DATABASE todo_db;
The application uses SQLAlchemy ORM to manage the following tables:
All tables are automatically created on first run via SQLAlchemy migrations.
react - UI libraryreact-dom - React DOM renderingvite - Build toolfastapi - Web frameworkuvicorn - ASGI serversqlalchemy - ORMpsycopg2-binary - PostgreSQL driverpython-dotenv - Environment variablespydantic - Data validationpython-jose - JWT tokenspython-multipart - Form data handlingSee backend/requirements.txt for the complete list.
Contributions are welcome! Please follow these steps:
git checkout -b feature/YourFeature)git commit -m 'Add YourFeature')git push origin feature/YourFeature)Please ensure:
This project is licensed under the MIT License - see the LICENSE file for details.
For issues, questions, or suggestions, please open an issue on the GitHub repository.
Built with β€οΈ using React, FastAPI, and PostgreSQL