cazmos repo
  • TypeScript 92.6%
  • Shell 3.2%
  • JavaScript 1.8%
  • PLpgSQL 1.3%
  • Rust 0.5%
  • Other 0.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
sangga f59a6a2446 feat(server): the locale resolver that had no caller
resolveMessageLocale/resolveFormatLocale existed since M0, unit-tested
in isolation, with nothing in apps/server ever calling them. /auth/me
returned the raw users.locale column and the till fell back to a
hardcoded 'id' whenever it was null, so an outlet- or entity-level
i18n.locale setting was silently ignored for the interface language.

identityOf now resolves the full user -> terminal -> outlet -> entity
-> global chain on /auth/login, /auth/pin and /auth/me, and the till
trusts the resolved value instead of re-guessing.
2026-08-05 21:59:52 +07:00
.claude/skills chore(repo): rename the project to Cazsmos 2026-08-02 18:47:24 +07:00
.githooks chore(repo): rename the project to Cazsmos 2026-08-02 18:47:24 +07:00
apps feat(server): the locale resolver that had no caller 2026-08-05 21:59:52 +07:00
docs feat(server): the locale resolver that had no caller 2026-08-05 21:59:52 +07:00
infra feat(infra): the box's edge, and a Forgejo upgrade that has been rehearsed 2026-08-04 19:04:34 +07:00
packages feat(kasir): the scan that lands wherever the cashier left the cursor 2026-08-03 19:04:44 +07:00
scripts feat(infra): the box's edge, and a Forgejo upgrade that has been rehearsed 2026-08-04 19:04:34 +07:00
tools feat(infra): a Zebra you can look at, and the page it reconstructs 2026-08-03 10:48:06 +07:00
.editorconfig chore(repo): initialize repository with scaffold, documentation, and working agreement 2026-07-30 08:51:19 +07:00
.gitignore chore(repo): rename the project to Cazsmos 2026-08-02 18:47:24 +07:00
CLAUDE.md feat(infra): the box's edge, and a Forgejo upgrade that has been rehearsed 2026-08-04 19:04:34 +07:00
LICENSE feat(infra): printer languages, bluetooth, build pipeline, IP protection 2026-08-01 01:05:43 +07:00
package.json feat(infra): the box's edge, and a Forgejo upgrade that has been rehearsed 2026-08-04 19:04:34 +07:00
pnpm-lock.yaml feat(kasir): the signature a shop can open, and the three bugs behind the guard 2026-08-03 15:39:04 +07:00
pnpm-workspace.yaml chore(repo): initialize repository with scaffold, documentation, and working agreement 2026-07-30 08:51:19 +07:00
README.md chore(repo): rename the project to Cazsmos 2026-08-02 18:47:24 +07:00
tsconfig.base.json feat(escpos): the printer that does not speak ESC/POS, in both its dialects 2026-08-03 09:59:20 +07:00
turbo.json feat(infra): the stick, the share, the bucket, and the shift that triggers them 2026-08-03 09:20:23 +07:00

Cazsmos

POS · Inventori · Pembukuan — one system for Indonesian multi-outlet retail and F&B.

Cazsmos runs a retail shop and a café from a single shared catalog and a single double-entry general ledger, with per-outlet and consolidated reporting. The same container image runs on a Raspberry Pi behind the counter or on a cloud server.

┌─────────────┐   ┌─────────────┐   ┌─────────────┐   ┌─────────────┐
│  Kasir      │   │ Backoffice  │   │  Mobile     │   │   KDS       │
│  (Tauri)    │   │  (PWA)      │   │  (Expo)     │   │  (browser)  │
└──────┬──────┘   └──────┬──────┘   └──────┬──────┘   └──────┬──────┘
       └─────────────────┴──── HTTPS + WS ─┴─────────────────┘
                                 │
                      ┌──────────▼──────────┐
                      │   cazsmos-server     │  Hono · Node 22
                      │  ┌───────────────┐  │
                      │  │ posting engine│  │  every business event → journal
                      │  └───────────────┘  │
                      └──────────┬──────────┘
                                 │
                      ┌──────────▼──────────┐
                      │   PostgreSQL 16     │
                      └─────────────────────┘

Status

Pre-M0 — documentation and scaffolding only. See docs/50-roadmap.md.

Quickstart

Requires Docker (or Podman) and Node 22 + pnpm 9.

