A production-ready fullstack clone of Trello with drag-and-drop functionality, built with React, TypeScript, Flask, and PostgreSQL.
- 🔐 Authentication: Secure JWT-based authentication system
- 📋 Boards: Create, edit, and delete boards with custom colors
- 📝 Lists: Organize tasks with drag-and-drop lists
- 🎯 Cards: Full CRUD operations on task cards
- 🏷️ Labels: Color-coded labels for card categorization
- 📅 Due Dates: Set and track task due dates
- ✅ Task Completion: Mark tasks as completed
- 🎨 Drag & Drop: Smooth drag-and-drop for cards and lists
- 🔒 Production Ready: Docker setup, comprehensive tests, security best practices
- Flask - Python web framework
- PostgreSQL - Relational database
- SQLAlchemy - ORM for database operations
- Flask-JWT-Extended - JWT authentication
- Marshmallow - Data validation
- pytest - Testing framework
- Gunicorn - Production WSGI server
- React 18 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- @dnd-kit - Drag and drop functionality
- Zustand - State management
- Axios - HTTP client
- React Router - Routing
- Vitest - Testing framework
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Python 3.11+ (for local development)
- Clone the repository:
git clone <repository-url>
cd Task-Manager-Kanban-App- Set environment variables:
# Create .env file in root directory
echo "SECRET_KEY=your-super-secret-key-here" > .env
echo "JWT_SECRET_KEY=your-jwt-secret-key-here" >> .env- Start all services:
docker-compose up --build- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- API Health: http://localhost:5000/health
- Navigate to backend directory:
cd backend- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set environment variables:
cp .env.example .env
# Edit .env with your configuration- Start PostgreSQL (if not using Docker):
# Install and start PostgreSQL
createdb trello_clone- Run the application:
python run.py- Run tests:
pytest
# With coverage
pytest --cov=app --cov-report=html- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Set environment variables:
cp .env.example .env
# Edit .env if needed- Start development server:
npm run dev- Run tests:
npm test
# With UI
npm run test:ui
# With coverage
npm run test:coverage- Build for production:
npm run buildTask-Manager-Kanban-App/
├── backend/
│ ├── app/
│ │ ├── __init__.py # Flask app factory
│ │ ├── models.py # Database models
│ │ └── routes/ # API endpoints
│ │ ├── auth.py # Authentication routes
│ │ ├── boards.py # Board CRUD
│ │ ├── lists.py # List CRUD
│ │ └── cards.py # Card CRUD
│ ├── tests/ # Backend tests
│ ├── config.py # Configuration
│ ├── run.py # Entry point
│ ├── requirements.txt # Python dependencies
│ └── Dockerfile # Backend Docker config
├── frontend/
│ ├── src/
│ │ ├── api/ # API client
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── store/ # Zustand stores
│ │ ├── types/ # TypeScript types
│ │ └── test/ # Frontend tests
│ ├── package.json # Node dependencies
│ ├── vite.config.ts # Vite configuration
│ ├── Dockerfile # Frontend Docker config
│ └── nginx.conf # Nginx configuration
├── docker-compose.yml # Docker Compose config
└── README.md # This file
POST /api/auth/register- Register new userPOST /api/auth/login- Login userPOST /api/auth/refresh- Refresh access tokenGET /api/auth/me- Get current user
GET /api/boards- Get all boardsGET /api/boards/:id- Get board with lists and cardsPOST /api/boards- Create boardPUT /api/boards/:id- Update boardDELETE /api/boards/:id- Delete board
POST /api/lists- Create listPUT /api/lists/:id- Update listPATCH /api/lists/:id/position- Update list positionDELETE /api/lists/:id- Delete list
POST /api/cards- Create cardGET /api/cards/:id- Get cardPUT /api/cards/:id- Update cardPATCH /api/cards/:id/position- Update card position (drag & drop)DELETE /api/cards/:id- Delete cardPOST /api/cards/:id/labels- Add label to cardDELETE /api/cards/labels/:id- Delete label
- id (Primary Key)
- username (Unique)
- email (Unique)
- password_hash
- created_at
- id (Primary Key)
- title
- description
- background_color
- user_id (Foreign Key)
- created_at, updated_at
- id (Primary Key)
- title
- position
- board_id (Foreign Key)
- created_at, updated_at
- id (Primary Key)
- title
- description
- position
- list_id (Foreign Key)
- due_date
- completed
- created_at, updated_at
- id (Primary Key)
- name
- color
- card_id (Foreign Key)
- created_at
cd backend
pytest # Run all tests
pytest tests/test_auth.py # Run specific test file
pytest --cov=app # With coverage
pytest -v # Verbose modecd frontend
npm test # Run all tests
npm run test:ui # Interactive test UI
npm run test:coverage # With coverage report- ✅ Password hashing with bcrypt
- ✅ JWT token authentication
- ✅ CORS configuration
- ✅ SQL injection protection (SQLAlchemy ORM)
- ✅ Input validation (Marshmallow)
- ✅ Security headers (nginx)
- ✅ Non-root Docker user
- ✅ Environment variable configuration
Set these environment variables in production:
# Backend
FLASK_ENV=production
SECRET_KEY=<strong-random-secret>
JWT_SECRET_KEY=<strong-random-jwt-secret>
DATABASE_URL=postgresql://user:pass@host:port/dbname
# Frontend
VITE_API_URL=https://your-api-domain.com/api# Build and start
docker-compose up -d --build
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Stop and remove volumes
docker-compose down -vTo create database tables:
# Using Docker
docker-compose exec backend python -c "from app import create_app, db; app = create_app('production'); app.app_context().push(); db.create_all()"
# Locally
python -c "from app import create_app, db; app = create_app('production'); app.app_context().push(); db.create_all()"- Gzip compression enabled
- Static asset caching
- Database indexes on foreign keys
- Connection pooling
- Lazy loading of relationships
- Optimistic UI updates
- Debounced API calls
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License - feel free to use this project for learning or commercial purposes.
For issues or questions, please open an issue on GitHub.
Built with ❤️ using modern web technologies and best practices.