← knowledge.oriz.in

FINAL: Every visual surface per-app; only behavior/utility packages stay shared

decision decisionFINALshareddivergentper-appscrapchromevisualbehavior

FINAL per-app visual, shared behavior

Resolution

After multiple same-day reversals on shared-vs-divergent chrome (sweeps #3, #4, #5 + 6+ knowledge supersessions), user locked the FINAL policy 2026-06-22 evening:

"Everything should be unique according to the [design]. Only combine them if there are really so everything is same into the everything. According to the design brief everything is same. If it is really same everything is same then only make a fully combined component. But I think that they are completely different for all of the apps or even if they are same, they are very less same."

Translation: NOTHING visual is shipped from a shared package. Each app draws everything fresh per its design brief. Shared packages are utility/behavior only.

What's SHARED (via npm packages, every app imports)

Package Purpose Why shared
@chirag127/auth-core (+ auth-wxt, auth-vsc, auth-cli) Firebase Auth config + sign-in flow Cross-app SSO REQUIRES identical token handling
@chirag127/astro-billing Pricing page component + Razorpay/Paddle integration Single payment ledger; same prices everywhere
@chirag127/oriz-seo sitemap + IndexNow + JSON-LD + OG image gen Same SEO semantics across family
@chirag127/oriz-analytics CF Web Analytics + GA4 + Clarity + Sentry wrapper One init call per app
@chirag127/oriz-consent Klaro consent banner (EU + India DPDP + US GPC) Approval-gate uniformity
@chirag127/oriz-ai-providers 20-provider LLM fallback chain Single calling convention
@chirag127/oriz-rate-limit Free/Pro/Max tier usage caps Same caps everywhere
@chirag127/astro-data Firebase + Firestore client + TanStack Query Same data shape
@chirag127/astro-pwa PWA manifest + service worker helper Same offline pattern
@chirag127/astro-content RSS / Atom / JSON Feed helpers Same feed semantics
@chirag127/astro-forms RHF + Zod + Web3Forms wrapper Same form validation
@chirag127/astro-distribute PWABuilder CLI wrapper Same native distribution
@chirag127/astro-test-utils Vitest + MSW + Playwright fixtures Same testing surface
@chirag127/omni-publish Cross-post engine Same release fan-out
@chirag127/oriz-book-build Pandoc wrapper Same book pipeline
@chirag127/oriz-ui <ContactForm /> stub component Single contact form

What's PER-APP (zero sharing)

Surface Each app owns its...
Header own src/components/Header.astro (or .tsx)
Footer own src/components/Footer.astro with 6 legal links inline
Sidebar own src/components/Sidebar.astro (or omit if app doesn't need one)
BottomBar own src/components/BottomBar.astro (or omit if not mobile-heavy)
Wordmark own src/components/Wordmark.astro
Layout wrapper own src/layouts/BaseLayout.astro
CSS tokens own src/styles/tokens.css (NAMES can differ — --paper here / --bg there)
Color palette own
Type stack own
Hero composition own
Signature element own
Motion language own
/privacy /terms /contact /about /refunds /disclaimer pages own src/pages/<page>.astro with app-specific copy

Footer requirements (universal but visual-per-app)

Every app's footer MUST include links to the 6 standard legal routes:

Each app's footer designs these 6 links however fits its brief. The 6 routes themselves are per-app pages.

Packages reduced or deprecated

Migration sweep

Once the 5 in-flight agents land (env-sync + maximalist-footer + home-redesign + blog-layout + 16-tools-build), spawn the SCRAP-AND-MIGRATE agent:

For each of 5 priority apps (home, blog, ncert, janaushdhi, packages-catalog):

  1. Identify every import from @chirag127/astro-chrome for visual components
  2. Inline the equivalent into the app's src/components/
  3. Customize per its design brief
  4. Remove the @chirag127/astro-chrome import (or downgrade to ContactForm-only)
  5. Move shared astro-shell/tokens.css into the app's own src/styles/tokens.css
  6. Same migration for the 16 tools apps (once their v0 lands)

Total LOC migrated: roughly equal to the 4,000 LOC dedup'd in earlier sweeps. Per Rule 12 (=50 LOC threshold), grill BEFORE migrating — this decision file IS that grill.

Why this final shape

The shared-package experiment failed three times because the apps are genuinely different products, not skins of one product. Trying to share visual code FORCED the apps to look the same OR forced complex slot APIs that became LARGER than per-app code. Per the frontend-design Rule 13: each app needs its own distinctive identity — the brief calls for differentiation.

Shared utility/behavior packages remain because they encode TRUE family contracts (one Firebase project, one pricing model, one analytics stack, one AI fallback ladder). Those contracts don't fight the visual brief.

Supersedes

This decision SUPERSEDES (entirely or in critical part):

Cross-refs