Adaptive task management app that adjusts task breakdown based on your mood and energy level.
- Mood-aware task decomposition: AI breaks down tasks into smaller steps based on your current state
- Focus sessions: Pomodoro-style timer with task tracking
- Gamification: XP, levels, streaks, and achievements
- Telegram Mini App: Optimized for use inside Telegram
- PWA support: Installable as mobile app
- Frontend: Next.js 14, TypeScript, Tailwind CSS, React Query, Zustand
- Backend: Flask, SQLAlchemy, PostgreSQL
- Infrastructure: Docker, Nginx
- Docker & Docker Compose
- (Optional) Telegram Bot Token from @BotFather
- (Optional) OpenAI API Key for AI task decomposition
- Clone the repository:
git clone <repo-url>
cd moodsprint- Copy environment file:
cp .env.example .env-
Edit
.envwith your settings (Telegram token, OpenAI key, etc.) -
Start the development environment:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up --build- Access the app:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000/api/v1
- Full app via nginx: http://localhost:8080
- Configure production environment:
cp .env.example .env
# Edit .env with production values- Build and start:
docker-compose up -d --build- Access the app on port 80 (or configured PORT)
moodsprint/
├── backend/ # Flask API
│ ├── app/
│ │ ├── api/ # API endpoints
│ │ ├── models/ # Database models
│ │ ├── services/ # Business logic
│ │ └── utils/ # Utilities
│ ├── Dockerfile
│ └── requirements.txt
│
├── frontend/ # Next.js App
│ ├── src/
│ │ ├── app/ # Pages (App Router)
│ │ ├── components/ # React components
│ │ ├── domain/ # Types & constants
│ │ ├── services/ # API clients
│ │ ├── hooks/ # Custom hooks
│ │ └── lib/ # Utilities
│ ├── Dockerfile
│ └── package.json
│
├── nginx/ # Reverse proxy
│ ├── nginx.conf
│ └── Dockerfile
│
├── docker-compose.yml # Production compose
├── docker-compose.dev.yml # Development override
└── .env.example
See API.md for full API specification.
POST /api/v1/auth/telegram- Authenticate via TelegramGET/POST /api/v1/tasks- Task managementPOST /api/v1/tasks/:id/decompose- AI task decompositionPOST /api/v1/mood- Log mood checkPOST /api/v1/focus/start- Start focus sessionGET /api/v1/user/stats- User statistics
- Create a bot with @BotFather
- Enable Mini App for the bot
- Set the Mini App URL to your deployed frontend
- Add the bot token to
.env
This project uses pre-commit for code quality checks. This is required for all developers.
# Install pre-commit
pip install pre-commit
# Install hooks (run once after cloning)
pre-commit install
# (Optional) Run on all files
pre-commit run --all-filesThe hooks will automatically:
- Format Python code with
black - Sort imports with
isort - Check for lint errors with
flake8
# Backend
cd backend
python -m black app
python -m flake8 app --max-line-length=100
# Bot
cd bot
python -m black .
python -m flake8 . --max-line-length=100- Fork the repository
- Set up pre-commit hooks (see above)
- Create a feature branch
- Make your changes
- Submit a pull request
MIT