Rest API Gateway built with NestJS for the Melodía application.
The application is deployed on Heroku and accessible at: https://melodia-gateway-2b9807728e9a.herokuapp.com/.
This API Gateway serves as the central entry point for the Melodía platform, providing:
- Firebase Authentication: Secure JWT-based authentication using Firebase Admin SDK
- Request/Response Interceptors: Standardized API responses and error handling
- Production Monitoring: Comprehensive logging and error tracking
The gateway follows a modular microservices architecture pattern:
- API Gateway Layer: Routes and validates incoming requests
- Authentication Layer: Firebase-based JWT verification
The gateway integrates with the following external services:
- Users Service: https://backend-user-service-a01239c9445a.herokuapp.com
- Songs Service: https://melodia-songs-service-f31b1c1f9a24.herokuapp.com
- Artists Service: https://melodia-artists-64869ccb2e15.herokuapp.com
- Playlists Service: https://backend-playlist-service-4afcaf66ff1a.herokuapp.com
- Metrics Service: https://melodia-metrics-e9ca6dea743b.herokuapp.com
- Notifications Service: https://melodia-notification-service-4211bca82b5a.herokuapp.com
- Node.js (v22.x)
- npm or yarn
- Redis (for caching)
PORT=3000
REDIS_URL=redis://localhost:6379
# Service URLs
USERS_SERVICE_URL=...
SONGS_SERVICE_URL=...
ARTISTS_SERVICE_URL=...
PLAYLISTS_SERVICE_URL=...
METRICS_SERVICE_URL=...
NOTIFICATIONS_SERVICE_URL=...
# Firebase
FIREBASE_PROJECT_ID=...
# Other configs as needed$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:covFor comprehensive API documentation, including all endpoints, request/response schemas, and interactive testing, visit our Swagger documentation:
Comprehensive test coverage tracked automatically via Codecov:
View Detailed Coverage Report & Interactive Graphs
- NestJS: Modern Node.js framework with TypeScript support
- Firebase Admin SDK: Authentication and user management
- Axios: HTTP client for external API integration
- Redis: Caching layer
- Jest: Testing framework with mocking capabilities
- ESLint: Code quality and style enforcement
- TypeScript: Type safety and enhanced developer experience