A comprehensive task management application with comments functionality, built with Flask backend API and React frontend.
- Tasks CRUD API: Complete Create, Read, Update, Delete operations for tasks
- Comments CRUD API: Full comment management system for tasks
- RESTful Design: Proper HTTP methods and status codes
- Data Validation: Input validation and error handling
- SQLite Database: Local database with SQLAlchemy ORM
- Automated Tests: Comprehensive test suite using unittest
- Task Management: Create, edit, delete, and organize tasks
- Kanban Board: Visual task organization by status (To Do, In Progress, Completed)
- Comments System: Add, edit, and delete comments on tasks
- Real-time Updates: Automatic data synchronization
- Responsive Design: Works on all device sizes
GET /api/tasks- Get all tasksGET /api/tasks/:id- Get single task with commentsPOST /api/tasks- Create new taskPUT /api/tasks/:id- Update taskDELETE /api/tasks/:id- Delete task
GET /api/comments- Get all commentsGET /api/comments?task_id=:id- Get comments for taskGET /api/comments/:id- Get single commentPOST /api/comments- Create new commentPUT /api/comments/:id- Update commentDELETE /api/comments/:id- Delete comment
GET /api/health- API health status
id(integer, primary key)title(string, required)description(text, optional)status(enum: todo, in_progress, completed)created_at(datetime)updated_at(datetime)
id(integer, primary key)task_id(integer, foreign key to tasks)content(text, required)created_at(datetime)updated_at(datetime)
- Python 3.8+
- Node.js 16+
- npm or yarn
-
Install Python Dependencies:
pip install -r requirements.txt
-
Install Node Dependencies:
npm install
-
Run the Application:
Option 1: Run both servers simultaneously
npm run dev:full
Option 2: Run servers separately
Terminal 1 (Flask Backend):
npm run flask # or cd backend && python app.py
Terminal 2 (React Frontend):
npm run dev
-
Access the Application:
- Frontend: http://localhost:5173
- Backend API: http://localhost:5000
Run Flask API Tests:
cd backend && python test_api.pyTest API Endpoints:
# Health check
curl http://localhost:5000/api/health
# Get all tasks
curl http://localhost:5000/api/tasks
# Create a task
curl -X POST http://localhost:5000/api/tasks \
-H "Content-Type: application/json" \
-d '{"title": "Test Task", "description": "Test Description", "status": "todo"}'- Backend: Flask with SQLAlchemy ORM
- Frontend: React with TypeScript
- Database: SQLite (local development)
- Styling: Tailwind CSS
- API Client: Custom TypeScript API client
- State Management: React hooks
- Hot Reload: Both Flask and React support hot reloading
- CORS Enabled: Cross-origin requests configured
- Error Handling: Comprehensive error handling on both ends
- Type Safety: Full TypeScript support
- Responsive Design: Mobile-first approach
├── backend/
│ ├── app.py # Flask application
│ ├── test_api.py # API tests
│ └── tasks.db # SQLite database (auto-created)
├── src/
│ ├── components/ # React components
│ ├── services/ # API client
│ ├── types/ # TypeScript types
│ └── App.tsx # Main React component
├── requirements.txt # Python dependencies
└── package.json # Node.js dependencies
All API responses follow this format:
Success Response:
{
"data": { ... }
}Error Response:
{
"error": "Error message"
}200- Success201- Created400- Bad Request (validation error)404- Not Found500- Internal Server Error