A magical Studio Ghibli-themed task management application built with Flask, featuring a warm aesthetic inspired by Calcifer from "Howl's Moving Castle".
- ✨ User Authentication: Secure magical identity system for castle residents
- 📱 Mobile-Ready: Responsive design perfect for wandering with the castle
- 🔥 Fire Theme: Warm Ghibli-inspired theme powered by Calcifer's flames
- 🎨 Whimsical UI: Enchanting interface with magical icons
- 🔄 CRUD Operations: Create, read, update, and delete magical tasks
- 📊 API Documentation: Swagger-documented RESTful API for wizards
- 🤖 MCP Server: Model Context Protocol server for magical LLM integration
- 🏷️ Priority Levels: Critical, High, Medium, Low priority for castle duties
- đź“… Due Dates: Set and track magical task deadlines
- 🔍 Filtering: Filter tasks by status and priority like Calcifer sorting his flames
- đź’ľ SQLite Database: Lightweight magical database storage
- đź”’ Type Safety: Full Python type hints for magical code quality
- Backend: Flask 3.0, SQLAlchemy, Flask-Login, Flask-WTF
- Frontend: Bulma CSS, FontAwesome, Vanilla JavaScript
- Database: SQLite (development), PostgreSQL (production ready)
- API: Flask-RESTX with Swagger documentation
- Authentication: Werkzeug password hashing
- Python 3.8+
- uv (recommended) or pip
Note: uv is a fast Python package manager written in Rust. It provides significantly faster dependency resolution and installation compared to pip, making development more efficient.
- Install uv:
pip install uv- Clone the repository:
git clone https://github.com/jschroeder-mips/testing_copilot_agent.git
cd testing_copilot_agent- Create and activate virtual environment with dependencies:
uv sync- Initialize the database:
uv run python run.py init-db- Run the application:
uv run python run.py- Clone the repository:
git clone https://github.com/jschroeder-mips/testing_copilot_agent.git
cd testing_copilot_agent- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Initialize the database:
python run.py init-db- Run the application:
python run.pyThe application will be available at http://localhost:5000
The REST API is fully documented with Swagger and available at:
- API Docs:
http://localhost:5000/api/docs/
GET /api/todos- List all todos for current userPOST /api/todos- Create a new todoGET /api/todos/{id}- Get specific todoPUT /api/todos/{id}- Update todoDELETE /api/todos/{id}- Delete todoGET /api/users/profile- Get user profile
Calcifer's Tasks includes a Model Context Protocol (MCP) server that enables LLMs to manage magical tasks programmatically.
# Start the MCP server
python mcp_server/run_server.py- list_todos: List todos with optional filtering
- create_todo: Create new todo items
- get_todo: Get specific todo by ID
- update_todo: Update existing todos
- delete_todo: Delete todos
- get_user_info: Get user information
{
"mcpServers": {
"cybertodo": {
"command": "python",
"args": ["/path/to/cybertodo/mcp_server/run_server.py"],
"env": {
"MCP_DEFAULT_API_KEY": "cyber-todo-2077-dev-key"
}
}
}
}For detailed MCP server documentation, see mcp_server/README.md.
FLASK_CONFIG: Configuration mode (development,production,testing)SECRET_KEY: Flask secret key for sessionsDATABASE_URL: Database connection string
The application supports multiple configurations:
- Development: Debug mode enabled, SQLite database
- Production: Optimized for deployment, environment-based database
- Testing: In-memory database, CSRF disabled
id: Primary keyusername: Unique usernameemail: User email addresspassword_hash: Hashed passwordcreated_at: Account creation timestamp
id: Primary keytitle: Task titledescription: Optional task descriptionstatus: Task status (pending, in_progress, completed)priority: Task priority (low, medium, high, critical)created_at: Creation timestampupdated_at: Last modification timestampdue_date: Optional due dateuser_id: Foreign key to User
python -m pytest tests/The project follows PEP8 standards. Run linting with:
flake8 app/ tests/Reset the database:
python run.py reset-dbAccess Flask shell with models:
flask shellCyberTODO 2077 provides comprehensive Docker support for easy deployment and development. The application includes a production-ready Dockerfile and Docker Compose configuration.
- Docker Engine 20.10+ (Install Docker)
- Docker Compose v2.0+ (included with Docker Desktop)
The easiest way to run CyberTODO is using Docker Compose:
- Clone the repository:
git clone https://github.com/jschroeder-mips/testing_copilot_agent.git
cd testing_copilot_agent- Start the application:
docker compose up -d-
Access the application:
- Open your browser and navigate to
http://localhost:5000 - The application will be ready to use with a fresh database
- Open your browser and navigate to
-
Stop the application:
docker compose downIf you prefer to use Docker directly without Compose:
# Build the Docker image
docker build -t cybertodo:latest .# Run with default settings
docker run -d \
--name cybertodo \
-p 5000:5000 \
cybertodo:latest
# Run with custom configuration
docker run -d \
--name cybertodo \
-p 5000:5000 \
-e FLASK_CONFIG=production \
-e SECRET_KEY=your-secret-key-here \
-v cybertodo_data:/app/instance \
cybertodo:latestConfigure the application using these environment variables:
| Variable | Description | Default | Examples |
|---|---|---|---|
FLASK_CONFIG |
Application configuration mode | production |
development, production, testing |
SECRET_KEY |
Flask secret key for sessions | Auto-generated | your-secure-secret-key |
DATABASE_URL |
Database connection string | sqlite:///todo_app.db |
postgresql://user:pass@host:port/db |
# Create a named volume for data persistence
docker volume create cybertodo_data
# Run with volume mounted
docker run -d \
--name cybertodo \
-p 5000:5000 \
-v cybertodo_data:/app/instance \
cybertodo:latest# Create local instance directory
mkdir -p ./instance
# Run with bind mount
docker run -d \
--name cybertodo \
-p 5000:5000 \
-v $(pwd)/instance:/app/instance \
cybertodo:latestFor production environments, consider these configurations:
Create a docker-compose.prod.yml:
version: '3.8'
services:
cybertodo:
build: .
ports:
- "80:5000"
environment:
- FLASK_CONFIG=production
- SECRET_KEY=${SECRET_KEY}
- DATABASE_URL=${DATABASE_URL}
volumes:
- cybertodo_data:/app/instance
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
cybertodo_data:Run with:
# Set environment variables
export SECRET_KEY="your-production-secret-key"
export DATABASE_URL="your-database-url"
# Deploy
docker compose -f docker-compose.prod.yml up -dFor production with PostgreSQL, update your docker-compose.yml:
version: '3.8'
services:
cybertodo:
build: .
ports:
- "5000:5000"
environment:
- FLASK_CONFIG=production
- SECRET_KEY=your-secret-key-here
- DATABASE_URL=postgresql://cybertodo:changeme@postgres:5432/cybertodo
depends_on:
- postgres
restart: unless-stopped
postgres:
image: postgres:15
environment:
POSTGRES_DB: cybertodo
POSTGRES_USER: cybertodo
POSTGRES_PASSWORD: changeme
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
postgres_data:For development with live code reloading:
# Run in development mode with bind mounts
docker run -it \
--name cybertodo-dev \
-p 5000:5000 \
-v $(pwd):/app \
-e FLASK_CONFIG=development \
cybertodo:latestOr create a docker-compose.dev.yml:
version: '3.8'
services:
cybertodo:
build: .
ports:
- "5000:5000"
environment:
- FLASK_CONFIG=development
volumes:
- .:/app
- /app/instance
command: ["python", "run.py"]The Docker image includes:
- Multi-stage build: Optimized for production with minimal attack surface
- Non-root user: Runs as
cybertodouser for security - Health checks: Built-in health monitoring
- Dependency management: Uses uv for fast package installation with pip fallback
- Signal handling: Proper shutdown handling
- Environment flexibility: Works with SQLite (default) or PostgreSQL
1. Container exits immediately:
# Check logs
docker logs cybertodo
# Common fix: ensure proper permissions
docker run --user $(id -u):$(id -g) ...2. Database permission errors:
# Fix: Use named volumes instead of bind mounts
docker volume create cybertodo_data
docker run -v cybertodo_data:/app/instance ...3. Port already in use:
# Check what's using the port
sudo netstat -tlnp | grep :5000
# Use different port
docker run -p 8080:5000 cybertodo:latest4. Build fails with network issues:
# Build with network host mode
docker build --network=host -t cybertodo:latest .5. Container can't connect to database:
# Check container logs
docker logs cybertodo
# Verify environment variables
docker inspect cybertodo | grep -A 10 EnvFor high-traffic production deployments:
# Run multiple instances behind a load balancer
docker run -d --name cybertodo-1 -p 5001:5000 cybertodo:latest
docker run -d --name cybertodo-2 -p 5002:5000 cybertodo:latest
docker run -d --name cybertodo-3 -p 5003:5000 cybertodo:latestSet up monitoring with Docker:
# View real-time logs
docker logs -f cybertodo
# Monitor resource usage
docker stats cybertodo
# Health check status
docker inspect cybertodo | grep -A 5 Health- Password hashing with Werkzeug
- CSRF protection with Flask-WTF
- Session management with Flask-Login
- Input validation and sanitization
- SQL injection prevention with SQLAlchemy ORM
The application is fully responsive and optimized for mobile devices:
- Touch-friendly interface
- Responsive navigation
- Mobile-optimized forms
- Gesture support
The UI features a warm, whimsical Studio Ghibli aesthetic inspired by Calcifer:
- Warm orange (#ff6b35) and fire red (#ff4500) accents
- Cozy brown background gradients
- Gentle glow effects and magical animations
- Friendly serif typography (Georgia)
- Organic, magical UI elements
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
- Bulma CSS framework for responsive design
- FontAwesome for iconography
- Flask ecosystem for robust web development
- Studio Ghibli and Howl's Moving Castle for aesthetic inspiration