···30303131To enable indexed search in the client, set `VITE_TWISTER_API_BASE_URL` in `apps/twisted/.env`.
32323333+## Run Locally
3434+3535+Install dependencies once from the repo root:
3636+3737+```bash
3838+pnpm install
3939+```
4040+4141+Start the Ionic/Vite app:
4242+4343+```bash
4444+pnpm dev
4545+# or: just dev
4646+```
4747+4848+That serves the client from `apps/twisted` with Vite.
4949+5050+To run the Go API locally, make sure `packages/api/.env` has at least:
5151+5252+- `TURSO_DATABASE_URL`
5353+- `TURSO_AUTH_TOKEN`
5454+5555+Then start the API:
5656+5757+```bash
5858+pnpm api:run:api
5959+# or: just api-dev
6060+```
6161+6262+This serves the API and search site on `http://localhost:8080`.
6363+6464+To run the indexer as well, `packages/api/.env` also needs:
6565+6666+- `TAP_URL`
6767+- `TAP_AUTH_PASSWORD`
6868+- `INDEXED_COLLECTIONS`
6969+7070+Then start the indexer in a separate terminal:
7171+7272+```bash
7373+pnpm api:run:indexer
7474+# or: just api-run-indexer
7575+```
7676+7777+Typical local setup is three terminals:
7878+7979+1. `pnpm dev`
8080+2. `pnpm api:run:api`
8181+3. `pnpm api:run:indexer`
8282+8383+If you want the app to call the local API, set this in `apps/twisted/.env`:
8484+8585+```bash
8686+VITE_TWISTER_API_BASE_URL=http://localhost:8080
8787+```
8888+3389## Infrastructure Setup
34903591### Turso
+9
packages/api/internal/normalize/normalize.go
···108108 return ""
109109}
110110111111+func firstString(m map[string]any, keys ...string) string {
112112+ for _, key := range keys {
113113+ if v := str(m, key); v != "" {
114114+ return v
115115+ }
116116+ }
117117+ return ""
118118+}
119119+111120// nestedMap safely extracts a nested map[string]any from a map.
112121func nestedMap(m map[string]any, key string) map[string]any {
113122 if v, ok := m[key]; ok {