A Flask REST API for managing collaborative tasks with room-based workspaces, priorities, and due dates.
- Room-based Collaboration - Create and join rooms for team task management
- Task Management - Create, read, update, and delete tasks
- Priority Levels - High, medium, and low priority tasks
- Due Dates - Schedule tasks with deadline tracking
- Status Tracking - Mark tasks as completed with timestamps
- Filtering - Filter tasks by status and priority
- Statistics - Track task completion and overdue items
- Web Interface - Modern UI for easy task management
# Install dependencies
pip install -r requirements.txt
# Run the app
python app.pyOpen http://localhost:5125 in your browser to use the web interface.
# Build and run with Docker
docker-compose up -dAccess the app at http://localhost:5125
POST /rooms- Create a new roomGET /rooms/<code>- Get room informationPOST /rooms/<code>/join- Join an existing room
GET /tasks?room=<code>- Get all tasks in a roomPOST /tasks?room=<code>- Create new taskPUT /tasks/<id>?room=<code>- Update specific taskDELETE /tasks/<id>?room=<code>- Delete specific taskPOST /tasks/<id>/complete?room=<code>- Mark task as completedGET /tasks/stats?room=<code>- Get task statistics
GET /health- Health check endpoint for monitoring
curl -X POST http://localhost:5125/rooms \
-H "Content-Type: application/json" \
-d '{"username": "Alice"}'Response:
{
"room_code": "ABC123",
"room": {
"code": "ABC123",
"owner": "Alice",
"members": ["Alice"],
"created_at": "2025-09-30 12:00:00",
"tasks": []
}
}curl -X POST "http://localhost:5125/tasks?room=ABC123" \
-H "Content-Type: application/json" \
-d '{
"title": "Complete project",
"description": "Finish the quarterly report",
"priority": "high",
"due_date": "2025-12-31 23:59:59"
}'curl "http://localhost:5125/tasks?room=ABC123"curl -X POST "http://localhost:5125/tasks/1/complete?room=ABC123"curl "http://localhost:5125/tasks/stats?room=ABC123".
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── Dockerfile # Container configuration
├── docker-compose.yml # Docker Compose setup
├── pytest.ini # Pytest configuration
├── frontend/ # Web interface
│ ├── index.html # Landing page
│ ├── tasks.html # Task management page
│ ├── home-styles.css # Landing page styles
│ ├── styles.css # Task page styles
│ ├── script.js # Landing page logic
│ └── tasks.js # Task page logic
├── tests/ # Test suite
│ ├── __init__.py
│ ├── conftest.py # Test fixtures
│ ├── test_app.py # Unit tests
│ └── test_api_integration.py # Integration tests
└── .github/workflows/ # CI/CD pipelines
├── ci.yml # Continuous Integration
└── deploy.yml # Deployment pipeline
pytestpytest --cov=app --cov-report=term-missing# Unit tests only
pytest tests/test_app.py
# Integration tests only
pytest tests/test_api_integration.pydocker build -t taskmanager-api .docker run -d -p 5125:5125 taskmanager-api# Start services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downThe project includes GitHub Actions workflows for:
- Continuous Integration - Automated testing on push/PR
- Deployment - Automated deployment to production
- Python 3.10 and 3.11 compatibility testing
- Code linting with flake8
- Unit and integration tests
- Security scanning
- Docker image build and test
- id: Unique task identifier (auto-generated)
- title: Task title (required)
- description: Detailed task description (optional)
- priority: Task priority - "high", "medium", or "low" (default: "medium")
- due_date: Task deadline in YYYY-MM-DD or YYYY-MM-DD HH:MM:SS format (optional)
- completed: Task completion status (boolean)
- completed_at: Timestamp when task was completed (auto-set)
- created_at: Task creation timestamp (auto-set)
- code: Unique 6-character room code (auto-generated)
- owner: Username of room creator
- members: List of usernames in the room
- created_at: Room creation timestamp
- tasks: Array of tasks in the room
FLASK_ENV- Environment mode (development/production)PYTHONUNBUFFERED- Python unbuffered outputFLASK_APP- Flask application entry point
- Python 3.10 or 3.11
- Docker (optional)
- Git
# Clone repository
git clone https://github.com/AriGameS/TaskManagerAPI.git
cd TaskManagerAPI
# Install dependencies
pip install -r requirements.txt
# Run tests
pytest
# Start development server
python app.pyThe application uses Gunicorn as the production WSGI server:
gunicorn --bind 0.0.0.0:5125 --workers 4 app:appThe API returns appropriate HTTP status codes:
200- Success201- Created400- Bad Request (missing required fields, invalid data)404- Not Found (room or task doesn't exist)500- Internal Server Error
Example error response:
{
"error": "room is required. Provide ?room=ROOM_CODE"
}- Non-root user in Docker container
- Health checks for monitoring
- CORS support for web clients
- Input validation on all endpoints
This project is open source and available under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
For issues and questions:
- Check GitHub Issues
- Review API documentation
- Check application logs# CI/CD Test - Fri Oct 3 06:30:34 IDT 2025