A therapeutic coloring and tracing application that uses AI to generate personalized coloring book pages and track user progress.
- Docker and Docker Compose installed
- Gemini API key from Google AI Studio
-
Clone the repository
git clone <your-repo-url> cd dubhacks25
-
Set up environment variables
cp .env.example .env
Edit
.envand add your Gemini API key:GEMINI_API_KEY=your_actual_api_key_here -
Build and start the application
docker-compose up --build
For background mode:
docker-compose up -d --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
docker-compose downTo also remove volumes:
docker-compose down -v-
Backend: Flask REST API with Gemini AI integration
- Port: 5000
- Generates coloring book pages using Gemini 2.0 Flash
- Integrates Prompt Enhancer API for better therapeutic content
- Provides scoring endpoints for user progress tracking
-
Frontend: Next.js application
- Port: 3000
- React-based UI for coloring and tracing activities
- Tailwind CSS for styling
dubhacks25/
├── backend/ # Flask API
│ ├── app.py # Application factory
│ ├── routes/ # API endpoints
│ ├── services/ # Business logic (AI generation)
│ ├── models/ # Data models
│ ├── Dockerfile # Backend container config
│ └── requirements.txt # Python dependencies
├── the-grounds/ # Next.js frontend
│ ├── src/ # Source code
│ ├── public/ # Static assets
│ ├── Dockerfile # Frontend container config
│ └── package.json # Node dependencies
└── docker-compose.yml # Orchestration config
cd backend
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
python app.pycd the-grounds
npm install
npm run devGenerate a coloring book page from a text prompt.
Request:
{
"prompt": "a happy dog playing in a park"
}Response:
{
"id": "img_abc123",
"url": "/static/img_abc123.png"
}Score a user's traced image against the original.
Request:
{
"original_id": "img_abc123",
"traced_data": "base64_encoded_image_data"
}Response:
{
"score": 0.85,
"feedback": "Great job! Very accurate tracing."
}GEMINI_API_KEY: Your Google Gemini API key (required)FLASK_ENV: Environment mode (production/development)
NEXT_PUBLIC_API_URL: Backend API URL (defaults to http://backend:5000 in Docker)
MIT