update compose to be coolifyable
This commit is contained in:
@@ -41,6 +41,12 @@
|
||||
## Monorepo
|
||||
- SvelteKit in `frontend/`, Hono in `proxy/`
|
||||
- `pnpm dev` / `pnpm build` at root runs both in parallel
|
||||
- `shared/` at root for code shared across packages, imported as `@shared/*` (path alias):
|
||||
- `shared/config.ts` — service ports (`FRONTEND_PORT`/`PROXY_PORT`/`PB_PORT`)
|
||||
- `shared/timezone.ts` — timezone helpers (imported by frontend routes + proxy/src/index.ts)
|
||||
- `shared/pb/schema.ts` — single source of truth for the PocketBase schema + field builders. Both `proxy/src/migrate.ts` (idempotent bootstrap) and `proxy/scripts/seed.ts` consume `SCHEMA_PLAN`; edit schema there, not in the consumers.
|
||||
- **`@shared/*` alias:** wired per package — proxy via `tsconfig.json` `paths` + esbuild `--alias:@shared=../shared` (tsx reads tsconfig paths); frontend via `kit.alias` in `vite.config.ts` (don't set `paths` in `frontend/tsconfig.json` — SvelteKit warns). In the frontend, import shared files **without** the `.ts` extension (`@shared/timezone`), because `rewriteRelativeImportExtensions` only rewrites relative paths; the proxy keeps `.ts` extensions.
|
||||
- **Shared-file convention:** keep shared code in `shared/` (root), never inside `frontend/` or `proxy/`. SvelteKit never imports `config.ts`.
|
||||
- Decisions tracked in `MEMORY.md`
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Reference in New Issue
Block a user