FieldFlow is a field service management system for dispatching work orders to technicians and tracking work from assignment through completion.
- Next.js App Router, React, and TypeScript strict mode
- Tailwind CSS
- Better Auth, Prisma, and Neon PostgreSQL
- Zod for server-side validation
- Playwright for end-to-end tests
- Install dependencies with
npm install. - Copy
.env.exampleto.envand provide local database and auth values. - Run
npm run db:generate. - Create and apply the first migration with
npm run db:migrate. - Set the three role-specific demo password variables, then run
npm run db:seed. - Start the application with
npm run dev.
The development server runs at http://localhost:3000.
npm run dev- run the development servernpm run build- create a production buildnpm run lint- run ESLintnpm run typecheck- verify strict TypeScriptnpm run format:check- verify Prettier formattingnpm run test:e2e- run Playwright testsnpm run db:generate- generate the Prisma clientnpm run db:migrate- create and apply a Prisma migrationnpm run db:seed- seed safe demo data
app/- App Router pages, layouts, and route handlerscomponents/- shared UI, form, table, and layout componentsfeatures/- feature-specific interface, logic, and data moduleslib/- shared utilities, validation schemas, auth, and Prisma accessprisma/- Prisma schema, migrations, and seed datatests/e2e/- Playwright end-to-end tests
The responsive login flow, Better Auth route, Prisma 7 schema, session-aware role redirects, and protected destination placeholders are implemented. The operations, customer, technician, and work-order screens are the next feature phase.
No real credentials or customer data belong in this repository. Use only the
placeholder values in .env.example; local and deployment secrets must be
stored in environment configuration.