Entry flow: pick a role → enter a 4-digit PIN → land in that role's own space.
- CEO gets the full tile-navigation space from the CEO Screen deck: Performance and Progress (→ Departments/HR, Finance, Compliance, CRM, SRM), Strategic Dashboards and Reports, Compliance, Communication(s), Task(s) & Notification(s), Schedule(s) & Notification(s), Research & Development, Branch(es), Archives, Help.
- Finance and Accounting link through to the existing Business Setup, Transactions, and Tax screens (from the earlier VexBusiness wireframe).
- Every other role (HR, Legal, Marketing & Sales, IT, Logistics, Operations, CRM, SRM) has its own PIN-gated space with a "coming soon" placeholder, ready to fill in once we have their screens.
All roles default to PIN 1234. Change PINs from the "Manage PINs" link on
the role-select screen, or open /admin/pins directly.
Security note: this PIN gate is intentionally lightweight (a signed cookie, no accounts or passwords) — fine for an internal prototype, but swap in real authentication before this holds anything sensitive in production.
- Open this folder in VS Code.
- Install dependencies:
This also runs
npm installprisma generateautomatically. - Create the local database and seed the roles (SQLite, zero setup):
npx prisma migrate dev --name init npx prisma db seed - Start the dev server:
npm run dev - Open http://localhost:3000 — pick a role, enter PIN
1234.
The local database is a single file, prisma/dev.db (already in .gitignore,
won't be committed).
SQLite's file-based storage doesn't persist on Vercel's serverless functions, so for production you need a hosted Postgres database (Neon, Supabase, Vercel Postgres all work — Neon has a generous free tier).
- Get a Postgres connection string from your provider.
- In
prisma/schema.prisma, change the datasource:datasource db { provider = "postgresql" url = env("DATABASE_URL") }
- Push this project to a GitHub repo and import it in Vercel, or run
vercelfrom this folder. - In the Vercel project's Environment Variables, add:
DATABASE_URL— your Postgres connection string
- Redeploy. The
buildscript runsprisma migrate deployautomatically, which creates the tables in your Postgres database on first deploy.
If you ever change prisma/schema.prisma again, run
npx prisma migrate dev --name <change> locally to generate a new migration
file, commit it, then redeploy.
src/lib/roles.ts— the list of roles shown on the select screensrc/lib/session.ts— signed-cookie session helpersrc/middleware.ts— protects every/space/*route, redirects to that role's PIN screen if not signed insrc/app/page.tsx— role select screensrc/app/login/[slug]— PIN padsrc/app/admin/pins— set each role's PINsrc/app/space/ceo— the full CEO tile-navigation spacesrc/app/space/[slug]— generic space for every other rolesrc/lib/transactionTypes.ts— all Action Box transaction types and their fields (edit here to add/change a transaction type)src/lib/taxTypes.ts— Tax module categories and actionssrc/lib/businessConfig.ts— business types, departments, currencies, industry sectors/sub-categoriessrc/app/setup— Business Setup + Financial Details screensrc/app/transactions— Action Box transaction screensrc/app/tax— Tax module screenprisma/schema.prisma— database schema (Role, BusinessProfile, Transaction, TaxEntry)
Light creamy palette defined in tailwind.config.ts (cream background, moss
green accent, warm ink text). Adjust the hex values there to restyle.