git clone <your-repo-url>
cd appserver
# Create .env file for development
echo "HTTP_PORT=8888" > .env
echo "HTTPS_PORT=8443" >> .env
# Build and start all services
docker compose up -d
# Wait for services to be healthy (30-60 seconds)
docker compose ps
# Connect to database
docker exec -it saas-postgres psql -U saas_user -d saas_db
# Create admin user (in psql)
INSERT INTO __sys_users (email, password, role, email_verified)
VALUES ('admin@localhost', crypt('admin123', gen_salt('bf')), 'admin', true);
# Exit psql
\q
admin@localhost / admin123# Get auth token
TOKEN=$(curl -s -X POST http://localhost:8888/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@localhost","password":"admin123"}' \
| jq -r '.accessToken')
# Create and deploy application
curl -X POST http://localhost:8888/api/applications \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My App",
"slug": "my-app",
"appType": "npm",
"repositoryUrl": "https://github.com/user/repo.git",
"branch": "main",
"buildCommand": "npm install",
"startCommand": "npm start",
"port": 3000,
"environment": {
"NODE_ENV": "production"
}
}'
# Get app ID from response, then deploy
APP_ID="<app-id>"
curl -X POST "http://localhost:8888/api/applications/$APP_ID/deploy" \
-H "Authorization: Bearer $TOKEN"
# Check deployment logs
curl "http://localhost:8888/api/applications/$APP_ID/logs" \
-H "Authorization: Bearer $TOKEN"
| Type | Use Case | Example |
|---|---|---|
| npm | Node.js apps | Express, Fastify, Koa |
| react | React apps | Vite, CRA |
| nextjs | Next.js apps | Full-stack React |
| php | PHP apps | Laravel, WordPress |
| python | Python apps | Flask, Django, FastAPI |
| static | Static sites | HTML/CSS/JS |
| docker | Custom Docker | Any Dockerfile |
# Stop all services
docker compose down
# Stop and remove volumes (WARNING: deletes all data)
docker compose down -v
# View logs
docker compose logs -f api-service
docker compose logs -f auth-service
If you see "address already in use" error:
# Make sure .env has port 8888
echo "HTTP_PORT=8888" > .env
echo "HTTPS_PORT=8443" >> .env
# Restart services
docker compose down
docker compose up -d
# Check if database is running
docker compose ps postgres
# View database logs
docker compose logs postgres
# Reset database (WARNING: deletes all data)
docker compose down -v
docker compose up -d
# Check service logs
docker compose logs <service-name>
# Common issues:
# - Database not ready: Wait 30 seconds
# - Wrong credentials: Check .env file
# - Port conflict: Change ports in .env
# Get app ID from dashboard
APP_ID="<your-app-id>"
# Check deployment logs
curl "http://localhost:8888/api/applications/$APP_ID/logs" \
-H "Authorization: Bearer $TOKEN"
# Common issues:
# - Invalid git URL
# - Missing Dockerfile (for docker type)
# - Wrong build/start commands
# - Missing dependencies in repository
Edit files in services/api, services/auth, or dashboard
# Rebuild specific service
docker compose build api-service
# Restart service
docker compose up -d api-service
# Follow logs
docker compose logs -f api-service
# View all logs
docker compose logs --tail=100
# Using psql
docker exec -it saas-postgres psql -U saas_user -d saas_db
# Using adminer (if available)
# Open http://localhost:8080
See docs/DEPLOYMENT.md for production deployment guide.
docs/ directoryexamples/ directoryHappy coding! 🚀