./scripts/dev-bootstrap.sh   # .env with generated secrets, hooks, deps, stack, seed

That is the whole setup. Afterwards:

pnpm up          # start the stack
pnpm dev:up      # ... with the backoffice container too
pnpm dev:host    # containers for infra, Vite on the host for faster HMR
pnpm logs        # follow the server
pnpm psql        # psql on the dev database
pnpm down

Backoffice at http://localhost:5173, API at http://localhost:3000, OpenAPI at http://localhost:3000/doc, Adminer at http://localhost:8080, virtual receipt printer at http://localhost:9180.

Everything that can run in a container does; only the Tauri till and the Expo app run on the host, because both need hardware a container on macOS cannot reach. See docs/29-dev-environment.md.

Working on Cazsmos

Progress lives in docs/11-features.md — every feature tied to a milestone and a design screen. A row moves to only when a test proves it, and the status update ships in the same commit as the code. pnpm check fails if the docs and reality disagree.

./scripts/setup-hooks.sh   # once per clone — pre-push runs pnpm check
pnpm status          # per-milestone progress
pnpm status --write  # regenerate the progress block
pnpm check           # typecheck + lint + test + doc-check

Slash commands

Command Does
/cazsmos-status Where things stand. Read-only.
/cazsmos-next Picks the next unblocked feature and builds it through to a commit
/cazsmos-ship Applies the Definition of Done to uncommitted work
/cazsmos-answer Records an answer to an open question and unblocks what it held up
/cazsmos-verify Honest audit of a milestone against its "Done when" criteria

Prompts

For anything the commands don't cover:

Continue.

Implement "Hold / resume cart" from docs/11-features.md.

Q4 is answered: the service charge is revenue, and it is inside the tax base.

Verify M1 against its "Done when" criteria. Be honest about what isn't provable from the repo.

Add a recipes/BOM module following docs/40-extending.md.

Screen 1b changed in the design project — update packages/ui to match.

Restructure how stock costing works. Write an ADR for it.

/cazsmos-next picks work on its own — it reads git log, pnpm status, and the worklog's In flight line, then takes the next unblocked row. It stops to ask only when the next item is blocked by an unanswered question, or when the roadmap offers a real choice.

The working rules an agent follows are in CLAUDE.md § Working agreement.

Deployment tiers

Pick a tier by composing overlay files. The image never changes.

Tier For Command
1 — Solo One machine, POS on the same box docker compose -f infra/compose.yml up -d
2 — LAN One host, terminals over the shop network docker compose -f infra/compose.yml -f infra/compose.lan.yml up -d
3 — Internet Cloud server, both stores over WAN docker compose -f infra/compose.yml -f infra/compose.cloud.yml up -d

Plus a staging overlay that runs the release image against a restored shop dump on the development machine — every release passes through it, and every pass doubles as a restore drill.

Moving between tiers is pg_dump / pg_restore plus an .env change. Full instructions, including mDNS setup and backups, in docs/24-deployment.md.

Images are built for linux/amd64 and linux/arm64 — a Raspberry Pi 5 is a supported production target.

Documentation

CLAUDE.md Working rules for this repo — start here
docs/00-overview.md Product one-pager and glossary
docs/10-prd.md Product requirements
docs/11-features.md Full feature inventory
docs/20-architecture.md System architecture
docs/21-data-model.md Data model
docs/22-ledger.md Double-entry rules and posting matrix
docs/23-tax.md PPN / PB1 / PPh Final / e-Faktur
docs/24-deployment.md Deployment and operations
docs/25-hardware.md Printers, scanners, drawers, KDS, scales
docs/26-analytics.md Rollups, reports, charts, BI access
docs/27-builds-and-releases.md Building the till app, signing, updates
docs/28-ip-protection.md What ships to a shop, and what doesn't
docs/29-dev-environment.md Testing everything on one Mac
docs/30-design-system.md Design tokens, components, formatting
docs/adr/0012-… Localization — languages, formats, translations
docs/40-extending.md How to add a module
docs/41-workflow.md Development lifecycle — Ready, staging, testing, release, runbook
docs/50-roadmap.md Milestones
docs/51-open-questions.md What's unanswered and what it blocks
docs/60-worklog.md Session-by-session record
docs/61-implementation-sessions.md Implementation guide — M0→M6 broken into sessions, with prompts
docs/adr/ Architecture decision records

Licence

Private. All rights reserved.