From Console CLI to AI-Powered Agency Management
TeamFlow CRM is a multi-phase evolution project for Hackathon II - transforming from a simple console task distribution tool into a full-stack, AI-powered agency management system with voice input, intelligent recommendations, and real-time collaboration.
TeamFlow is NOT a basic todo app. It's a comprehensive team task management system designed specifically for creative agencies:
- Multi-tenancy with complete agency data isolation
- Drag-and-drop Kanban board for intuitive task management
- Time tracking with profitability analytics
- AI-powered workflow automation via 21+ MCP tools
- Voice input support for hands-free task creation
- Real-time analytics dashboard for project insights
| Phase | Name | Technology | Status | Directory |
|---|---|---|---|---|
| 1 | Console CLI | Python 3.13+, Typer, Rich | β Complete | 001-console-task-distribution/ |
| 2 | Full-Stack Web CRM | Next.js 16, FastAPI, PostgreSQL | β Complete | teamflow-web/ |
| 3 | AI Chatbot Integration | OpenAI ChatKit, Agents SDK, MCP | β Complete | teamflow-web/ |
| Feature | Phase 1: CLI | Phase 2: Web CRM | Phase 3: AI Chat |
|---|---|---|---|
| Task Management | Command-line CRUD | Web UI with drag-drop | Voice + AI chat |
| Team Collaboration | User assignment | Multi-tenant agencies | AI auto-assignment |
| Project Management | Simple grouping | Full project lifecycle | AI recommendations |
| Time Tracking | β | β Billable hours | β Voice logging |
| Analytics Dashboard | β | β Real-time charts | β Predictive insights |
| Voice Input | β | β | β Web Speech API |
| AI Recommendations | β | β | β Smart assignee |
| RAG Knowledge Base | β | β | β Qdrant vector DB |
A rich terminal interface for task distribution with Python 3.13+, Typer CLI framework, and Pydantic validation.
Features:
- Task CRUD operations with rich terminal UI
- User management with role assignment
- Team assignment and workload tracking
- Persistent in-memory storage
- Colorful, interactive console output
Quick Start:
cd 001-console-task-distribution
pip install -e .
teamflowModern web application built with Next.js 16 and FastAPI for complete agency management.
Features:
- Kanban Task Board: Drag-and-drop with dnd-kit physics
- Project Management: Status tracking, team assignments, deadlines
- Time Tracking: Billable hours, project profitability
- Analytics Dashboard: Real-time stats, animated charts
- Multi-tenancy: Agency-scoped data isolation
- Responsive Design: Mobile-friendly with dark mode
Tech Stack:
- Frontend: Next.js 16, TypeScript, Tailwind CSS, Motion.dev
- Backend: FastAPI, SQLModel, PostgreSQL (Neon)
- Auth: JWT tokens with agency-scoped sessions
AI-powered assistant with 21+ MCP tools, RAG knowledge base, and voice input support.
Features:
- ChatWidget: Floating AI assistant with streaming responses
- 21 MCP Tools: Task/project/time management, analytics, recommendations
- Voice Input: Web Speech API for hands-free task creation
- RAG Pipeline: Qdrant vector DB for semantic document search
- Multi-Model AI: Gemini 2.0 Flash with GPT-5 fallback
- Fullscreen Mode: Dedicated chat interface at
/chat - Multi-Language: English + Urdu support
AI Architecture:
- OpenAI Agents SDK with custom agent implementation
- FastMCP server for tool integration
- OpenRouter API with automatic fallback
- Streaming NDJSON responses for real-time chat
Framework: Next.js 16 (App Router, Turbopack)
Language: TypeScript 5.7+
Styling: Tailwind CSS
Animations: Motion.dev (Framer Motion 11)
State: Zustand, React Query
Drag & Drop: @dnd-kit
Auth: Better Auth React
AI: OpenAI ChatKit ReactFramework: FastAPI 0.115+
Language: Python 3.13+
ORM: SQLModel (SQLAlchemy 2.0 async)
Database: PostgreSQL (Neon Serverless)
Auth: JWT tokens
AI: OpenAI Agents SDK, OpenRouter, GPT-5
Vector DB: Qdrant (for RAG)
MCP: FastMCP server frameworkFrontend: Vercel (auto-deploy from main)
Backend: HuggingFace Spaces (Docker SDK)
Database: Neon PostgreSQL (free tier)
CI/CD: GitHub Actions- Node.js 20+
- Python 3.13+
- PostgreSQL database (or Neon free tier)
git clone https://github.com/MrOwaisAbdullah/Teamflow.git
cd "Hackathon II"
# Checkout specific phase branches
git checkout 001-console-task-distribution # Phase 1: Console CLI
git checkout 002-fullstack-web-crm # Phase 2: Web CRM
git checkout 001-ai-chatbot # Phase 3: AI Integrationcd 001-console-task-distribution
pip install -e .
teamflow# Backend
cd teamflow-web/backend
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
alembic upgrade head
uvicorn app.main:app --reload --port 8000
# Frontend (new terminal)
cd teamflow-web/frontend
npm install
cp .env.example .env.local
npm run devVisit http://localhost:3000
Navigate to /chat in the web app or click the floating chat widget.
| Service | URL | Status |
|---|---|---|
| Frontend | teamflow-crm.vercel.app | β Live |
| Backend | hf.space/spaces/mrowais/... | β Live |
| Demo Video | YouTube: TeamFlow Demo | π¬ Watch |
Hackathon II/
βββ 001-console-task-distribution/ # Phase 1: CLI application
β βββ src/ # Source code
β βββ tests/ # Unit tests
β βββ pyproject.toml # Python project config
β
βββ teamflow-web/ # Phase 2 & 3: Full-stack + AI
β βββ frontend/ # Next.js 16 application
β β βββ src/
β β β βββ app/ # App Router pages
β β β β βββ (main)/ # Dashboard pages
β β β β βββ (marketing)/ # Landing & pricing
β β β β βββ chat/ # AI chatbot page
β β β βββ components/
β β β β βββ ui/ # shadcn/ui components
β β β β βββ dashboard/ # Dashboard widgets
β β β β βββ board/ # Kanban board
β β β β βββ chat/ # ChatKit integration
β β β βββ lib/ # Utilities, API clients
β β βββ public/ # Static assets
β β βββ package.json
β β
β βββ backend/ # FastAPI application
β β βββ app/
β β β βββ api/endpoints/ # Auth, tasks, projects
β β β βββ chatkit/ # MCP server (21 tools)
β β β βββ models/ # SQLModel schemas
β β β βββ services/ # Business logic
β β β βββ main.py # FastAPI entry
β β βββ alembic/ # Database migrations
β β βββ tests/ # Pytest tests
β β βββ Dockerfile # HuggingFace deployment
β β βββ pyproject.toml
β β
β βββ README.md # Web-specific docs
β
βββ specs/ # Feature specifications
β βββ 001-console-task-distribution/
β βββ 002-fullstack-web-crm/
β βββ 001-ai-chatbot/
β
βββ social-media-posts/ # LinkedIn announcements
βββ .github/workflows/ # CI/CD pipelines
βββ README.md # This file
- Feature specifications in
specs/directory - ADR (Architecture Decision Records) for significant decisions
- PHR (Prompt History Records) for all AI interactions
- Test-driven approach with Playwright E2E and Pytest
- CORS Issues: Resolved with proper frontend/backend configuration
- MCP Integration: Custom server implementation with 21 tools
- AI Rate Limiting: Automatic fallback from OpenRouter to OpenAI
- Voice Input: Web Speech API integration with language detection
- Real-time Streaming: NDJSON protocol for chat responses
- Motion.dev for 60fps transitions
- Physics-based drag with dnd-kit
- Celebration animations on task completion
- Smooth page transitions with AnimatePresence
DATABASE_URL=postgresql://user:pass@ep-xyz.aws.neon.tech/teamflow?sslmode=require
SECRET_KEY=your-super-secret-jwt-key-at-least-32-chars
OPENAI_API_KEY=sk-...
ENVIRONMENT=development
FRONTEND_URL=http://localhost:3000NEXT_PUBLIC_API_URL=http://localhost:8000
NEXT_PUBLIC_CHATKIT_DOMAIN_KEY=your-registered-domainTo support multi-phase hackathon submissions within a single repository:
- Development: Work continues on
mainor feature branches - Phase Branches: Each phase has its own feature branch:
001-console-task-distribution- Phase 1: Console CLI002-fullstack-web-crm- Phase 2: Full-Stack Web CRM001-ai-chatbot- Phase 3: AI Chatbot Integration
- Submit: Provide the GitHub branch URL for judging
- Continue: Switch to next branch for continued development
Available Branches:
# List all branches
git branch -a
# Checkout a specific phase
git checkout 001-console-task-distribution
git checkout 002-fullstack-web-crm
git checkout 001-ai-chatbotWhen running the backend locally:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- OpenAPI JSON: http://localhost:8000/openapi.json
cd teamflow-web/backend
pytest --cov=app --cov-report=htmlcd teamflow-web/frontend
npm run test:e2e- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MIT Β© 2025 Owais Abdullah
Built for Hackathon II by Owais Abdullah
Powered by:
- Next.js - React framework
- FastAPI - Python web framework
- OpenAI - AI/ML capabilities
- Neon - Serverless PostgreSQL
- Vercel - Frontend deployment
- HuggingFace - Backend hosting
Built with β€οΈ using Next.js 16, FastAPI, and modern AI technologies