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:
Stefan Lazic committed 2026-08-02 17:47:23 +01:00
1 parent 468d163299
commit 090646fdfd
201 files changed
+31984

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
import { redirect } from "next/navigation";
import { auth } from "@/auth";
import { BottomNav } from "@/components/navigation/bottom-nav";
import { STAFF_NAV_ITEMS } from "@/lib/navigation/staff-nav-items";
import { hasPermission } from "@/lib/auth/permissions";
import { Permission } from "@/generated/prisma/enums";
/**
* Owner is a permission on a staff account, not a separate account type
* (see docs/implementation-plan.md §3, §11) — this layout reuses the exact
* same shell/nav as (staff), and only adds a permission check on top.
*/
export default async function OwnerLayout({ children }: { children: React.ReactNode }) {
const session = await auth();
if (!session?.user) {
redirect("/sign-in?callbackUrl=/owner");
}
const canManageStaff = await hasPermission(session.user.id, Permission.MANAGE_STAFF);
if (!canManageStaff) {
redirect("/staff");
}
return (
<div className="min-h-screen bg-stone pb-24">
{children}
<BottomNav items={STAFF_NAV_ITEMS} variant="staff" />
</div>
);
}
+9
View File
@@ -0,0 +1,9 @@
import type { Metadata } from "next";
import { ChartLine } from "lucide-react";
import { ComingSoon } from "@/components/feedback/coming-soon";
export const metadata: Metadata = { title: "Business Dashboard" };
export default function OwnerDashboardPage() {
return <ComingSoon icon={ChartLine} title="Business Dashboard" phase="Phase 4: Owner Administration" />;
}
+9
View File
@@ -0,0 +1,9 @@
import type { Metadata } from "next";
import { Users } from "lucide-react";
import { ComingSoon } from "@/components/feedback/coming-soon";
export const metadata: Metadata = { title: "Team Management" };
export default function OwnerTeamPage() {
return <ComingSoon icon={Users} title="Team Management" phase="Phase 4: Owner Administration" />;
}