How gsmota323/zploy works
Zploy is a local, prototype PaaS for managing apps and deploying GitHub repositories into Docker containers. Users authenticate (or use the documented study mode), create and configure apps, then request a deployment manually or trigger one with a GitHub push webhook. The API records deployment state and queues work; a separate worker fetches code, prepares and builds an image, starts the container, and records status and logs. The web panel operates the platform and presents deployment information. The worker excerpt is partial, so uncertain internal deployment wiring is omitted.
Main entry points: app.ts Express application · deployWorker.ts Deploy worker · schema.prisma PostgreSQL database · deployController.ts Deploy controller
Components 28
Web panel
- Web panel
frontend/dashboard.html - Frontend API client
frontend/js/api.js
API and management
- Express application
src/app.ts - App routes
src/routes/appRoutes.ts - Auth routes
src/routes/authRoutes.ts - User routes
src/routes/userRoutes.ts - App controller
src/controllers/appController.ts - Deploy controller
src/controllers/deployController.ts - Environment controller
src/controllers/envController.ts - Auth controller
src/controllers/authController.ts - User controller
src/controllers/userController.ts - App service
src/services/appService.ts - Auth service
src/services/authService.ts - Environment service
src/services/envService.ts - Study mode
src/services/studyModeService.ts - GitHub webhook utilities
src/utils/githubWebhook.ts
Platform state
- PostgreSQL database
prisma/schema.prisma - Redis
src/config/redis.ts
Deployment runtime
- Deploy queue
src/queues/deployQueue.ts - Deploy worker
src/workers/deployWorker.ts - Docker provider
src/services/deployment/dockerProvider.ts - Provider interface
src/services/deployment/deploymentProvider.ts - Deploy log service
src/services/deployLogService.ts - Dockerfile utilities
src/utils/dockerfile.ts - Command log runner
src/utils/runCommandWithLogs.ts
External systems
- GitHub
- Docker engine
Other components
- Operator
Connections 38
- Operator → Web panel: uses
- Web panel → Frontend API client: requests
- Frontend API client → Express application: calls API
- Express application → App routes: mounts
- Express application → Auth routes: mounts
- Express application → User routes: mounts
- App routes → App controller: dispatches
- App routes → Deploy controller: dispatches
- App routes → Environment controller: dispatches
- Auth routes → Auth controller: dispatches
- User routes → User controller: dispatches
- App controller → App service: calls
- App controller → PostgreSQL database: reads/writes
- App controller → Deploy queue: enqueues
- Deploy controller → PostgreSQL database: reads/writes
- Deploy controller → Deploy queue: enqueues
- Deploy controller → Deploy log service: records/fetches
- Deploy controller → Docker provider: stops container
- Environment controller → PostgreSQL database: checks ownership
- Environment controller → Environment service: calls
- Auth controller → Auth service: calls
- Auth service → PostgreSQL database: reads user
- User controller → PostgreSQL database: reads profile
- Express application → GitHub webhook utilities: validates webhook
- Express application → PostgreSQL database: matches app; records deploy
- Express application → Deploy queue: enqueues webhook deploy
- Express application → GitHub: receives push webhook
- Deploy queue → Redis: stores jobs
- Deploy worker → Deploy queue: consumes jobs
- Deploy worker → PostgreSQL database: reads/writes deploy state
- Deploy worker → Deploy log service: records progress
- Deploy worker → Command log runner: runs logged commands
- Deploy worker → Dockerfile utilities: prepares build input
- Deploy worker → GitHub: clones repository
- Deploy worker → Docker engine: builds and runs containers
- Docker provider → Docker engine: controls containers
- Docker provider → Provider interface: implements
- Deploy log service → PostgreSQL database: stores logs