10 Commits (baa01c38bd07573582d680b6ac9a9c3c0a96865d)

Author SHA1 Message Date
Deardo Satria baa01c38bd Memoize getCurrentUser per request and document cache rules
getCurrentUser is wrapped in React cache so pages that call it from
several components validate the session once per request. Cross-request
caching ("use cache", unstable_cache, module-level storage) stays
forbidden for cleo data and sessions: the PHP app writes to the same DB,
and a cached session would keep a logged-out user signed in.

CLAUDE.md and the cleo-code-review skill now state both rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 hours ago
Deardo Satria 5abf8a7e0c Unify master sheet form and move shared master components
- Move cari-master, master-sheet-form, and hapus-master-button into
  app/(dashboard)/master/_components since only master pages use them
- Merge MasterSheetForm and MasterMultiFieldSheetForm into one form that
  accepts multiple fields; forms needing select/textarea stay custom
- Drop the initial prop and hardcode { ok: false } as the action state seed
- Blur number inputs on wheel to prevent accidental value changes
- Update CLAUDE.md to describe the new layout and rules
22 hours ago
Deardo Satria 6f1234aa49 Extract shared pagination, search box, and escapeLike helpers
Pull PER_PAGE, parsePage, and halamanHref into lib/pagination, the search
box into components/cari-master, and escapeLike into lib/utils so other
master features can reuse them. Pelanggan switches to these helpers and
its list now calls getCurrentUser() in its render chain.
1 day ago
Deardo Satria 21bce758cb Add local MariaDB copy and Drizzle connection for the legacy cleo database
- docker-compose: mariadb:10.4 service on port 3307 (utf8mb4), seeded from a
  mysqldump of the office server so development never writes to production
- drizzle-amigo.config.ts + `pnpm db:amigo:pull` (introspection only)
- scripts/fix-amigo-schema.ts repairs drizzle-kit's MariaDB output: quoted
  defaults, dropped primary keys, missing column-builder imports
- db/amigo: pulled schema and `amigoDb` connection
- README: step-by-step local MariaDB setup (dump, import, cleo_next grants)
- CLAUDE.md: MyISAM, concurrent PHP writes, zero dates, other apps' tables

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
Deardo Satria a44fb24136 Move login and logout actions into app/(auth)/actions.ts 2 weeks ago
Deardo Satria 248b22dcba Add docker compose Postgres, admin seed script, and setup guide
- docker-compose.yml runs Postgres 17 and reuses the existing cleo-pgdata volume.
- scripts/seed.ts creates the first admin through Better Auth's internal adapter,
  so it works while public sign-up is disabled; skips if the admin exists.
- .env.example documents every variable; README has the new-laptop setup steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 weeks ago
Deardo Satria 6e512a14fc Add login server action, getCurrentUser, and progress notes 2 weeks ago
Deardo Satria 31c211f6ab Add shadcn/ui with base-nova preset 2 weeks ago
Deardo Satria 2f32ec4590 Add Better Auth with username login on Postgres 2 weeks ago
Deardo Satria 2ff639a1ed Add legacy PHP source as reference 2 weeks ago