An open-source automation platform that helps teams streamline their workflows and manage API integrations efficiently.
- Frontend: Next.js 14, TypeScript, TailwindCSS
- Backend: Express.js, TypeScript, Prisma ORM
- Database: PostgreSQL
- Authentication: Supabase (Google, GitHub, Email/Password)
- Mock Services: Standalone Apollo API mock with 100K entities
- Containerization: Docker & Docker Compose
- π Secure Authentication - Multiple sign-in options via Supabase
- π API Key Management - Store and manage API keys for various services
- π¨ Modern UI - Clean, professional interface for both technical and sales teams
- π Mock Apollo Service - Standalone service with 100K mock entities for development
- π³ Docker Ready - Full containerization support with automated database setup
- π Real-time Updates - Dynamic page refreshing after changes
This project includes a standalone Apollo API mock service for development:
- π 100K Mock Entities - Pre-seeded with realistic people, organizations, and locations
- π§ Separate Database - Uses its own
mock_apollo
PostgreSQL database - β‘ Configurable Latency - Simulates real-world API response times
- π Smart Routing - Backend automatically routes between mock/real Apollo APIs
- π Auto-Setup - Database and data seeding handled automatically
The mock service runs on port 3002 and provides Apollo-compatible endpoints for development without requiring real API keys.
- Node.js 18+ and npm
- Docker and Docker Compose
- PostgreSQL (if running locally)
For new users, use our automated setup script:
git clone https://github.com/getbeton/beton-ai.git
cd beton-ai
./setup.sh
This script will:
- β Create all environment files automatically
- β Install dependencies
- β Build and start all Docker services
- β
Create separate
mock_apollo
database - β Seed 100K mock entities for development
- β Start the complete development environment
Services will be available at:
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Mock Apollo: http://localhost:3002
- PostgreSQL: localhost:5432
- Redis: localhost:6379
Use the interactive development script:
./dev.sh
Choose your preferred development mode:
- Option 1: Full Docker (recommended for first-time setup)
- Option 2: Frontend Dev + Backend Docker (hot reload frontend)
- Option 3: Backend Dev + Frontend Docker (hot reload backend)
- Option 4: Both Dev (hot reload both services)
- Include Mock Apollo: Yes (recommended for development)
If you prefer manual setup:
Backend (.env in /backend):
DATABASE_URL=postgresql://postgres:postgres123@localhost:5432/beton_ai
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
JWT_SECRET=your_jwt_secret
PORT=3001
Frontend (.env.local in /frontend):
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
NEXT_PUBLIC_API_URL=http://localhost:3001
Manual Database Setup:
# Copy environment files
cp backend/env.example backend/.env
cp frontend/env.local.example frontend/.env.local
# Start PostgreSQL
docker-compose up -d postgres
# Run migrations
docker-compose run --rm backend npx prisma migrate deploy
# Start all services
docker-compose up
# Build and start all services
npm run docker:build
npm run docker:up
# Stop all services
npm run docker:down
# Build images
docker-compose build
# Start services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
beton-ai/
βββ backend/ # Express.js API server
β βββ src/
β β βββ routes/ # API routes
β β βββ middleware/ # Custom middleware
β β βββ services/ # Business logic
β β βββ types/ # TypeScript definitions
β βββ prisma/ # Database schema and migrations
β βββ Dockerfile
βββ frontend/ # Next.js application
β βββ src/
β β βββ app/ # App router pages
β β βββ components/ # Reusable components
β β βββ lib/ # Utilities and configurations
β β βββ types/ # TypeScript definitions
β βββ Dockerfile
βββ docker-compose.yml # Multi-container configuration
npm run dev
- Start both frontend and backend in developmentnpm run build
- Build both applications for productionnpm run start
- Start both applications in production modenpm run docker:build
- Build Docker imagesnpm run docker:up
- Start with Docker Composenpm run docker:down
- Stop Docker containers
- Frontend: http://localhost:3000
- Backend API: http://localhost:3001
- Mock Apollo: http://localhost:3002
- PostgreSQL: localhost:5432
- Redis: localhost:6379
# View database with Prisma Studio
docker-compose run --rm backend npx prisma studio --browser none
# Generate Prisma client
docker-compose run --rm backend npx prisma generate
# Deploy migrations (production)
docker-compose run --rm backend npx prisma migrate deploy
# Create new migration (development)
docker-compose run --rm backend npx prisma migrate dev
# Reset database (β οΈ destructive)
docker-compose run --rm backend npx prisma migrate reset
The PostgreSQL container includes health checks that ensure the database is ready before the backend starts. The backend startup script will:
- Wait for PostgreSQL to be healthy
- Automatically run migrations on startup
- Start the Express server
This ensures consistent database state across all environments.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.