Skip to content

About

A map-based travel bucket list

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

questmark.app

A map-based travel bucket list. Pin places you want to go, track where you have been, and share lists with other people.

  • backend/ - Express + TypeScript + Drizzle ORM + Postgres, with Redis for caching and rate limiting.
  • frontend/ - SvelteKit 5 (runes) + Tailwind + Leaflet, deployed as a Cloudflare Worker.

Requirements

  • Node.js 22 or newer
  • Docker (only for the backend test suite, which starts its own Postgres/Redis)
  • Postgres and Redis for local development (docker run examples below)

Getting started

npm install

1. Backend

Copy the example environment file and adjust it:

cp backend/.env.example backend/.env

Only DATABASE_URL, REDIS_URL and JWT_SECRET are needed to boot. Fill in AUTHENTIK_* to be able to sign in, and the AWS_*/GEOAPIFY_API_KEY values for image uploads and place search (see the comments in the file).

Start Postgres and Redis if you don't already have them:

docker run --rm -d --name want-to-go-pg -p 5432:5432 \
  -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=want_to_go postgres:16
docker run --rm -d --name want-to-go-redis -p 6379:6379 redis:7.2-alpine

Apply the database migrations, then start the API:

npm run db:migrate --workspace backend
npm run dev:backend

The API listens on http://localhost:3001; GET /health should return {"ok":true}.

2. Frontend

npm run dev:frontend

The app is served at http://localhost:5173. It talks to http://localhost:3001 by default; copy frontend/.env.example to frontend/.env only if you need to change that or set a CARTO map key.

Signing in

Sign-in is OAuth via Authentik. Without valid AUTHENTIK_* settings the app still runs, but the "Sign in" button will fail. For local development you can bypass it: the session is a plain JWT in localStorage under want-to-go.auth-token, signed with JWT_SECRET, so you can mint one and paste it in. See backend/src/lib/auth.ts:

jwt.sign({ userId: "<uuid of a row in users>", username: "demo" }, JWT_SECRET, {
  expiresIn: "30d",
});

Commands

Command What it does
npm run dev:backend Backend with reload on change
npm run dev:frontend Vite dev server for the frontend
npm run build:backend Type-check and compile the backend
npm run build:frontend Production build (Cloudflare adapter)
npm run check:backend tsc --noEmit
npm run check:frontend svelte-check
npm run test --workspace backend Backend test suite (starts Dockerized Postgres + Redis)
npm run db:migrate --workspace backend Apply pending migrations
npm run db:generate --workspace backend Generate a migration after editing backend/src/db/schema.ts

Notes

  • Sessions last 30 days. While the app is open, the frontend renews the token in the background a day before it expires (POST /auth/refresh), so active users stay signed in without re-authenticating. Once expired, a full OAuth login is required.
  • backend/drizzle/meta/_journal.json is required for both db:migrate and the test suite and is committed. The per-migration snapshot files are not, so db:generate has no baseline to diff against. When you change the schema, generate the migration and check the output does not try to recreate existing tables.

About

A map-based travel bucket list

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages