Files
Synapsis/HOW_TO_WORK_ON_SYNAPIS.md
T
cyph3rasi 21258edd95 Replace PostgreSQL and Docker deployment with embedded Turso, Drizzle relational queries v2, native systemd deployment on port 43821, and fresh SQLite migrations.
Hop-State: A_06FP5KEDBTB4A9ZT7QB498G
Hop-Proposal: R_06FP5KDWMCKVVMQZT4MVZ28
Hop-Task: T_06FP5DZ7T0G45FG93PT90B8
Hop-Attempt: AT_06FP5DZ7T0PKQW99V27JCV8
2026-07-14 15:44:42 -07:00

991 B

Working on Synapsis

Synapsis uses an embedded Turso database and runs as a native Node.js process. Docker and a local PostgreSQL server are not part of the development or deployment workflow.

Local loop

npm install
cp .env.example .env
npm run db:migrate
npm run dev

Before handing off a change:

npm run type-check
npm test
npm run build

When the schema changes, edit src/db/schema.ts, generate a migration with npm run db:generate, and verify it against a fresh database:

DATABASE_PATH=/tmp/synapsis-test.db npm run db:migrate

VPS workflow

Production runs through synapsis.service, listening on 127.0.0.1:43821. Reverse-proxy configuration belongs to the host operator.

sudo /opt/synapsis/deploy/update.sh
sudo systemctl status synapsis
sudo journalctl -u synapsis -f

The updater makes a timestamped database backup, pulls with --ff-only, installs dependencies, runs migrations, builds, and restarts the service.