woodp/notifications

★ 0Forks 0TypeScriptGitHub ↗Compare

README

Notifications Challenge - Gila Software

Backend Instructions

Prerequisites

  • node version 20.9.0
  • docker

The backend is in folder api/notifications-api.

  1. Rename "env.example" file to ".env" and set POSTGRES_USER, POSTGRES_PASSWORD. The last variable sets the password for the "test" user for authentication purposes.

  2. Run docker compose up to start the database:

docker compose up -d
  1. Install dependencies:
npm install
  1. Run the migrations (ensure database is up before running):
npm run migration:up
  1. Seed the database with the 3 categories mentioned in the challenge and 2 users suscribed to different categories and channels for testing purposes (ensure the database is up and migrations have been run):
npm run seed
  1. To run the app:
$ npm run start

Test

# unit tests
$ npm run test

Backend documentation

Documentation of the API entpoints can be found at /api/v1/docs (http://localhost:3000/api/v1/docs)

I have used Nest framework.

Frontend instructions

The frontend is in folder ui

  1. Rename "env.example" file to ".env" and ensure VITE_API_URL has the correct URL to the backend API.

  2. Install dependencies:

npm install
  1. To run the app:
$ npm run dev

Contributors

woodp

Issues