Start here

Getting started

Install, run, test and find your way around the repository.

La documentación técnica está en inglés.

Requirements

  • Node.js 20.9+ (Next.js 16's minimum). Node 22 LTS is recommended — the test runner's tooling prints engine warnings on older 20.x releases.
  • npm 10+

Install and run

git clone https://github.com/dennerparreiras/splitmize.git
cd splitmize
npm install
npm run dev

Open http://localhost:3000. The app itself is at /split; English and Spanish live at /en and /es.

Scripts

ScriptWhat it does
npm run devDevelopment server (Turbopack).
npm run buildProduction build — statically generates every page in every locale.
npm startServes the production build.
npm run storybookDesign-system workbench at http://localhost:6006.
npm run build-storybookStatic Storybook in storybook-static/.
npm testUnit and component tests (Vitest).
npm run test:watchTests in watch mode.
npm run typechecktsc --noEmit in strict mode.
npm run lintESLint with the Next.js core-web-vitals + TypeScript configs.
npm run formatPrettier on all code (Markdown is hand-formatted and excluded).
npm run format:checkFails if any file isn't formatted.
npm run checkTypecheck, lint, format check and tests — run this before every push.

Environment variables

None are required. Optional:

VariablePurpose
NEXT_PUBLIC_SITE_URLCanonical origin for metadata and sitemaps (e.g. https://splitmize.com). On Vercel, the production domain is picked up automatically from VERCEL_PROJECT_PRODUCTION_URL.

Repository map

.storybook/              Storybook config, preview (tokens, fonts, themes), branded UI
docs/                    Documentation (rendered at /docs)
public/
  assets/images/         App icons and favicon
  sw.js                  Service worker (offline support)
src/
  app/
    [locale]/            Every route, per locale
      page.tsx           Landing page
      split/page.tsx     The app
      s/page.tsx         Shared bill viewer
      docs/[[...slug]]/  Documentation pages
      opengraph-image.tsx
    manifest.ts, robots.ts, sitemap.ts
  components/            Site chrome: header, footer, theme and locale switchers
  config/site.ts         Site URL, repo, author
  design-system/         Tokens, base styles, components (+ stories, tests), Storybook MDX
  features/
    bill/                Store (state, undo, persistence), BillReceipt, formatting helpers
    workbench/           The four steps, header, history, Pix, sharing
    viewer/              Shared bill page
    landing/             Landing sections and sample data
    docs/                Docs navigation and prose styles
  i18n/                  Locales, dictionaries, translator
  lib/                   Pure logic (+ __tests__)
  proxy.ts               Locale routing

Your first change

  1. Run npm run test:watch in one terminal and npm run dev in another.
  2. If you touch the math, start with a failing test in src/lib/__tests__/engine.test.ts.
  3. If you add UI text, add the key to src/i18n/dictionaries/pt.ts first — TypeScript will then tell you to add it to en.ts and es.ts.
  4. If you touch UI, run npm run storybook and build the piece there first; see design system.
  5. Run npm run check, then open a PR (see contributing).
Editar esta página en GitHub