Skip to content

artaasd95/Behflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Behflow logo

🌟 Behflow

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.

✨ Features

πŸ€– AI-Powered Intelligence

  • 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

πŸ“‹ Task Management

  • 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

πŸ” Authentication & Security

  • 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

🎨 Modern Interface

  • 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

πŸ›  Developer-Friendly

  • 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

πŸ— Project Architecture

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

πŸš€ Quick Start

πŸ“‹ Prerequisites

  • 🐳 Docker & Docker Compose
  • 🐍 Python 3.9+ (for local development)
  • πŸ“¦ Node.js (for frontend development)

⚑ Installation

🐳 Docker Setup (Recommended)

# 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!

πŸ›  Local Development Setup

# 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

🎯 First Steps

  1. Register your account at http://localhost:8080/register.html
  2. Login and start creating your first tasks
  3. Chat with the AI assistant to manage tasks naturally
  4. Explore automated processes in the documentation

πŸ“š 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

🀝 Contributing

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.

πŸ›  Tech Stack

  • 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

πŸ§ͺ Testing

Behflow includes comprehensive test coverage for backend, frontend, and agent components.

Running Tests

# 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 test

Test Structure

tests/
β”œβ”€β”€ 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

Test Coverage

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.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ’– Acknowledgments

Named with love after "Behnaz" - the inspiration behind this project.


🌟 Behflow: Where AI meets productivity

Simplifying task management with intelligent automation

About

Simple Todo task manager AI agent

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published