Flowstate-AI
October 9, 2025 ยท View on GitHub
Flowstate-AI is an AI-first, self-improving CRM-OS for network marketers and solo founders. It enforces the Frazer Method with a strict pipeline, automates follow-ups, tracks no-show and inactivity, and surfaces Next Best Actions (NBA). Built with React/Tailwind + Node/TypeScript and a Python AI worker, it learns from logs to get smarter with each iteration.
๐ GODMODE Brain Launch Sequence
The "FlowState-AI GODMODE - Ultimate Autonomous AI Development System" now ships with a single source of truth for bringing the platform online:
- Roadmap:
docs/GODMODE_BRAIN_ROADMAP.mddistills the four historical GODMODE planning docs into a nine-hour, three-phase playbook. - Checklist:
docs/launch/FINAL_LAUNCH_CHECKLIST.mdturns the roadmap into claimable deliverables, readiness gates, and fast links for the launch team. - Automation:
ai-gods/godmode_brain.pykeeps the roadmap JSON (collective-memory/godmode_brain_plan.json) and project status ledger in sync so autonomous agents or humans can execute the sequence instantly. - Validation:
docs/launch/SYSTEM_VALIDATION.mdpairs with the one-command scripts inscripts/unixandscripts/windowsto certify the stack before each launch milestone. - Command Board:
AUTONOMOUS_WORK_LOG.mdcontains the mandatory claim/complete task board. Update it before starting any task and include the deliverables once finished.
Advance phases or review progress with:
python ai-gods/godmode_brain.py --show-plan
python ai-gods/godmode_brain.py --set-phase phase_2_crm_delivery --mark-complete phase_1_ai_brain
This replaces the legacy Manus coordination stack; the best ideas from MACCS now live inside the GODMODE Brain principles.
Repository Layout
ai-gods/โ Automation brain, project manager, and resilience helpers.backend/,frontend/,python-worker/โ Core FlowState-AI services.docs/godmode/โ Canonical GODMODE knowledge base and historical plans.docs/operations/โ Runbooks, status reports, and coordination rules.docs/launch/โ Final launch checklist and nine-hour execution aides.docs/windows/โ Pilot setup instructions and packaging guides for Windows.docs/integrations/โ VS Code integration research and setup notes.docs/reference/โ Architecture, API, and quick-start guides.scripts/windows/,scripts/unix/โ Platform-specific launch scripts.archive/โ Task history and packaged assets kept for reference only.
Features
๐ฏ Frazer Pipeline Method
- 7-Stage Pipeline: Lead โ Relationship โ Invited โ Qualified โ Presentation Sent โ Follow-up โ SIGNED-UP
- Automated Stage Progression: Smart recommendations for moving customers through the pipeline
- Pipeline Analytics: Visual dashboard showing distribution and conversion rates
๐ค Customer Card System
- Complete Customer Profiles: Contact info, status, notes, and interaction history
- Enhanced Customer Management: Advanced filtering, searching, and sorting capabilities for customer data.
- Interaction Tracking: Log calls, emails, meetings, and notes with timestamps, with a dedicated UI for adding interactions.
- Next Step Management: Define and track next actions with due dates
- Smart Recommendations: AI-powered suggestions for next best actions
๐ Intelligent Reminder System
- Multi-Interval Reminders: Support for flexible, recurring reminders with various intervals.
- Automated Escalation: Progressive reminder sequences based on customer status.
- Comprehensive Management: UI for creating, updating, and deleting reminders directly from customer profiles.
- Smart Processing: Python worker automatically processes due reminders.
๐ง Next Best Action (NBA) Engine
- AI-Powered Recommendations: Smart suggestions based on customer data and behavior
- Priority Scoring: Weighted recommendations with urgency indicators
- Global & Customer-Specific: Both overview and detailed individual recommendations
๐ Event Logging & Analytics
- Comprehensive Event Log: JSON-based logging of all customer interactions and system events.
- Advanced Reporting & Analytics: Dashboard includes customer demographics (by country, language, source), interaction summaries (by type, total, average per customer), and pipeline conversion rates.
- Performance Tracking: Monitor pipeline effectiveness and conversion metrics.
- Data-Driven Insights: Learn from historical data to improve recommendations.
๐ค AI Agent Self-Improvement
- Iterative Feedback Loops: Agents continuously refine their internal models and decision-making processes.
- Self-Evaluation: Agents assess their own performance against predefined goals, identifying areas for improvement.
- Adaptive Learning: Agents adjust strategies and parameters based on feedback and self-evaluation.
- Automated Issue Creation: Performance issues can automatically trigger GitHub issues for human or AI intervention.
๐ค GitHub Coordination for AI Agents
- Centralized Task Management: GitHub Issues serve as the primary mechanism for assigning and tracking tasks for AI agents.
- Automated Workflows: GitHub Actions automate repetitive tasks like testing, deployment, and issue triage.
- Transparent Collaboration: All agent activities, including code changes and task progress, are visible on GitHub.
- Version Control: Git is used for tracking changes to code, documentation, and configurations.
Technology Stack
- Frontend: React 18 + TypeScript + Tailwind CSS + Vite
- Backend: Node.js + Express + TypeScript + SQLite (dev) / PostgreSQL (prod)
- AI Worker: Python + FastAPI for reminders and NBA processing
- Monitoring Dashboard: Python + Flask + Flask-SocketIO + SQLite
- Database: SQLite for development, PostgreSQL for production
- Containerization: Docker + Docker Compose
- CI/CD: GitHub Actions
Quick Start
Prerequisites
- Node.js 18+
- Python 3.11+
- Docker & Docker Compose (optional)
- Git
- GitHub CLI (for GitHub integration features)
Option 1: Local Development
-
Clone and Setup
git clone https://github.com/benjidanielsen/Flowstate-AI.git cd Flowstate-AI npm run setup # Installs all dependencies -
Configure Environment
cp backend/.env.example backend/.env # Edit backend/.env with your configuration # For GitHub Integration, set your GitHub Token export GITHUB_TOKEN="<YOUR_GITHUB_TOKEN>" # Replace with your actual GitHub token or personal access token # On Windows, use: set GITHUB_TOKEN="<YOUR_GITHUB_TOKEN>" # Replace with your actual GitHub token or personal access token -
Initialize Database
npm run db:migrate # Run database migrations npm run db:seed # Seed with sample data -
Start Development Servers
npm run dev # Starts all services concurrentlyOr start services individually:
# Terminal 1 - Backend cd backend && npm run dev # Terminal 2 - Frontend cd frontend && npm run dev # Terminal 3 - Python Worker cd python-worker && python -m uvicorn src.main:app --reload # Terminal 4 - Godmode Monitoring Dashboard (from Flowstate-AI/godmode-dashboard) cd godmode-dashboard && python app_enhanced.py -
Access Application
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001/api
- Python Worker: http://localhost:8000
- Godmode Dashboard: http://localhost:3333
- API Health: http://localhost:3001/api/health
Option 2: Docker Compose
-
Clone Repository
git clone https://github.com/benjidanielsen/Flowstate-AI.git cd Flowstate-AI -
Start with Docker Compose
docker-compose up -d -
Initialize Database
docker-compose exec backend npm run db:migrate docker-compose exec backend npm run db:seed
API Endpoints
Customers
GET /api/customers- List all customersGET /api/customers/:id- Get customer detailsPOST /api/customers- Create new customerPUT /api/customers/:id- Update customerDELETE /api/customers/:id- Delete customerPOST /api/customers/:id/next-stage- Move to next pipeline stageGET /api/customers/stats- Get pipeline statistics
Interactions
GET /api/interactions/customer/:id- Get customer interactionsPOST /api/interactions- Create new interactionPUT /api/interactions/:id- Update interactionDELETE /api/interactions/:id- Delete interactionGET /api/interactions/upcoming- Get upcoming scheduled interactions
Python Worker (NBA & Reminders)
GET /nba- Get Next Best Action recommendationsPOST /reminders- Create reminderGET /reminders/due- Get due remindersPOST /reminders/process-due- Process all due reminders
Godmode Monitoring Dashboard
GET /- Main dashboard pageGET /api/status- API endpoint for current statusGET /api/ai/<ai_id>- Get detailed info for specific AI
Project Structure
Flowstate-AI/
โโโ backend/ # Node.js/Express API
โ โโโ src/
โ โ โโโ controllers/ # Request handlers
โ โ โโโ services/ # Business logic
โ โ โโโ database/ # Database setup and migrations
โ โ โโโ routes/ # API routes
โ โ โโโ types/ # TypeScript types
โ โ โโโ tests/ # Unit tests
โโโ frontend/ # React application
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โโโ pages/ # Page components
โ โ โโโ services/ # API client
โ โ โโโ types/ # TypeScript types
โโโ python-worker/ # AI worker service
โ โโโ src/ # FastAPI application
โ โโโ services/ # NBA and reminder services
โโโ godmode-dashboard/ # AI Monitoring Dashboard (Python Flask)
โ โโโ app_enhanced.py # Main Flask application with SocketIO
โ โโโ database.py # SQLite database interactions
โ โโโ self_improvement.py # AI agent self-improvement logic
โ โโโ github_integration.py# GitHub API integration for coordination
โ โโโ static/ # CSS, JS, profile pictures
โ โโโ templates/ # HTML templates (dashboard.html)
โโโ .github/workflows/ # CI/CD pipelines
โโโ github_integration.py # GitHub API integration (shared utility)
โโโ docker-compose.yml # Container orchestration
Development
Testing
# Run all tests
npm test
# Individual service tests
npm run test:frontend
npm run test:backend
cd python-worker && python -m pytest
cd godmode-dashboard && python -m pytest # (if tests are implemented)
Linting
# Lint all code
npm run lint
# Auto-fix issues
npm run lint:fix
Building
# Build all services
npm run build
# Individual builds
npm run build:frontend
npm run build:backend
Production Deployment
-
Environment Variables
- Set
NODE_ENV=production - Configure PostgreSQL connection
- Set strong JWT secrets
- Configure Python worker endpoints
- Set
GITHUB_TOKENfor GitHub integration
- Set
-
Database Migration
npm run db:migrate -
Docker Production Build
docker-compose -f docker-compose.yml up -d --profile production
Cost-Free Operation and Windows Compatibility
The Flowstate-AI system is designed for cost-free operation, leveraging open-source technologies like Python, Flask, Flask-SocketIO, and SQLite. It is also fully compatible with Windows operating systems, with specific considerations for setup and environment configuration detailed in the cost_free_windows_compatibility.md document.
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and add tests
- Run linting and tests:
npm run lint && npm test - Commit your changes:
git commit -m 'Add feature' - Push to branch:
git push origin feature-name - Submit a pull request
License
This project is licensed under the MIT License.
Support
For support, please open an issue on GitHub or contact support@flowstate-ai.com.
Built with โค๏ธ for network marketers and solo founders who want to scale their relationships systematically.