Garuda API Radar is a comprehensive API monitoring and alerting system designed to help you track your APIs' performance and availability in real time. This project provides a robust backend built with Node.js, Express, and MongoDB, along with various utilities and services to ensure your APIs are always up and running.
Garuda is a multi-service platform, and this repo serves as the core backend. Below are the other services in the ecosystem:
| Service | Description | Repo Link |
|---|---|---|
| Garuda API (Backend) | Main backend handling API monitoring and data processing | ๐ Garuda API |
| Garuda UI (Frontend) | Web dashboard for real-time API analytics | ๐ Garuda UI |
| Garuda Caching Service | Redis-based caching layer for optimized monitoring | ๐ Garuda Caching |
| API Radar | NPM package for auto-collecting API health metrics | ๐ API Radar |
โ
Real-time API monitoring โ Track uptime, response time & availability
โ
Incident detection & alerting โ Get alerts via email when APIs fail
โ
Secure API key management โ Protect APIs with unique keys
โ
User authentication & authorization โ Secure login & access control
โ
Project & API tracking โ Manage multiple projects efficiently
โ
Detailed analytics & reporting โ Get insights into API performance
- Backend: Node.js, Express.js
- Database: MongoDB, Redis
- Messaging & Streaming: Kafka, RabbitMQ
- Frontend: React.js (UI repo linked above)
-
Clone the repository:
git clone https://github.com/yourusername/garuda-api-radar.git cd garuda-api-radar -
Install dependencies:
npm install
-
Create a
.envfile in the root directory and add the following environment variables:DB_CONNECTION_STRING=your_mongodb_connection_string PORT=4000 JWT_SECRET=your_jwt_secret JWT_EXPIRY=7d COOKIE_TIME=7 EMAIL_FROM=your_email@example.com EMAIL_AUTH_TOKEN=your_email_auth_token
-
Start the server:
npm start
The application uses environment variables for configuration. Ensure you have a .env file with the necessary variables as shown in the installation section.
To run the application in development mode:
npm run devTo run the application in production mode:
npm start- Endpoint:
/api/v1/signup - Method:
POST - Description: Register a new user.
- Request Body:
{ "username": "john_doe", "emailId": "john@example.com", "phoneNumber": "1234567890", "companyName": "Example Inc", "password": "password123" } - Response:
{ "success": true, "token": "jwt_token", "user": { "username": "john_doe", "emailId": "john@example.com", "phoneNumber": "1234567890", "companyName": "Example Inc" } }
- Endpoint:
/api/v1/signin - Method:
POST - Description: Authenticate a user.
- Request Body:
{ "email": "john@example.com", "password": "password123" } - Response:
{ "success": true, "token": "jwt_token", "user": { "username": "john_doe", "emailId": "john@example.com", "phoneNumber": "1234567890", "companyName": "Example Inc" } }
- Endpoint:
/api/v1/project/create - Method:
POST - Description: Create a new project.
- Request Body:
{ "userId": "user_id", "projectName": "New Project" } - Response:
{ "message": "Project Created successfully!", "project": { "projectName": "New Project", "customer": "user_id" } }
- Endpoint:
/api/v1/project/createapikey - Method:
POST - Description: Generate an API key for a project.
- Request Body:
{ "userId": "user_id", "projectId": "project_id" } - Response:
{ "message": "API Key for project Created!", "apiKey": "generated_api_key" }
- Endpoint:
/api/v1/radar/monitorapi - Method:
POST - Description: Process API hits and onboard APIs.
- Request Body:
{ "projectId": "project_id", "method": "POST", "path": "/api/v1/signin", "headers": { "content-type": "application/json" }, "statusCode": 200, "responseTime": "266.686 ms" } - Response:
{ "message": "Hit Recorded!" }
- Endpoint:
/api/v1/project/report - Method:
POST - Description: Get a cumulative report for a project.
- Request Body:
{ "projectId": "project_id" } - Response:
{ "message": "Project Report Generated Successfully!", "projectReport": { "project": { "projectName": "New Project", "customer": "user_id" }, "totalApisCount": 5, "totalIncidentsReported": 2, "overAllStatusCode": 200, "projectAge": "2 days ago", "onCallPerson": "John Doe", "apiHitsReport": [ { "date": "2023-10-01", "hits": 100 } ], "statusSummaryArray": [ { "name": "Success", "value": 90 } ], "totalApisForProject": [ { "apiEndPoint": "/api/v1/signin", "apiMethod": "POST" } ] } }
We welcome contributions to Garuda API Radar! Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit them (
git commit -m 'Add new feature'). - Push to the branch (
git push origin feature-branch). - Create a pull request.
Please adhere to the Contributor Covenant Code of Conduct when contributing to this project.
This project is licensed under the MIT License. See the LICENSE file for details.