Sales records and stock control for businesses. Built with Next.js (App Router), TypeScript, Tailwind CSS, Framer Motion, and Firebase.
npm install
npm run devOpen http://localhost:3000. The app needs the Firebase keys in .env.local to start.
- Create a project at https://console.firebase.google.com and add a Web app.
- Turn on Authentication > Sign-in method > Email/Password.
- Create a Firestore Database (production mode).
- Copy
.env.exampleto.env.localand paste in the web app's config values. - Paste the contents of
firestore.rulesinto Firestore > Rules and publish. - Restart
npm run dev.
Firestore may ask you to create an index the first time sales are loaded; follow the link it prints in the browser console.
| Route | What it does |
|---|---|
/ |
Homepage: hero, features, how it works, reports, call to action |
/auth/login |
Sign in with email and password |
/auth/register |
Create a business account (business name required) |
/dashboard |
Yearly sales chart, totals, top products, recent sales, low stock |
/products |
Add, edit, search, and delete products with price and quantity |
/sales |
Record a sale, browse any day on the calendar, download Excel files |
/team |
Add sales staff who record sales under their own names |
- Owner: everything, including products, team, and Excel downloads.
- Sales staff: record sales and view products, the dashboard, and the team list.
To add staff, the owner enters their name and email on /team. When that person creates an
account with the same email they join the owner's business instead of creating a new one.
app/ Routes. Each page only composes components.
components/ Page sections, grouped by page, plus shared ui/ and providers/.
images/ All images, exported from images/index.ts.
styles/globals.css Theme colours, fonts, and reused style recipes (.card, .field-input, ...).
lib/ Types, helpers, data hooks, and Excel export.
firebase.ts Firebase initialisation.
firebase-actions.ts Every read and write the app performs.
firestore.rules Security rules to publish in the Firebase console.