Skip to content

Repository files navigation

Mota

React and NestJS application for checking the next Seoul bus or subway arrivals.

Workspaces

Workspace Purpose
apps/web React 19, Vite, Leaflet, PWA
apps/api NestJS 11, Fastify, auth-gateway login proxy and JWKS verification
packages/contracts Shared Zod contracts
packages/db Drizzle ORM, PostgreSQL migration and settings repository

Development

pnpm install
pnpm dev:web
pnpm dev:api

The API requires the mota database managed by ../home-server-infra. Copy .env.example to .env and set the database password used by the dedicated mota role.

Verification

pnpm typecheck
pnpm check
pnpm test
pnpm test:integration
pnpm build

Database

pnpm db:generate
pnpm db:migrate
pnpm db:studio

Mota stores only user_settings. User identity is the Supabase sub claim verified from mota's own login; there is no local user table.

Docker

Load the shared PostgreSQL password from home-server-infra:

docker compose --env-file ../home-server-infra/.env up -d --build

The production Seoul subway API key is stored in macOS Keychain under account mota and service SEOUL_SUBWAY_API_KEY. Login shells export it from ~/.zshrc. For non-interactive deployment, inject it without writing the key to a file:

SEOUL_SUBWAY_API_KEY="$(security find-generic-password -a mota -s SEOUL_SUBWAY_API_KEY -w)" \
  docker compose --env-file ../home-server-infra/.env up -d --build

The service is published at 127.0.0.1:3100 and joins both the cloudflare-tunnel and home-server networks.

About

Map-based Seoul commute bus stop picker and live arrivals web app

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages