The deep dive: personas, user flows, multi-tenant architecture, RBAC matrix, design decisions, and the V1 testing report.
| Problem | Impact |
|---|---|
| Uneven task distribution | Burnout, breakdowns during 12-hour shifts, workers overloaded while others never learn key tasks |
| Poor / no training | Workers feel clueless for months. Managers blame workers when the real issue is lack of structure |
| Knowledge stays trapped | Better methods exist at other locations but no one ever finds out |
| Recipes are inconsistent | Different locations make things differently — quality varies, customers notice |
| New franchisees make avoidable mistakes | Bad habits from day one — can ruin reputation before the business even starts |
| Conflict between franchisor & franchisee | Struggling franchisees don't trust top-down advice. They trust living proof more |
| Mass hiring with no structure | Ridiculously high expenses at launch with no return — most hires aren't set up to succeed |
These features are deployed and functional at friend-chise.vercel.app:
The app is being trialled at a real franchise from V1 — which meant multi-tenant isolation, RBAC, and franchise hierarchy had to ship before any worker-facing features. Tasks contain proprietary recipes that only certain roles should see. Permissions couldn't be bolted on later; they had to exist before the first real worker ever logged in.
V1 looks like an “admin panel” because the worker-facing flow is intentionally V2 territory. Shipping the platform first — with the full permission model, franchise hierarchy, and invite system in place — lets V2 focus purely on product, not plumbing.
V1.5 (next milestone) adds rate limiting and security hardening before V2 work begins. No worker-facing features ship to a real shop without those guardrails in place.
V2 is the actual product the platform was built to enable.
Each task gets tabs — configurable per task — and pluggable “tools”: calculators, recipes, media, and more. Workers click a task and see exactly what they need, in the order that makes sense for that job.
You're making custard for 200 doughnuts. The tool tells you: 5L milk, 10L thick cream, 1.25L custard powder. Edit one number, everything scales. This is the first pluggable tool and the clearest demonstration of what “task as work unit” actually means.
kind field (recipe, chore, daily task, etc.) so the UI can render each type appropriately.V1 made the platform safe for a real shop. V2 is what the platform was built to enable.
Component layouts and page structures were designed in Figma before implementation. Wireframes cover timetable views, task management, member management, settings panels, and mobile responsive layouts.
19 Prisma models across PostgreSQL (Supabase) covering users, organizations, memberships, roles, permissions, tasks, timetable entries, templates, template entries, notifications, and franchise relationships.
Age 52 · Brand Owner · 30+ locations
Built his donut brand from scratch 15 years ago. Knows the business inside out but can't be everywhere at once. Wants to maintain consistent quality, share official procedures, and identify struggling franchisees early.
Frustration: Some locations are damaging the brand reputation. He shares advice but franchisees don't always trust top-down instructions.
Age 29 · First-time Owner · Just hired 8 workers
Invested her savings into her first franchise. No food industry experience. Overwhelmed — flipping through 50+ paper recipes, doesn't know what tasks to prioritize.
How FriendChise helps: Inherits Frank's default tasks automatically. Watches video tutorials on each task. Timetable templates structure her entire week from day one.
Age 41 · Declining Location · 2 years in
Started strong but has been declining steadily. Doesn't trust top-down advice from the franchisor — feels disconnected from his reality.
How FriendChise helps: Compares his task times to successful locations. Gets peer feedback from franchisees going through similar challenges.
Age 35 · Top 5 for 3 years · Wants to help others
Figured out efficient systems, happy workers, customers love her store. Has great methods but no platform to share them.
How FriendChise helps: Posts videos, tips, and comments under tasks. Shares her cycle setup. Upvote system recognizes her contributions.
Age 22 · First job · Hired at Nina's location
Showed up on day one and nobody told him what to do. Eager to learn but feels lost and anxious.
How FriendChise helps: Sees daily tasks clearly on his phone with role-based visibility. Clicks any task for step-by-step instructions and videos.
Age 27 · 3 years experience · Derek's location
Knows every task inside out, trains most new hires. Stretched thin — basically running the floor while expected to teach everyone.
How FriendChise helps: Timetable templates take pressure off manual scheduling. New workers self-learn through task videos.
Age 38 · Former top-performer · Travels between locations
Hired by the franchisor to audit operations. Franchisees see him as a spy, not a helper. Locations hide problems when he visits.
How FriendChise helps: Views performance data remotely. Points franchisees to community-proven posts instead of arguing his own opinion.
As a new franchisee, I want to see video tutorials attached to each task so that I can learn how to do things properly without relying on someone to teach me in person.
As a new franchisee, I want to see major warnings and key points on each task so that I know what to watch out for before I start.
As a new franchisee, I want to inherit the franchisor's default tasks automatically so that I have a structured starting point from day one.
As a struggling franchisee, I want to see how top-performing locations handle the same tasks so that I can identify what I'm doing wrong.
As a struggling franchisee, I want to compare task durations — expected vs actual — so that I can spot inefficiencies.
As a struggling franchisee, I want to see factors that contribute to success so that I know what to focus on improving.
As a struggling franchisee, I want feedback from other franchisees, not just the franchisor, so that I can learn from people going through the same challenges.
As a worker, I want to see my assigned tasks for the week in a clear schedule so that I know exactly what I'm responsible for each day.
As a worker, I want to search for recipes quickly so that I don't have to dig through piles of paper.
As a worker, I want tasks to be evenly distributed so that I'm not burnt out doing more than everyone else.
As a worker, I want a checklist or standard for each task so that the person before me doesn't leave a mess for me to clean up.
As a new worker, I want to see exactly what tasks I need to do today so that I'm not confused on my first day.
As a new worker, I want to see what a full week of work looks like so that I can mentally prepare and feel confident.
As a new worker, I want to be eased into tasks gradually so that I can learn at a steady pace without being overwhelmed.
As a new worker, I want step-by-step details on how to execute each task so that I build good habits from the start.
As a franchisor, I want to flag posts as urgent or official so that franchisees know which procedures are mandatory.
As a franchisor, I want to create a default set of tasks that all franchisees must follow so that every location maintains the same standard.
As a franchisor, I want to discover better methods from franchisees and share them across all locations.
As a franchisor, I want to share recipes with role-based permissions so that only authorized people can view secret recipes.
As a franchisor, I want to see the performance/status of each franchisee so that I can identify who needs help.
As a succeeding franchisee, I want to share my knowledge and methods so that the overall franchise reputation improves.
As a succeeding franchisee, I want to be rewarded for contributing so that I'm motivated to keep sharing.
As a succeeding franchisee, I want to share my task cycle setup so that others can learn from my scheduling approach.
As a franchise member, I want to post tips, videos, and comments under any task or recipe so that I can share my knowledge — based on my permission role.
As a franchise member, I want to upvote/downvote posts so that the best methods naturally rise to the top.
As a franchise member, I want to search the forum so that I can quickly find information on a specific topic.
As a manager, I want to manually adjust the task cycle if needed so that I can handle edge cases like someone calling in sick.
As a manager, I want to auto-generate an optimal task cycle when I'm unsure how to distribute tasks.
As a manager, I want to see which tasks have been completed so that I can track progress and hold workers accountable.
As a franchisee owner, I want to create custom ranks with custom names (e.g., “Head Baker”, “Shift Lead”).
As a franchisee owner, I want to assign permissions to each rank so that I control who can do what.
As a franchisee owner, I want two default ranks — Worker and Owner — so that new members are assigned the basic role automatically.
As someone with a management permission, I want to assign and manage permission roles for others so I can delegate.
As a worker, I want to check off tasks on my phone as I complete them so that everyone knows what's done.
Auto-distributes tasks evenly across workers. 4 workers + 1 task every 2 days = 8-day cycle where everyone does it once.
Custom ranks with assignable permissions. Two defaults: Worker and Owner. Management role holders can assign permissions to others.
Franchisor defines default tasks all franchisees inherit. Franchisees can add their own local tasks on top.
Every task and recipe is also a forum topic. Comments and upvotes/downvotes surface the best methods.
Assigned tasks visible on any device. Filter the overall mixed timetable to "My Tasks Today." Calendar (week/day) and simple list modes.
Searchable, role-based access. Some recipes locked to specific roles. Each recipe is also a forum post.
Workers press "Done" to mark completion. Status flow: TODO → IN_PROGRESS → DONE / SKIPPED.
On tasks and posts. New workers can prep at home. Saves money on teaching and time.
On posts and comments. Best methods naturally rise to the top.
Task completion rates, cycle data, activity metrics. For franchisor and auditor roles.
Cycle algorithm eases new workers into tasks slowly so they learn at a steady pace.
If your area has average age 50, recommend posts from successful franchisees with similar demographics. Like Netflix but for franchise knowledge.
Auto-detect posts with potential legal, health, or safety violations (e.g., cross-contamination risks).
Succeeding franchisees share their entire cycle setup. Seasonal chaining for different seasons.
Monthly best post, top contributor badges. Incentivize sharing.
Parent org (brand) → Child org (franchisee) via one-time invite links. A single user can belong to multiple orgs. UI has an org dropdown listing every org the user is a member of.
| Org Type | Description |
|---|---|
| Independent | Created normally. Full settings, full control. No parent. |
| Parent (Brand) | Can issue franchisee creation links. Defines default tasks/recipes/roles. Can view child orgs. |
| Child (Franchisee) | Created only via invite link. Inherits published tasks/recipes/roles from parent. Can create own local tasks. |
Layer 1 — Template / Cycle Profile (pattern definition): A named cycle profile (e.g., "Standard Week" with 7 days). Task placements stored as TaskInstance rows with relative dayOffset and startTimeMin. No real dates — purely positional.
Layer 2 — Materialised Schedule (real calendar): When a manager selects a template, the system calculates real dates (weekStartDate + dayOffset) and creates new TaskInstance rows with absolute scheduledStartAt / scheduledEndAt.
Each task has two recurrence variables:
| Min | Max | Meaning |
|---|---|---|
| 0 | 1 | Do it every day |
| 1 | 2 | Do it every 1–2 days (flexible) |
| 2 | 7 | At least once a week, no sooner than every 2 days |
Franchisees can shorten the frequency but cannot exceed the max set by the franchisor.
| Action | Owner | Manager | Worker |
|---|---|---|---|
| Create/delete organization | ✓ | — | — |
| Manage members (invite/remove/change role) | ✓ | — | — |
| Create/manage custom ranks | ✓ | — | — |
| Create/edit/delete task templates | ✓ | ✓ | — |
| Create/edit timetable templates | ✓ | ✓ | — |
| Apply template to a week (materialise) | ✓ | ✓ | — |
| Edit materialised instances (reassign) | ✓ | ✓ | — |
| Assign members to task instances | ✓ | ✓ | — |
| View timetable (full week) | ✓ | ✓ | — |
| View own daily tasks | ✓ | ✓ | ✓ |
| Update task status | ✓ | ✓ | ✓ (own) |
| View all org members | ✓ | ✓ | ✓ (read) |
| Create local tasks/recipes | ✓ | ✓ | — |
| Post in forum | ✓ | ✓ | Role-dependent |
| View secret recipes | ✓ | Role-dep. | Role-dep. |
Permission enum values: ORG_MANAGE, ROLE_MANAGE, TASK_CREATE, TASK_UPDATE, TASK_DELETE, TASK_ASSIGN, TASKINSTANCE_COMPLETE
Chose: Materialised scheduling. When a template is applied, real TaskInstance rows are generated with absolute dates. This allows per-instance overrides without a complex exception layer.
Chose: One table for now. Template placements have templateId + dayOffset + startTimeMin. Materialised instances have scheduledStartAt + scheduledEndAt. Distinguished by which fields are populated. Clean refactor path to split later if needed.
Next.js middleware runs on the Edge runtime, which can't import @prisma/client. Auth config split into auth.config.ts (Edge-compatible, no Prisma) and auth.ts (full config with Prisma adapter). A real production pattern.
Both Server Actions (web UI) and API Routes (external/mobile) are thin wrappers that delegate to lib/services/. No duplicated business logic. Server Actions additionally call revalidatePath to invalidate the Next.js cache.
Auth helpers return { ok: true, user, membership } or { ok: false, response: 401|403 }. Routes early-return with if (!authz.ok) return authz.response — clean, consistent, no exceptions for control flow.
Tasks are NOT copied into child orgs. Each canonical task has one shared forum thread that all brand-network franchisees can comment under. Avoids data duplication, centralizes community knowledge, and updates propagate automatically.
Key models in the PostgreSQL schema:
parentOrgId for brand→franchisee hierarchy. Has openTimeMin, closeTimeMin, timezone.OrgPermission enum values.templateDays count and optional effectiveFrom.dayOffset) OR materialised entries (absolute scheduledStartAt). Status: TODO → IN_PROGRESS → DONE / SKIPPED.?status= filteringA structured smoke test was conducted across 87 individual test cases (now 468 unit tests + Playwright E2E in CI) covering all major features, RBAC permissions, mobile responsiveness, and edge cases.
| Category | Pass | Partial | Fail | Total |
|---|---|---|---|---|
| Auth (Sign In) | 3 | 0 | 0 | 3 |
| Create Org | 2 | 1 | 2 | 5 |
| Org Settings | 4 | 0 | 1 | 5 |
| Roles | 6 | 0 | 1 | 7 |
| Tasks | 2 | 2 | 4 | 8 |
| Templates | 1 | 1 | 6 | 8 |
| Apply Template | 4 | 0 | 1 | 5 |
| Timetable | 4 | 2 | 3 | 9 |
| Invite Member | 2 | 1 | 0 | 3 |
| Accept Invite | 5 | 0 | 0 | 5 |
| RBAC (Permissions) | 6 | 0 | 2 | 8 |
| Franchise | 3 | 0 | 1 | 4 |
| Decline Invite | 3 | 0 | 0 | 3 |
| Mobile (iPhone) | 0 | 1 | 3 | 4 |
Full test report and individual bug issues are tracked on GitHub.