A robust RESTful API service that enables authenticated users to monitor URLs and receive comprehensive uptime reports including availability metrics, response times, and uptime/downtime statistics.
- User Authentication: Secure JWT-based authentication system
- URL Monitoring: Track the status of multiple endpoints simultaneously
- Detailed Reports: Get insights on:
- Availability percentage
- Average response time
- Total uptime/downtime
- Historical performance data
- API Documentation: Complete Swagger documentation
- Scalable Architecture: Designed for horizontal scaling
- Backend: Node.js with Express.js
- Database: PostgreSQL with JSONB support
- ORM: Knex.js with Objection.js
- Authentication: JWT (JSON Web Tokens)
- Documentation: Swagger
- Testing: Jest
- Monitoring Engine: Custom-forked ping-monitor package
- Containerization: Docker
- Node.js (v14+)
- PostgreSQL
- Docker (optional)
-
Clone the repository:
git clone <repository-url> cd uptime-monitoring
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env # Edit .env with your configuration
-
Run database migrations:
npx knex migrate:latest
-
Start the server:
npm start
The API will be available at http://localhost:<PORT>
(default: 3000)
Once the server is running, access the Swagger documentation at:
http://localhost:<PORT>/api-docs
Run the test suite:
npm test
- Custom Fork: Enhanced the ping-monitor package to meet project requirements
- Cursor Pagination: Implemented efficient data retrieval for large datasets
- Event-Driven Architecture: Leveraged Node.js events for asynchronous monitoring
- JSONB Optimization: Utilized PostgreSQL's JSONB capabilities for flexible data storage
- Deep dive into Node.js ecosystem and best practices
- Swagger API documentation implementation
- Advanced PostgreSQL features including JSONB types and indexing
- Package forking and contribution workflow
- Asynchronous programming patterns in Node.js
- Comparative analysis between Node.js and other backend technologies (PHP, Go)
- TypeScript migration for improved type safety
- Dependency injection pattern implementation
- Enhanced error handling with stack traces
- Comprehensive logging system
- Kubernetes deployment for auto-scaling
- Distributed monitoring architecture for large-scale operations
- Expanded test coverage with integration and load testing
- ACL implementation with objection-authorize
- Code refactoring for improved abstraction
- Custom JWT implementation (2 years ago)
- Basic CRUD applications (3 years ago)
- Next.js and Vue.js tutorials (3 years ago)
This project was developed as part of a backend assessment, demonstrating proficiency in building scalable monitoring solutions with Node.js.