This guide covers all installation methods for Flowlet, including local development, Docker, and production deployment.
- System Requirements
- Installation by Platform
- Quick Start with Docker
- Manual Installation
- Database Setup
- Verification
| Component | Minimum Version | Recommended |
|---|---|---|
| Python | 3.11+ | 3.12+ |
| Node.js | 18+ | 20+ LTS |
| PostgreSQL | 13+ | 15+ |
| Redis | 6+ | 7+ |
| Docker | 20.10+ | 24+ |
| Docker Compose | 2.0+ | 2.20+ |
| RAM | 4GB | 8GB+ |
| Disk Space | 5GB | 10GB+ |
| OS / Platform | Recommended Install Command | Notes |
|---|---|---|
| macOS | brew install python@3.12 node@20 postgresql redis docker |
Use Homebrew package manager |
| Ubuntu/Debian | sudo apt update && sudo apt install python3.12 nodejs npm postgresql redis docker.io |
Requires sudo privileges |
| Windows | Use WSL2 with Ubuntu 22.04, then follow Ubuntu instructions | Install Docker Desktop for Windows |
| Docker (Any OS) | docker-compose up -d |
Easiest cross-platform option |
Recommended for first-time users and development.
git clone https://github.com/quantsingularity/Flowlet.git
cd Flowletcp backend/.env.example backend/.envEdit backend/.env and update these critical settings:
SECRET_KEY=your-secret-key-change-in-production
JWT_SECRET_KEY=your-jwt-secret-key
DATABASE_URL=postgresql://flowlet:password@postgres:5432/flowlet
REDIS_URL=redis://redis:6379/0# Development environment
make docker-dev
# OR Production environment
make docker-prodThe application will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- API Documentation: http://localhost:5000/api/v1/docs
For advanced users who want full control over the installation.
# Navigate to backend directory
cd backend
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
# Set up environment
cp .env.example .env
# Edit .env with your configuration
# Initialize database
flask db init
flask db migrate -m "Initial migration"
flask db upgrade
# Run backend server
python run_server.pyBackend will run on http://localhost:5000
# Navigate to web-frontend directory
cd web-frontend
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env with your configuration
# Run development server
npm run devFrontend will run on http://localhost:3000
# Install PostgreSQL
# Ubuntu/Debian
sudo apt install postgresql postgresql-contrib
# macOS
brew install postgresql
# Start PostgreSQL service
sudo systemctl start postgresql # Linux
brew services start postgresql # macOS
# Create database and user
sudo -u postgres psql
CREATE DATABASE flowlet;
CREATE USER flowlet_user WITH PASSWORD 'secure_password';
GRANT ALL PRIVILEGES ON DATABASE flowlet TO flowlet_user;
\q
# Update backend/.env
DATABASE_URL=postgresql://flowlet_user:secure_password@localhost:5432/flowletSQLite is automatically configured for development:
# In backend/.env
DATABASE_URL=sqlite:///./database/app.dbThe database file will be created automatically on first run.
# Install Redis
# Ubuntu/Debian
sudo apt install redis-server
# macOS
brew install redis
# Start Redis
sudo systemctl start redis # Linux
brew services start redis # macOS
# Update backend/.env
REDIS_URL=redis://localhost:6379/0Create and configure the environment file:
cp backend/.env.example backend/.env# Core Settings
SECRET_KEY=generate-random-string-here
FLASK_ENV=development
FLASK_CONFIG=development
# Database
DATABASE_URL=postgresql://user:password@localhost/flowlet
# Redis
REDIS_URL=redis://localhost:6379/0
# JWT
JWT_SECRET_KEY=generate-jwt-secret-here
JWT_ACCESS_TOKEN_EXPIRES=3600
JWT_REFRESH_TOKEN_EXPIRES=86400
# Feature Flags
FRAUD_DETECTION_ENABLED=true
KYC_VERIFICATION_REQUIRED=true
AML_MONITORING_ENABLED=trueSee CONFIGURATION.md for complete environment variable reference.
cd backend
python -c "from app import create_app; app = create_app(); print('Backend OK')"
# Run tests
./run_tests.shcd web-frontend
npm run build
echo "Frontend build successful"# Backend health check
curl http://localhost:5000/health
# Expected response:
# {"status": "healthy", "timestamp": "2025-01-01T00:00:00Z"}# From project root
make testIssue: ModuleNotFoundError: No module named 'src'
Solution: Ensure you're running commands from the correct directory and virtual environment is activated:
cd backend
source venv/bin/activate
export PYTHONPATH=$PYTHONPATH:$(pwd)Issue: Database connection errors
Solution: Verify PostgreSQL is running and credentials are correct:
sudo systemctl status postgresql
psql -U flowlet_user -d flowlet -h localhostIssue: Port already in use
Solution: Change ports in configuration or stop conflicting services:
# Find process using port 5000
lsof -i :5000
kill -9 <PID>For more troubleshooting help, see TROUBLESHOOTING.md.
- Read USAGE.md for common usage patterns
- Explore API.md for API documentation
- Check EXAMPLES for working code examples
- Review CONFIGURATION.md for advanced configuration
# Pull latest changes
git pull origin main
# Update backend dependencies
cd backend
pip install --upgrade -r requirements.txt
# Update frontend dependencies
cd web-frontend
npm update
# Run migrations
cd backend
flask db upgrade
# Restart services
make docker-dev # For Docker
# OR restart manually for local installation