A comprehensive multi-service SaaS platform with AI-powered workflow management, browser automation, and agent orchestration capabilities.
- Node.js 20+
- pnpm 10.19.0+ (install with
npm install -g pnpm) - PostgreSQL 14+
- Redis 6+
- Docker (optional, for local database services)
# Clone the repository
git clone https://github.com/whodaniel/fuse.git
cd fuse
# Install dependencies (includes automatic native module setup)
pnpm install# Option 1: Fastest startup (no IDE) - RECOMMENDED FOR FIRST RUN
pnpm run dev:no-ide # Core services ready in ~11 seconds
# Option 2: Auto-detect mode from .env
cp .env.example .env # Configure your preferences
pnpm run dev # Smart startup based on configuration
# Option 3: Cloud IDE (if available)
pnpm run dev:cloud-ide # Connect to remote IDE instance# With Docker Infrastructure
pnpm run docker:start && pnpm run dev:frontend
# Traditional approach (may have build issues)
pnpm run dev:legacygraph TD
A[Start Development] --> B{Choose Mode}
B -->|none| C[Core Services Only]
B -->|local| D[Core + Local Theia]
B -->|cloud| E[Core + Cloud Theia]
C --> F[API Gateway :3005]
C --> G[Backend API :3001]
C --> H[Frontend :3000]
C --> I[Electron App]
D --> F & G & H & I
D --> J[Local Theia :3007]
E --> F & G & H & I
E --> K[Cloud Theia Remote]
F & G & H & I --> L[Ready in ~11s]
J --> M[Ready in ~20s]
K --> N[Ready in ~12s]
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend API β β API Gateway β
β React + Vite β β NestJS β β Route + Auth β
β Port: 3000 β β Port: 3001 β β Port: 3005 β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β
ββββββββββββββββββββββββββΌβββββββββββββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β Electron Desktop β
β Browser Hub + MCP β
β (Auto-launched) β
βββββββββββββββββββββββββββββ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β API Gateway β β API Server β
β React + Vite βββββΊβ NestJS βββββΊβ NestJS β
β Port: 3000 β β Port: 3002 β β Port: 3001 β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
ββββββββββββββββββββββββΌββββββββββββββββββββββββ
β
βββββββββββββΌβββββββββββββ
β Backend Services β
β NestJS + Workers β
β Port: 3003 β
ββββββββββββββββββββββββββ
- Frontend (
apps/frontend) - Main React application with Vite - Client (
apps/client) - Alternative client application
- API Server (
apps/api) - Core API service - API Gateway (
apps/api-gateway) - Request routing and authentication - Backend (
apps/backend) - Background services and workers
- Browser Hub (
apps/browser-hub) - Browser automation and management - MCP Servers (
apps/mcp-servers) - Model Context Protocol servers - Relay Server (
apps/relay-server) - Real-time communication relay - Electron Desktop (
apps/electron-desktop) - Desktop application
- Agent-to-agent communication
- Intelligent task delegation
- Workflow management
- Shared context and memory
- Chrome extension integration
- Web scraping capabilities
- UI automation
- Visual element interaction
- Multiple AI provider support (OpenAI, Anthropic, Google)
- Model Context Protocol (MCP) integration
- Streaming responses
- Tool integration
- WebSocket support
- Live collaboration
- Real-time updates
- Event-driven architecture
- React 18 with TypeScript
- Vite for fast development
- Chakra UI components
- React Query for data fetching
- NestJS framework
- TypeScript
- Prisma ORM
- PostgreSQL database
- Redis caching
- Docker containerization
- Railway deployment ready
- Nixpacks build system
- GitHub Actions CI/CD
This project uses pnpm exclusively. Do not use npm or yarn.
# Start Docker services
pnpm run docker:start
# Check service status
pnpm run docker:status
# Test connectivity
pnpm run docker:test
# View logs
pnpm run docker:logs
# Stop services
pnpm run docker:stopfuse/
βββ apps/ # Application services
β βββ api/ # Main API server
β βββ api-gateway/ # API gateway
β βββ backend/ # Backend services
β βββ frontend/ # React frontend
β βββ browser-hub/ # Browser automation
β βββ mcp-servers/ # MCP servers
β βββ relay-server/ # Communication relay
β βββ electron-desktop/ # Desktop app
βββ packages/ # Shared packages
β βββ a2a-core/ # Agent-to-agent core
β βββ a2a-react/ # Agent React components
β βββ api-client/ # API client library
β βββ api-types/ # Shared API types
β βββ core/ # Core utilities
β βββ database/ # Database schemas
β βββ mcp-core/ # MCP core functionality
β βββ workflow-engine/ # Workflow processing
β βββ ... # Other shared packages
βββ scripts/ # Build and deployment scripts
βββ docs/ # Documentation
βββ railway-deploy.sh # Railway deployment script
Create a .env file in the root directory with:
# Development
pnpm run dev # Start all services
pnpm run dev:frontend # Frontend only
pnpm run dev:backend # Backend only
pnpm run dev:hub # Electron app only
# Docker Management
pnpm run docker:start # Start PostgreSQL & Redis
pnpm run docker:stop # Stop Docker services
pnpm run docker:test # Test connectivity
pnpm run docker:status # Check service status
# Building
pnpm run build # Build all apps
pnpm run build:frontend # Build frontend
pnpm run build:backend # Build backend
# Testing
pnpm run test # Run all tests
pnpm run test:frontend # Frontend tests
pnpm run test:backend # Backend tests
# Quality
pnpm run lint # Lint all code
pnpm run type-check # TypeScript checking
pnpm run format # Format code
# Claude Agent Management
pnpm run claude:agents:sync # Synchronize .claude agents
pnpm run claude:agents:register # Register agents in database
pnpm run claude:agents:search # Search agent ecosystem
pnpm run claude:agents:status # Agent system status-
Setup Environment:
pnpm install pnpm run docker:start pnpm run claude:agents:sync # Initialize agent system -
Start Development:
pnpm run dev:frontend pnpm run dev:backend pnpm run dev:hub
-
Access Services:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3004
- Browser Hub: http://localhost:8080
- Electron: Desktop application
-
Monitor Services:
pnpm run docker:status curl http://localhost:3004/api/services/status
GET /api/services/status- Service health statusGET /api/system/metrics- System performance metricsGET /api/system/tools- Available system tools
POST /api/agents/register/batch- Register all .claude agents in databaseGET /api/agents/search- Advanced search with multi-criteria filteringGET /api/agents/:id/profile- Complete agent profile with capabilitiesGET /api/agents/:id/similar- Find similar and complementary agentsGET /api/agents/:id/relationships- Agent compatibility and workflowsPOST /api/agents/:id/usage- Record agent usage and performance metricsGET /api/agents/statistics- System-wide agent analytics and insights
pnpm run test# Start services first
pnpm run docker:start
pnpm run dev
# Run integration tests
pnpm run test:integrationpnpm run docker:test# With Docker infrastructure
pnpm run docker:start
pnpm run dev# Build for production
pnpm run build
# Deploy with Docker Compose
docker-compose -f docker-compose.yml up -dpnpm run test # Run all tests
pnpm run test:unit # Unit tests
pnpm run test:integration # Integration tests
pnpm run test:e2e # End-to-end testspnpm run db:generate # Generate Prisma client
pnpm run db:migrate # Run migrations
pnpm run db:studio # Open Prisma Studio
pnpm run db:reset # Reset database with seed datapnpm run lint # Lint code
pnpm run type-check # TypeScript checking
pnpm run format # Format codepnpm run clean # Clean build artifacts
pnpm run clean:cache # Clear pnpm cache
pnpm run clean:full # Full clean + remove node_modulesThe project is configured for easy Railway deployment:
# Deploy all services
./railway-deploy.sh
# Or deploy individual services
cd apps/frontend && railway up
cd apps/api && railway up
cd apps/backend && railway upSee RAILWAY_DEPLOYMENT.md for detailed deployment instructions.
# Build Docker images
docker build -t fuse-frontend -f apps/frontend/Dockerfile .
docker build -t fuse-api -f apps/api/Dockerfile .
# Run with docker-compose
docker-compose up -d- Configure environment variables in Railway dashboard
- Add PostgreSQL and Redis plugins
- Set up custom domains (optional)
- Configure health checks
- Monitor deployments
-
Create a new branch
git checkout -b feature/your-feature-name
-
Make your changes in the appropriate package/app
-
Test locally
pnpm run test pnpm run type-check -
Build to verify
pnpm run build
-
Commit and push
git add . git commit -m "feat: your feature description" git push origin feature/your-feature-name
# Install dependency in specific package
pnpm --filter @the-new-fuse/api add express
# Run command in specific package
pnpm --filter @the-new-fuse/frontend run build
# Run command in all packages
pnpm -r run build# Check what's using the port
lsof -i :3000
# Clean ports (if script exists)
pnpm run clean:ports# Verify PostgreSQL is running
psql -U postgres -c "SELECT version();"
# Reset database
pnpm run db:reset# Clean and reinstall
pnpm run clean:full
pnpm install
pnpm run build# Regenerate Prisma client
pnpm run db:generate
# Run type check
pnpm run type-check- Development Setup - Detailed development guide
- Railway Deployment - Deployment instructions
- API Documentation - API reference
- Architecture - System architecture
- pnpm Standardization - Package manager info
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Ensure all tests pass
- Submit a pull request
# Clone your fork
git clone <your-fork-url>
cd the-new-fuse
# Install dependencies
pnpm install
# Start development environment
pnpm run docker:start
pnpm run dev
# Run tests
pnpm run test
pnpm run docker:test- Node.js: 18+
- Docker: Latest stable version
- Memory: 4GB+ recommended
- Storage: 2GB+ available space
- TypeScript: Latest version
- Git: Version control
- Docker Desktop: For database services
- Code Editor: VS Code recommended
Native Module Build Errors:
# Automatic fix (recommended)
pnpm run setup:native-modules
# Manual fix
pnpm run fix:native-modules
# Complete reinstall
rm -rf node_modules && pnpm installDocker services won't start:
# Check Docker status
docker info
# Restart Docker services
pnpm run docker:stop
pnpm run docker:startPort conflicts:
# Check port usage
lsof -i :3000
lsof -i :3004
lsof -i :5433
lsof -i :6380Connection issues:
# Test connectivity
pnpm run docker:test
# Check logs
pnpm run docker:logsFor detailed troubleshooting, see:
[Add your license here]
- Built with pnpm for fast and reliable dependency management
- Docker for containerization
- NestJS for backend framework
- React for frontend framework
- Electron for desktop integration
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Check the
docs/directory
[Add your license information here]
Ready to launch your SaaS platform! π
For deployment instructions, see RAILWAY_DEPLOYMENT.md