Skip to content
Ritesh FirodiyaGet in touch

Work / Chitragupt / Wiki / Concepts

architecture-rules

Conceptcanonicalverified 2026-06-26

CONCEPT.ARCHITECTURE-RULES

Architecture rules

Summary

The infra invariants that constrain every change: Firebase in asia-south1, integer paise for money, ISO-8601 UTC for dates, committed env files, no legacy code, no time-based estimates.

Why it matters

These rules are the floor that makes everything else legible. Money in floats means audit reconciliation failures. Multi-region means a doubled DPDP story. Quiet *Legacy re-exports means two truths coexisting in code. Each rule is a pre-commitment that removes a class of bug rather than catching it case-by-case. They are deliberately terse because the rationale lives in the decisions they refer to.

Implications

  • Monorepo: apps/website (Next.js, V1) · apps/functions (Firebase Cloud Functions). apps/mobile (Expo) preserved but post-V1. Shared: packages/shared (zod schemas, reference data). No Postgres, no Prisma, no Docker.
  • Website styling: Tailwind CSS v4, className= only. Mobile (when built): Uniwind, same className= discipline.
  • Money in integer paise. Never floats, never rupees, never decimals except at the display layer.
  • Dates as ISO-8601 UTC strings or Firestore Timestamps.
  • Server timestamps via FieldValue.serverTimestamp() — top level only.
  • .env* files are committed (private repo) — do NOT gitignore them.
  • No legacy code. When refactoring, delete the old path in the same change. No *Legacy, no // removed, no quiet re-exports.
  • No time-based effort estimates anywhere. Use Phase + Complexity + Deviations.
  • Region pinned to asia-south1 — see data-residency-dpdp.

Related

Sources

  • .context/wiki/concepts/* § "Architecture rules"
  • .context/wiki/concepts/* § "Hard constraints (V1)" — region, domain rows
  • CLAUDE.md § "Env files — committed, never ignored"
  • .claude/rules/money.md

Every project of mine is written down like this.

Read the résumé