Skip to content

Latest commit

 

History

History

server

RssDT API Server

General architecture

image

  • HTTP GraphQL API Server ./src/index.ts
  • Feed Parser ./src/feed-parser/
  • BullMQ-based microservices:
    • Mail Worker ./src/mail/
    • Feed Watcher./src/feed-watcher/

External tools and services:

  • PostgreSQL
  • Redis (Valkey) as a cache storage for sessions, rate limits and as a message broker for BullMQ
  • besticon (go-based favicon service)

Usage

Development

Prerequisites:

  1. Redis (Valkey) and Postgres need to be installed and running.

The easiest way to do this is by using Docker Compose:

docker-compose -f docker-compose-dev.yml up
# or
npm run start:docker-dev
  1. Create Postgres Database, for example:
createdb rssdt_dev
# or to create in the docker container
createdb -h localhost rssdt_dev
  1. Create and edit the .env file in the root directory of the server. For reference, see .env.example.

  2. To create necessary database structure using Drizzle Kit:

npm run build
npm run migrate

Launch commands

npm run watch # compile TypeScript into /dist and watch for changes
npm run dev # start server and mail worker in development mode
npm run feed-watcher:dev # start feed-watcher worker

Local Mail server

To test sending emails, you can use a local email server, such as MailHog. It also included in development Docker Compose file, with a default address for the web interface at http://localhost:8025.