Phase 2
Base app architecture:
Route groups for customer, staff and owner.
* Reusable design system with around 20 UI components.
* Complete Prisma schema.
* Authentication with email/password and Google.
* Role and permission model.
* Protected routes.
* Clean separation between features, services, components and shared utilities.
This commit is contained in:
201 files changed
+31984
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Small, UI-facing display types. Deliberately NOT imported from
|
||||
* `@/generated/prisma` — components in `components/ui` should never depend
|
||||
* on the ORM layer directly (see docs/implementation-plan.md §11, "Server
|
||||
* and client boundaries"). Feature code maps Prisma results onto these
|
||||
* shapes; if the two drift, that mapping step is exactly where it should
|
||||
* be caught.
|
||||
*/
|
||||
|
||||
export type AppointmentStatus =
|
||||
| "pending_approval"
|
||||
| "confirmed"
|
||||
| "arrived"
|
||||
| "in_progress"
|
||||
| "completed"
|
||||
| "cancelled"
|
||||
| "no_show";
|
||||
|
||||
export interface StaffSummary {
|
||||
id: string;
|
||||
name: string;
|
||||
avatarUrl?: string;
|
||||
}
|
||||
|
||||
export interface ServiceSummary {
|
||||
id: string;
|
||||
name: string;
|
||||
durationMinutes: number;
|
||||
/** Formatted for display, e.g. "£22.00" — currency formatting is a
|
||||
* presentation concern handled once, upstream of these components. */
|
||||
formattedPrice: string;
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
import type { DefaultSession } from "next-auth";
|
||||
|
||||
declare module "next-auth" {
|
||||
interface Session {
|
||||
user: {
|
||||
id: string;
|
||||
} & DefaultSession["user"];
|
||||
}
|
||||
}
|
||||
|
||||
declare module "next-auth/jwt" {
|
||||
interface JWT {
|
||||
id?: string;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user