Skip to content

Watch site is an uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about their availability, average response time, and total uptime/downtime built using NestJs

Notifications You must be signed in to change notification settings

arxiver/watch-site

Repository files navigation

Watch-site

Watch site is an uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about their availability, average response time, and total uptime/downtime in a given period of time.

Context:

  • Signup with email verification.
  • CRUD operations for URL checks (GET, PUT and DELETE can be called only by the user user who created the check).
  • Authenticated users can receive a notification whenever one of their URLs goes down or up again:
    • Email.
    • Webhook (optional).
  • Authenticated users can get detailed uptime reports about their URLs availability, average response time, and total uptime/downtime.

VISIT: TASK.md FOR MORE DETAILS

System design diagram

system-design

API

api-docs


VISIT: API.md FOR MORE DETAILS

Installation

$ npm install --legacy-peer-deps

Database Setup

  1. Make sure you are having mongodb installed on your machine or in cloud & running server.
  2. Configure the mongodb connection string in config/env/dev.env file.

Make sure to configure all the environment variables in config/env/dev.env file.

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

Tests are not yet implemented but the test strategy is as follows:

  • Unit tests for all the services and controllers.
  • Create a mock-server for testing the DOWNS/UPS notifications.
# unit tests
$ npm run test

# test coverage
$ npm run test:cov

Stack

  • Backend Framework: NodeJS (v18)
  • Language: TypeScript
  • Server Framework: NestJS
  • Database: Mongodb
  • Testing Framework: JestJS
  • API Documentation: Swagger

TODO

  • Dockerization
  • unit testing
  • e2e testing

About

Watch site is an uptime monitoring RESTful API server that allows authenticated users to monitor URLs, and get detailed uptime reports about their availability, average response time, and total uptime/downtime built using NestJs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published