An AI-powered, self-hosted task management system that brings intelligence to your workflow
Behflow is a modern, AI-driven to-do manager designed for simplicity, efficiency, and seamless integration. Named after "Behnaz" (My partner), this project is a heartfelt tribute to the inspiration behind its creation. Behflow empowers users to manage their tasks intelligently while leveraging cutting-edge AI technology to automate processes and enhance productivity.
- LangGraph-based Agent System: Conversational AI agent for intelligent task orchestration
- Automated Process Scheduling: Time-based triggers with cron-like scheduling
- Smart Task Rescheduling: Automatically reschedule tasks based on context and priorities
- Interactive Chat Assistant: Markdown-supported chat interface for natural task interaction
- Multi-Status Tracking: Organize tasks by status (Not Started, In Progress, Completed, Blocked)
- Priority Management: Set and manage task priorities with intelligent suggestions
- Timezone-Aware Scheduling: Support for both Gregorian and Jalali date systems
- Manual & Automatic Triggers: Execute processes on demand or via scheduled automation
- User Authentication: Secure login and registration system
- Session Management: Robust session handling and user state management
- Self-Hosted Privacy: Complete control over your data and deployment
- Responsive Design: Optimized for desktop and mobile devices
- Theme Switching: Toggle between Atom One Dark Pro and light themes
- Real-time Updates: Live task status updates and notifications
- Intuitive Navigation: Clean, user-friendly interface design
- Docker-Ready: Full containerization with Docker Compose
- API-First Architecture: RESTful APIs built with FastAPI
- Modular Structure: Clean separation of concerns and maintainable codebase
- Extensive Documentation: Comprehensive guides and architecture documentation
Behflow/
βββ π docs/ # Comprehensive documentation
β βββ architecture.md # System architecture overview
β βββ automated_processes.md # Automation system guide
β βββ TASKS.md # Development tasks & roadmap
βββ π§ infra/ # Infrastructure & deployment
β βββ docker-compose.yml # Multi-container orchestration
β βββ migrations/ # Database schema migrations
βββ π» src/
β βββ π₯ backend/ # FastAPI REST API server
β β βββ app/
β β β βββ api/ # API routes (auth, chat, tasks)
β β β βββ database/ # Database models & services
β β β βββ main.py # FastAPI application entry point
β β β βββ scheduler.py # Background task scheduler
β β βββ requirements.txt # Python dependencies
β βββ π frontend/ # Modern web interface
β β βββ index.html # Main application page
β β βββ login.html # Authentication pages
β β βββ app.js # Task management & chat logic
β β βββ styles.css # Atom One Dark Pro theme
β βββ π€ behflow_agent/ # AI Agent system (LangGraph)
β β βββ agent.py # Main agent orchestrator
β β βββ nodes/ # Processing nodes
β β βββ models/ # Data models (Task, Process)
β β βββ tools.py # Agent tools & utilities
β βββ π shared/ # Shared utilities
βββ π LICENSE # MIT License
- π³ Docker & Docker Compose
- π Python 3.9+ (for local development)
- π¦ Node.js (for frontend development)
# Clone the repository
git clone https://github.com/artaasd95/behflow.git
cd behflow
# Launch all services with Docker Compose
cd infra
docker compose up --build -d
# Access the application
# π Frontend: http://localhost:3000
# π Backend API: http://localhost:8010
# ποΈ Database: localhost:15432 (postgres)
# Database is automatically initialized on first startup!
# All tables, indexes, and default data are created automatically.First Time Setup: The database will automatically initialize with all required tables and configurations. No manual setup needed!
# Backend setup
cd src/backend
pip install -r requirements.txt
python -m app.main
# Frontend setup (in new terminal)
cd src/frontend
# Serve with your preferred static server
python -m http.server 8080
# Agent service (in new terminal)
cd src/behflow_agent
pip install -r requirements.txt- Register your account at
http://localhost:8080/register.html - Login and start creating your first tasks
- Chat with the AI assistant to manage tasks naturally
- Explore automated processes in the documentation
Explore comprehensive documentation in the docs folder:
| Document | Description |
|---|---|
| π Architecture | System design, components, and request flow |
| π‘ API Documentation | REST API endpoints, requests, and responses |
| π€ Agent System | AI agent architecture and tools |
| π Database Schema | Database models, services, and migrations |
| π Database Setup | Database initialization, migrations, and troubleshooting |
| π Frontend Guide | UI components and client-side logic |
| π Integration Guide | Third-party integrations and webhooks |
| π Deployment Guide | Production deployment strategies |
| βοΈ Configuration | Environment variables and settings |
| π§ͺ Testing Guide | Testing strategies and best practices |
| βοΈ Automated Processes | Scheduling, triggers, and automation system |
| π Tasks & Changes | Development roadmap and change log |
We welcome contributions! Here's how you can help:
- π Report bugs by opening an issue
- π‘ Suggest features through discussions
- π§ Submit pull requests for improvements
- π Improve documentation and examples
Please read our contribution guidelines and follow the existing code style.
- Backend: FastAPI, SQLAlchemy, PostgreSQL
- Frontend: Vanilla JavaScript, HTML5, CSS3
- AI Engine: LangGraph, OpenAI/Anthropic integration
- Infrastructure: Docker, Docker Compose, Nginx
- Database: PostgreSQL with timezone awareness
- Testing: pytest, Jest, Testing Library
Behflow includes comprehensive test coverage for backend, frontend, and agent components.
# Backend tests
cd src/backend
pytest
# With coverage
pytest --cov=app --cov-report=html
# Specific test file
pytest tests/backend/test_auth_service.py
# Agent tests
pytest tests/agent/
# Frontend tests (requires Jest setup)
cd src/frontend
npm testtests/
βββ conftest.py # Shared fixtures
βββ backend/
β βββ test_auth_service.py
β βββ test_task_service.py
β βββ test_api_endpoints.py
βββ agent/
β βββ test_tools.py
β βββ test_builder.py
βββ frontend/
βββ README.md # Frontend test guide
Our testing strategy follows the test pyramid:
- Unit Tests (70%): Fast, isolated tests for individual functions
- Integration Tests (20%): Test component interactions
- End-to-End Tests (10%): Complete workflow validation
For detailed testing guidelines, see Testing Documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
Named with love after "Behnaz" - the inspiration behind this project.
π Behflow: Where AI meets productivity
Simplifying task management with intelligent automation
