Skip to content
OwnlyPlans

CLAUDE.md

Project root. Cursor users: save as AGENTS.md.

Part of Invoice Generator with PDF Download by Admin

Download Open the item

Project rules: invoice generator

What we are building

A one-page web app where a freelancer fills in their details, the client, line items, tax and notes, sees a live invoice preview and downloads a clean PDF. Data stays in the browser (localStorage). No backend.

Stack

  • Next.js (App Router) + TypeScript + Tailwind CSS
  • @react-pdf/renderer for the PDF
  • zod for the invoice shape

Rules

  • Money is stored in integer cents. Never use floats for totals.
  • One source of truth: lib/invoice.ts holds the type, the zod schema and calcTotals(). UI and PDF both use it.
  • Format money with Intl.NumberFormat using the chosen currency.
  • Everything must work offline after the first load and on a phone.
Source, 16 lines
# Project rules: invoice generator

## What we are building
A one-page web app where a freelancer fills in their details, the client, line items, tax and notes,
sees a live invoice preview and downloads a clean PDF. Data stays in the browser (localStorage). No backend.

## Stack
- Next.js (App Router) + TypeScript + Tailwind CSS
- @react-pdf/renderer for the PDF
- zod for the invoice shape

## Rules
- Money is stored in integer cents. Never use floats for totals.
- One source of truth: lib/invoice.ts holds the type, the zod schema and calcTotals(). UI and PDF both use it.
- Format money with Intl.NumberFormat using the chosen currency.
- Everything must work offline after the first load and on a phone.

Your AI tool
Starter prompt

		

Download the plan