A full-stack application for monitoring APIs, detecting anomalies, and sending alerts.
- Frontend: Angular 20 (Dashboard)
- Mobile: React Native (Mobile App)
- Backend: Symfony 7 (REST API)
- AI Service: Go (Anomaly Detection)
- Database: PostgreSQL
- Cache: Redis
- Docker & Docker Compose
- Node.js 20+ (for local development)
- PHP 8.3+ (for Symfony, if running locally)
- Go 1.21+ (for AI service, if running locally)
docker-compose up -d| Service | URL | Purpose |
|---|---|---|
| Backend API | http://localhost:8000 | Symfony REST API |
| Web Dashboard | http://localhost:4200 | Angular UI |
| AI Service | http://localhost:8001 | Go anomaly detection |
| PostgreSQL | localhost:5432 | Database |
| Redis | localhost:6379 | Cache |
/pulseapi
├── backend/ → Symfony API (Port 8000)
├── web/ → Angular Dashboard (Port 4200)
├── mobile/ → React Native App
├── ai-service/ → Go AI Service (Port 8001)
├── docker-compose.yml
└── README.md
- Create minimal apps in each language
- Ensure Docker containers start
- Test inter-service communication
- Verify database connections
- Implement API endpoint checking
- Store metrics in database
- Display uptime charts
- Show alert notifications
- Analyze metrics for anomalies
- Predict outages
- Email, Slack, push alerts
docker-compose up -ddocker-compose downdocker-compose logs -f backend
docker-compose logs -f ai-service
docker-compose logs -f web-
Backend (PHP, Symfony):
- Requirements:
php >= 8.3 - Run:
cd backend && php tests/run.php - Notes: DB test skips if
pdo_pgsqlis missing; Redis test skips unlessext-redisis available.
- Requirements:
-
Web (Angular):
- Install:
cd web && npm install - Build check:
npm run build - Unit tests (optional):
npm test(requires Karma + Chrome/Chromium for headless runs)
- Install:
-
Mobile (React Native):
- Install:
cd mobile && npm ci - Run tests:
npm test - Jest is configured to mock static assets and includes testIDs for key containers.
- Install:
-
AI Service (Go):
- Requirements:
go >= 1.21 - Run tests:
cd ai-service && go test ./... - Endpoints
/health,/status, and/api/analyzehave basic coverage.
- Requirements:
docker-compose up -d --build backendOnce running, test each service:
# Backend health
curl http://localhost:8000/api/health
# AI Service health
curl http://localhost:8001/health
# Database connection (from backend logs)
docker-compose logs backend- Monitors: Definitions of APIs to check, including
url,method,expected_status_code,timeout, andcheck_interval. - Metrics: Check results stored per monitor with
status_code,response_time,is_success,error_message, and timestamps. - Uptime Summary: Aggregated uptime metrics per day (success vs total). Computation and persistence are being wired into the checker.
- Alerts: Records of downtime, slow responses, or threshold breaches (planned as part of Stage 2+).
- Health & Status
GET /api/health→ Basic service heartbeatGET /api/status→ Database and Redis connectivity
- Monitors CRUD
GET /api/monitors→ List active monitorsPOST /api/monitors→ Create a monitorGET /api/monitors/{id}→ Monitor detailsPUT /api/monitors/{id}→ Update monitorDELETE /api/monitors/{id}→ Delete monitor
- Metrics
POST /api/monitors/{id}/check→ Manual check and persist metricGET /api/monitors/{id}/metrics→ Recent metrics listGET /api/monitors/{id}/metrics/summary?days=7→ Uptime %, average response time
- Projects (for dashboard listing)
GET /api/projects→ Active monitors mapped to name/status
- Manual: Trigger a check for a monitor using
POST /api/monitors/{id}/check. - Scheduled: Run
php bin/console app:monitor:checkto iterate over active monitors and persist metrics. - Summaries: The
/metrics/summaryendpoint computes uptime and average response over the last N days.
- Dashboard: Shows service health and a projects list mapped from monitors.
- System Status: Displays backend status (DB/Redis connectivity).
- Monitors: Create, list, delete, and manual check monitors.
- Monitor Detail: Displays the monitor metadata, response-time chart (ng2-charts/Chart.js), recent checks, uptime %, and average response time.
- Tabs: Dashboard, Alerts, Settings.
- Dashboard: Fetches backend status from
/api/statusand shows service connectivity. - Alerts & Settings: Placeholder screens ready for Stage 5 integrations.
- Endpoints:
GET /health→ Service heartbeatGET /status→ Static connectivity indicators (to be linked to live checks)POST /api/analyze→ Returns a sample analysis; will integrate with metrics aggregation
- Planned: Metric aggregation, basic statistical anomaly detection, and prediction endpoint.
Monitor: ID (UUID),userId,name,url,method,expectedStatusCode,checkInterval,timeout,isActive, timestamps.Metric: ID (UUID),monitorId,statusCode,responseTime(ms),isSuccess,errorMessage, timestamps.UptimeSummary: DailytotalChecks,successfulChecks,uptimePercentage, timestamps.Alert:monitorId,alertType,severity,message,isResolved, timestamps.
- Stage 2: Persist daily uptime summaries and expose chart-friendly endpoints.
- Stage 3: Advanced charts, historical views, filters.
- Stage 4: Anomaly detection & predictions in the AI service.
- Stage 5: Alerts & notifications (email, Slack, push).
- Project structure created
- Docker Compose setup
- Symfony backend scaffold
- Angular web scaffold
- Go AI service scaffold
- React Native scaffold
- Service connectivity tests
- Core monitoring features