Start here
Getting started
Install, run, test and find your way around the repository.
A documentação técnica está em 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
| Script | What it does |
|---|---|
npm run dev | Development server (Turbopack). |
npm run build | Production build — statically generates every page in every locale. |
npm start | Serves the production build. |
npm run storybook | Design-system workbench at http://localhost:6006. |
npm run build-storybook | Static Storybook in storybook-static/. |
npm test | Unit and component tests (Vitest). |
npm run test:watch | Tests in watch mode. |
npm run typecheck | tsc --noEmit in strict mode. |
npm run lint | ESLint with the Next.js core-web-vitals + TypeScript configs. |
npm run format | Prettier on all code (Markdown is hand-formatted and excluded). |
npm run format:check | Fails if any file isn't formatted. |
npm run check | Typecheck, lint, format check and tests — run this before every push. |
Environment variables
None are required. Optional:
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_SITE_URL | Canonical 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
- Run
npm run test:watchin one terminal andnpm run devin another. - If you touch the math, start with a failing test in
src/lib/__tests__/engine.test.ts. - If you add UI text, add the key to
src/i18n/dictionaries/pt.tsfirst — TypeScript will then tell you to add it toen.tsandes.ts. - If you touch UI, run
npm run storybookand build the piece there first; see design system. - Run
npm run check, then open a PR (see contributing).