How shwetamore2810/cloud-monitoring-platform works
This repository implements a server-monitoring web application: users authenticate, manage saved servers, fetch live CPU, memory, disk, and load metrics over SSH, and view current and historical results. The frontend also includes a public-facing landing experience. The excerpts show the backend routes, database access, authentication setup, and frontend routing; several page-to-API links are supported by the SOURCE INDEX, while unsampled implementations are represented only at their known paths.
Main entry points: App.jsx Application routes · server.js HTTP API server · Servers.jsx Server management · api.js API client
Components 21
Web application
- Application routes
frontend/src/App.jsx - API client
frontend/src/api.js - Landing experience
frontend/src/pages/LandingPage.jsx
Identity
- Auth state
frontend/src/AuthProvider.jsx - Login and registration
frontend/src/pages/Login.jsx - Account settings
frontend/src/pages/Accounts.jsx - Authentication routes
backend/routes/auth.js - Token authentication
backend/middleware/authenticate.js
Monitoring
- Server management
frontend/src/pages/Servers.jsx - Add server
frontend/src/components/AddServer.jsx - Server list
frontend/src/components/ServersTable.jsx - Live metrics state
frontend/src/context/MetricsContext.jsx - Operations dashboard
frontend/src/pages/Dashboard.jsx - Metrics history
frontend/src/pages/MetricsHistory.jsx - Server routes
backend/routes/servers.js - Metrics collection and history
backend/routes/metrics.js
Backend service
- HTTP API server
backend/server.js
Persistence
- Database client
backend/db.js - PostgreSQL
Other components
- User
- Monitored servers
Connections 28
- User → Application routes: uses
- Application routes → Auth state: provides auth
frontend/src/App.jsx - Application routes → Live metrics state: provides metrics state
frontend/src/App.jsx - Application routes → Login and registration: routes to
frontend/src/App.jsx - Application routes → Account settings: routes to
frontend/src/App.jsx - Application routes → Landing experience: routes to
frontend/src/App.jsx - Application routes → Operations dashboard: routes to
frontend/src/App.jsx - Application routes → Metrics history: routes to
frontend/src/App.jsx - Application routes → Server management: routes to
frontend/src/App.jsx - Login and registration → API client: calls
frontend/src/pages/Login.jsx - Login and registration → Auth state: updates
frontend/src/pages/Login.jsx - Account settings → Auth state: reads
frontend/src/pages/Accounts.jsx - Server management → API client: calls
frontend/src/pages/Servers.jsx - Server management → Add server: renders
frontend/src/pages/Servers.jsx - Server management → Server list: renders
frontend/src/pages/Servers.jsx - Metrics history → API client: calls
frontend/src/pages/MetricsHistory.jsx - Operations dashboard → Live metrics state: uses state
- API client → HTTP API server: sends API requests
frontend/src/api.js - HTTP API server → Authentication routes: mounts
backend/server.js - HTTP API server → Server routes: mounts
backend/server.js - HTTP API server → Metrics collection and history: mounts
backend/server.js - HTTP API server → Token authentication: guards routes
backend/server.js - Authentication routes → Database client: queries
backend/routes/auth.js - Server routes → Database client: queries
backend/routes/servers.js - Metrics collection and history → Database client: queries
backend/routes/metrics.js - Metrics collection and history → Monitored servers: collects metrics
backend/routes/metrics.js - Database client → PostgreSQL: queries
backend/db.js - Authentication routes → User: authenticates