Agent TODO là ứng dụng quản lý công việc với:
- ✅ Todo Management - CRUD operations
- 📧 Email Notifications - SMTP integration
- ⚙️ User Preferences - Personal settings
- 🤖 Automation Rules - Smart automation
- 📁 Groups & Tags - Organization
# Start all services
docker-compose up -d
# Check status
docker-compose ps- API Base: http://localhost:8000
- Swagger UI: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
# Register user
curl -X POST http://localhost:8000/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "test@example.com", "password": "password123", "full_name": "Test User"}'
# Login
curl -X POST http://localhost:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "test@example.com", "password": "password123"}'- API Documentation:
API_DOCUMENTATION.md - User Flow Guide:
USER_FLOW_GUIDE.md - Interactive Docs: http://localhost:8000/docs
# Database
DATABASE_URL=postgresql+psycopg2://user:password@db:5432/agent_plan
# SMTP (Gmail)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_FROM_EMAIL=your-email@gmail.com
# Redis
REDIS_URL=redis://localhost:6379/0
CELERY_BROKER_URL=redis://localhost:6379/0- Enable 2FA on Gmail
- Create App Password
- Update .env with App Password
- Create, Read, Update, Delete todos
- Mark as completed/important
- Due date management
- Group and tag organization
- SMTP integration with Gmail
- Background processing with Celery
- Retry logic for failed emails
- Template-based email content
- Work hours configuration
- Language and timezone settings
- Default group selection
- Notification preferences
- Trigger-based automation
- Condition evaluation
- Action execution
- Real-time processing
graph TD
A[User Login] --> B[Setup Preferences]
B --> C[Create Automation Rules]
C --> D[Create Todos]
D --> E[Automation Triggers]
E --> F[Email Notifications]
F --> G[User Actions]
G --> H[Update Status]
server/
├── app/
│ ├── models/ # Database models
│ ├── schemas/ # Pydantic schemas
│ ├── routers/ # API endpoints
│ ├── services/ # Business logic
│ ├── tasks/ # Celery tasks
│ └── main.py # FastAPI app
├── alembic/ # Database migrations
└── requirements.txt # Dependencies
- FastAPI: Web framework
- SQLAlchemy: ORM
- Alembic: Migrations
- Celery: Background jobs
- Redis: Message broker
- PostgreSQL: Database
# Service status
docker-compose ps
# View logs
docker-compose logs api
docker-compose logs celery-worker# API health
curl http://localhost:8000/health
# Database connection
curl http://localhost:8000/api/v1/todos/ -H "Authorization: Bearer <token>"Hệ thống đã sẵn sàng với đầy đủ tính năng:
- ✅ Authentication & Authorization
- ✅ Todo CRUD operations
- ✅ Email notifications
- ✅ User preferences
- ✅ Automation rules
- ✅ Background processing
- ✅ API documentation
Happy Coding! 🚀