Back to the catalog

Files

Bundle OKF 0.2 · 7 conceitos · m16khb-org/mota

Open source Repository Open in the app JSON README (API)

About

# Files

- [Mota Quickstart](quickstart.md) - Entry point into mota and this wiki — what the four-workspace monorepo contains, the minimal install/run/verify command set, the environment the API needs (the mota Postgres database and the home-server-infra secret file), and a task-to-page routing map to the page that covers each kind of change.

# Directories

- [architecture](architecture/)
- [concepts](concepts/)
- [integrations](integrations/)
- [operations](operations/)
- [testing](testing/)
- [workflows](workflows/)

Details

Kind
OKF bundles
Topic
Databases
Publisher
m16khb-org
Origin
okf_github
Category
dados
Version
0.2
Open pull requests
1
Last push
2026-09-08T11:42:44Z
Repository state
ativo
Language
TypeScript
Added
2026-09-08 09:05:43
Updated
2026-09-08 09:05:43
Origin id
m16khb-org/mota:openwiki/index.md

README

# 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

```bash
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

```bash
pnpm typecheck
pnpm check
pnpm test
pnpm test:integration
pnpm build
```

## Database

```bash
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:

```bash
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:

```bash
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.

More