Skip to content

Server Overview

This project consists of several interconnected components that must be deployed and configured together on a server to function correctly:

  • Database – PostgreSQL
  • Backend/API – NestJS
  • Frontend – Vue + Nuxt

This page provides a brief structural overview and basic setup instructions. See the linked component pages for more detailed information.


Database

The database runs on PostgreSQL. Install it on your server by following this guide, then restore the database from the provided dump:

pg_restore -U <username> -d <database_name> server/pg.dump

Note: <username> and <database_name> refer to your PostgreSQL installation credentials.

The restored database includes an admin account and API key to get you started. Some additional configuration is still required — please review the database page before proceeding.


API / Backend

The backend is built with NestJS. For in-depth documentation on its architecture and internals, see the backend overview page. For a step-by-step deployment guide, see the backend setup page.

Before deploying, make sure to configure the required environment variables. An example can be found in .env.example in the project root.


Frontend

The frontend is built with Vue and Nuxt. For implementation details, see the frontend pages.

Under normal circumstances, the frontend requires minimal setup and should work out of the box after following the deployment steps below. See the frontend page if you run into issues.


General Deployment

Once the database is configured and the backend environment variables are in order, you're ready to deploy.

Prerequisites:

Run the deployment script from the project root:

bash server/server_deployment.sh

This will build and deploy both the backend and frontend. Default ports:

  • Backend: 3000
  • Frontend: 3001

Nginx

Use the provided Nginx config to make the services publicly accessible:

sudo cp server/nginx_config /etc/nginx/sites-enabled/<your-name>

You can also write your own config if preferred. The provided one includes:

  • API – LAN-only, accessible under /api
  • Frontend – served over HTTP and HTTPS under /archive
  • Admin page – IP-locked to LAN, accessible under /admin
  • Root redirect/ automatically redirects to /archive

HTTPS / SSL

To enable HTTPS, obtain a certificate via Certbot:

sudo certbot --nginx -d <your-domain>

Certbot can update your Nginx config automatically, or you can add the certificate details manually.