No description
Find a file
2026-03-10 16:47:43 +01:00
migrations major name change 2026-02-27 23:52:39 +01:00
src wip 2026-03-05 18:39:08 +01:00
.gitignore initial 2026-02-19 15:41:05 +01:00
build.rs adding protobuf integration 2026-03-03 15:50:29 +01:00
Cargo.lock wip 2026-03-05 18:39:08 +01:00
Cargo.toml wip 2026-03-05 18:39:08 +01:00
example.env example.env + dynamic login url 2026-02-23 07:47:39 +01:00
README.md readme: notes about migrations 2026-03-10 16:47:43 +01:00

Navak backend

Navak server

Quick Start

  1. clone this repo
  2. clone navak-proto in the same parent directory:
navak
├── navak-backend
└── navak-proto
  1. copy example.env to .env and modify contents (see below)
  2. in this repo, run cargo run

Environment

DATABASE_CONNECTION_STRING="host=W dbname=X user=Y password='Z'"
The PostgreSQL connection data

SMTP_RELAY=example.eu
The email server host

SMTP_USERNAME=exampleuser
The email server user

SMTP_PASSWORD=mypassword
The email server password

SMTP_SENDER_EMAIL=navak@example.eu
The sender's email address

NAVAK_HOST=0.0.0.0
The host this server is listening to

NAVAK_PORT=3000
the port this server is listening to

NAVAK_PUBLIC_URL=https://example.eu
the public URL of this server (used for links in login emails)

Components

Migrations

The migrations directory contains database migrations, with each file being a transaction.

The migrations_manager.rs includes all the migrations at compile time, and apply them at runtime. Already applied migrations are ignored.

Notes:

  • migrations are applied in alphabetical order
  • a migration must not be modified after it has been applied
    • or the modification won't be applied
  • a migration filename must not be modified after it has been applied
    • or it will be applied again (and will probably fail)

Inter-Socket communication

(wip) The ISC component holds a link to all connected clients. It's the hub allowing messages to flow from the sender to the receivers in real-time.