Requirements
Damvia is a Node.js server, a static single-page client, and three services it depends on. This page lists what to have ready; Local setup walks through running it on one machine, and Deployment through running it for real.
Runtime
Section titled “Runtime”| Requirement | Version | Why |
|---|---|---|
| Node.js | 20 | The server/Dockerfile builds on node:20. The client builds on the same. |
| npm | ships with Node | Both packages install with npm install. There is no monorepo tool; client/ depends on server/ through "server": "file:../server" for shared tRPC types, so install the server first. |
| Git | any | The client’s file: dependency and the docs workflow assume a clone, not a tarball. |
Services
Section titled “Services”| Service | Version | Notes |
|---|---|---|
| PostgreSQL | 15 | The only stateful store you must back up. pg-boss (the job queue) lives in the same database. The initial migration seeds one group (Default) and one region (Global). |
| S3-compatible object storage | MinIO or AWS S3 | Two buckets: one for app uploads (thumbnails, login background), one for asset originals, previews and download archives. Browsers talk to it directly through presigned URLs, so it must be reachable from users, not only from the server. See Object storage. |
| SMTP server | any | Every account flow (verification, approval, magic link, password reset, invitations, “download ready”) is an email. Postmark is the provider the code is tuned for. See SMTP. |
server/docker-compose.yml starts all three for development (Postgres 15, MinIO, MailHog).
A cloud storage the assets already live in
Section titled “A cloud storage the assets already live in”Damvia does not host uploads. It mirrors one of:
| Provider | What you need |
|---|---|
| Dropbox (personal or Business) | A Dropbox app with a refresh token. For a Business team space, DROPBOX_USE_TEAM_ROOT=true. See Dropbox. |
| OneDrive for Business | An Azure app registration with application permissions on Microsoft Graph, and the user whose drive to sync. See OneDrive. |
Exactly one provider is active per instance (ASSET_UPDATER).
System packages for previews
Section titled “System packages for previews”Thumbnails are generated on the server, per file family, by external tools. Without them, files sync but show a placeholder.
| Package | Used for |
|---|---|
ffmpeg (with ffprobe) |
Video thumbnails and transcoding downloads to MP4 or WebM. |
ghostscript |
PDF, EPS and AI previews. |
libreoffice |
Office and text document previews (doc, docx, xls, xlsx, ppt, pptx, odt, ods, odp, rtf, txt, csv, md, html, …). |
imagemagick |
Image conversions that sharp does not handle. |
coreutils |
Listed in the Dockerfile for the shell helpers the pipeline calls. |
The exact install line from server/Dockerfile:
apt-get install -y ffmpeg ghostscript libreoffice coreutils imagemagickImages (jpg, png, gif, bmp, webp, tiff, svg, psd) go through sharp, which is bundled with the Node dependencies. Fonts (ttf, otf) are rendered to a specimen thumbnail without extra packages.
Sizing
Section titled “Sizing”- The server keeps the full listing of the cloud storage in memory during each 5-minute sync, and downloads each file once to a temp directory before uploading it to S3. Give it disk in the temp directory at least as large as your biggest asset, plus room for a 10 GB download archive.
- LibreOffice conversions are the heaviest step; a small instance handles them, but expect the first sync of a large library to take hours.
- One API process is enough for most teams. Running several is possible but the cloud sync runs in each of them; see Worker and scaling.