How azukaar/cosmos-server works
Cosmos is a self-hosted server manager and secure gateway. A typical user enters the authenticated web UI, selects an operational area, and uses its API client to manage server services. The repository documents app-store installs, containers, routing and SmartShield protections, authentication, storage and remote storage, backups, monitoring, VPN, and scheduled jobs. The graph includes these major product areas, plus shared API handling and server startup. Some backend components are documented or listed in startup wiring but their internal calls were not sampled; those relationships are shown only where supported or marked unverified.
Main entry points: index.go Cosmos server · index.tsx API facade · MainRoutes.jsx Protected routes · App.jsx Cosmos UI
Components 24
Web interface
- Cosmos UI
client/src/App.jsx - Protected routes
client/src/routes/MainRoutes.jsx - Home and app store
client/src/pages/home/index.jsx - Container manager
client/src/pages/servapps/containers/newServiceForm.jsx - Route security UI
client/src/pages/config/routes/routeSecurity.jsx - Monitoring UI
client/src/pages/dashboard/index.jsx
API client
- API facade
client/src/api/index.tsx - Response handling
client/src/api/wrap.ts - Docker API
client/src/api/docker.tsx - Storage API
client/src/api/storage.tsx - Backup API
client/src/api/backup.ts
Server management
- Cosmos server
src/index.go - Authentication
src/user - Container operations
src/docker - App store
src/market - Backups
src/backups - Storage manager
src/storage - Scheduled jobs
src/cron - Monitoring and alerts
src/metrics - VPN and constellation
src/constellation
Gateway and platform
- Reverse proxy
src/proxy - Route configuration
src/configapi/routes.go
Other components
- Server operator
- Restic
Connections 26
- Server operator → Cosmos UI: uses
- Cosmos UI → Protected routes: loads routes
client/src/App.jsx - Protected routes → Home and app store: routes to
client/src/routes/MainRoutes.jsx - Protected routes → Container manager: routes to
client/src/routes/MainRoutes.jsx - Protected routes → Route security UI: routes to
client/src/routes/MainRoutes.jsx - Protected routes → Monitoring UI: routes to
client/src/routes/MainRoutes.jsx - Home and app store → API facade: uses API
- Container manager → API facade: uses API
client/src/pages/servapps/containers/newServiceForm.jsx - Route security UI → API facade: uses API
client/src/pages/config/routes/routeSecurity.jsx - API facade → Response handling: wraps responses
client/src/api/index.tsx - API facade → Docker API: creates client
client/src/api/index.tsx - API facade → Storage API: creates client
client/src/api/index.tsx - API facade → Backup API: creates client
client/src/api/index.tsx - API facade → Cosmos server: sends API requests
- Cosmos server → Container operations: initializes
src/index.go - Cosmos server → App store: initializes
src/index.go - Cosmos server → Backups: initializes
src/index.go - Cosmos server → Storage manager: initializes
src/index.go - Cosmos server → Scheduled jobs: initializes
src/index.go - Cosmos server → Monitoring and alerts: initializes
src/index.go - Cosmos server → VPN and constellation: initializes
src/index.go - Cosmos server → Reverse proxy: initializes
src/index.go - Cosmos server → Authentication: initializes
- Cosmos server → Route configuration: serves routes
- Route configuration → Reverse proxy: configures routes
- Backups → Restic: uses