A professional PaaS platform backend for deploying web applications (React, Next.js, Node.js, etc.) with Docker containerization support.
src/
├── index.ts # Application entry point
├── config/ # Configuration management
├── database/ # Database utilities and migrations
├── routes/ # API route definitions
├── controllers/ # Request handlers
├── services/ # Business logic
├── middleware/ # Express middleware
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── constants/ # Application constants
- Node.js 18+
- PostgreSQL 15+ (local or via Docker)
- Docker & Docker Compose (for containerization)
- Copy environment file:
cp .env.example .env- Install dependencies:
npm install- Run migrations:
npm run db:migrate- Start development server:
npm run devThe API will be available at http://localhost:3000
docker-compose upThis starts both PostgreSQL and the API server in development mode.
npm run dev- Start development server with hot reloadnpm run build- Compile TypeScript to JavaScriptnpm start- Run compiled applicationnpm run db:migrate- Run database migrationsnpm run db:seed- Seed database with sample datanpm run lint- Run ESLintnpm run format- Format code with Prettiernpm run type-check- Check TypeScript types
GET /health- API health status
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/logout- User logoutPOST /api/auth/refresh- Refresh JWT token
GET /api/users/me- Get current user profilePUT /api/users/me- Update user profile
GET /api/projects- List user projectsPOST /api/projects- Create new projectGET /api/projects/:id- Get project detailsPUT /api/projects/:id- Update projectDELETE /api/projects/:id- Delete project
GET /api/projects/:projectId/deployments- List project deploymentsPOST /api/projects/:projectId/deployments- Create deploymentGET /api/deployments/:id- Get deployment detailsGET /api/deployments/:id/logs- Get deployment logs
GET /api/projects/:projectId/environments- List project environmentsPOST /api/projects/:projectId/environments- Create environmentDELETE /api/environments/:id- Delete environment
users- User accountsprojects- User projectsdeployments- Project deploymentsenvironments- Environment configurationsapi_keys- API key managementdeployment_logs- Deployment and application logs
docker build -t gilgal-api .docker run -p 3000:3000 --env-file .env gilgal-apiAll API responses follow a standard format:
Success Response:
{
"success": true,
"data": { ... },
"message": "Operation successful"
}Error Response:
{
"success": false,
"error": "error_code",
"message": "Human-readable error message"
}MIT