RentalDesk is a mobile-first operating system for small equipment and party-rental businesses — bounce-house, table/chair, tent, AV, tool, photo-booth, and generator rental companies. This document specifies Phase 1 only: the foundation on which later phases will add inventory availability, quotes, customer deposits, bookings, delivery/pickup jobs, check-in/check-out inspections, damage charges, late fees, refunds, and Stripe subscription billing.
Phase 1 delivers a production-quality multi-tenant SaaS foundation in which a new user can sign up with email and password, log in, log out, and reset their password; create a rental business and become its owner; see a protected dashboard with the app navigation and empty-state screens for future modules; and access only their own business data — never another business's data.
The audience is the small rental operator who runs the business from a phone between jobs. The product must feel like a precise, calm working instrument rather than a playful consumer app.
Success criteria for Phase 1 (document topic). Phase 1 is successful when, end to end and on a mobile viewport: a new visitor can create an account, confirm the email when Supabase requires it, sign in, create a business, land on a protected dashboard as that business's owner, see the app navigation and the empty-state module screens, sign out, and reset a forgotten password — and when no authenticated user can read or write another business's data under any request path, with all privileged secrets confined to the server.
RentalDesk Phase 1 is a Next.js App Router application (TypeScript, Tailwind CSS, shadcn/ui) deployed Vercel-ready, backed by Supabase for Postgres, Auth, Storage, and Row Level Security. Authentication is cookie-based Supabase Auth using @supabase/ssr, with three separate Supabase clients: browser/client components, server components, and server actions/route handlers. Forms use React Hook Form with Zod validation.
The single active human actor is the Rental business owner. The owner's accepted work is: establish identity (sign up, confirm email, log in, log out, reset password), create a rental business and become its owner, and use a protected dashboard with app navigation and empty-state screens for future modules. Supabase Auth is the provider that owns credential verification, session issuance, confirmation and recovery emails, and the callback exchange; the application owns the business record, the owner membership, and the row-level isolation that guarantees a user sees only their own business data.
The provisioned infrastructure is a shared FastAPI backend process for application APIs and domain modules, a MariaDB database for application-owned persistent data, and a React application UI. The product's authoritative stack is Next.js + Supabase; the backend and database services are the provisioned runtime inventory and are reused rather than multiplied. Supabase Postgres with RLS remains the authoritative store for identity-linked business data because the source requires Supabase for Postgres, Auth, Storage, and Row Level Security; the MariaDB service is available for application-owned persistent data and does not by itself justify new domain entities, authentication, or an ER diagram.
Removed from scope (later phases, not built now):
RentalDesk Phase 1 is a first-party web application with application-owned identity. Anonymous visitors reach the public Landing page and the auth surfaces (/auth/sign-up, /auth/login, /auth/forgot-password, /auth/reset-password, /auth/callback). Identity is established through Supabase Auth with email and password; Supabase owns credential verification, session cookies, confirmation and recovery email delivery, and the callback token exchange. The application never implements custom JWT handling.
Once a session exists, the owner is routed by business state: a user without a business is sent to /onboarding/create-business; a user with a business reaches the protected Dashboard. Both /onboarding/create-business and the Dashboard require login. The Dashboard is the durable home for the app navigation and the empty-state screens for future modules; those empty states are presentational placeholders and do not implement the future modules.
Data isolation is a delivery boundary, not a feature toggle: every business-scoped row is protected by Supabase Row Level Security so that a user can only reach rows belonging to a business they own. Privileged secrets — SUPABASE_SERVICE_ROLE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, RESEND_API_KEY — live only in server-side environment variables and are never exposed to the browser; a .env.example documents them.
Everything in the later-phase list above is future and out of the current build. No page, control, or flow in this document implements those modules; the empty-state screens only name them as forthcoming.
/auth/sign-up; "Sign in" → /auth/login./auth/login; link to /auth/forgot-password./onboarding/create-business; business exists → Dashboard)./auth/sign-up; link to /auth/forgot-password./auth/login./auth/login after success./auth/forgot-password)./auth/login.FR-1 — Email and password sign-up. As a rental business owner, I should create an account with email and password so that I can start using RentalDesk. Provenance: explicit. Lifecycle: actor enters email and password on /auth/sign-up; Zod/React Hook Form validate; submit is disabled and shows loading while in flight, preventing duplicate submission; Supabase Auth creates the user. Observable result: a confirmation-sent state, or a session when confirmation is not required. Failure/recovery: clear validation or provider error, correct and resubmit. Continuation: confirm email (FR-2) or proceed to business-state redirect (FR-6).
FR-2 — Email confirmation flow. As a rental business owner, I should confirm my email when Supabase requires it so that my account becomes usable. Provenance: required_inference. Lifecycle: Supabase sends the confirmation email; the owner opens the link to /auth/callback; the route handler exchanges the code for a session cookie. Observable result: confirmed account and session. Failure/recovery: invalid or expired link routes back to an auth surface with a clear message and a path to retry. Continuation: login or business-state redirect.
FR-3 — Login. As a rental business owner, I should log in with email and password so that I can reach my protected workspace. Provenance: explicit. Lifecycle: credentials on /auth/login; loading/disabled submit; Supabase Auth verifies and sets the cookie session. Observable result: redirect by business state. Failure/recovery: clear invalid-credential or unconfirmed-email error; retry or use forgot-password. Continuation: onboarding or Dashboard.
FR-4 — Logout. As a rental business owner, I should log out so that my session ends on this device. Provenance: explicit. Lifecycle: owner triggers sign out from the authenticated surface; Supabase Auth clears the session cookie. Observable result: redirected to an anonymous surface; protected routes now redirect to login. Failure/recovery: if sign-out fails, a clear error and retry. Continuation: log in again.
FR-5 — Forgot and reset password. As a rental business owner, I should request a reset and set a new password so that I can regain access. Provenance: explicit. Lifecycle: enter email on /auth/forgot-password; the response never reveals whether the email exists; Supabase sends the recovery link; the owner opens it to /auth/reset-password (via /auth/callback) and sets a new password with loading/disabled submit. Observable result: neutral confirmation, then a successful password change and route to login. Failure/recovery: invalid/expired link or mismatched passwords produce clear errors and a path to request a new link. Continuation: log in with the new password.
FR-6 — Business-state routing after authentication. As a rental business owner, I should be sent to the right place after signing in so that I never land on a page I cannot use. Provenance: required_inference. Lifecycle: after authentication the app checks whether the user has a business; if not, redirect to /onboarding/create-business; if yes, to the Dashboard. Observable result: correct destination. Failure/recovery: if business lookup fails, a clear error with retry rather than a silent wrong redirect. Continuation: onboarding or Dashboard.
FR-7 — Create a rental business and become its owner. As a rental business owner, I should create my rental business so that my workspace is bound to me as owner. Provenance: explicit. Lifecycle: authenticated user without a business submits the business form on /onboarding/create-business; server action inserts the business and the owner membership; loading/disabled submit prevents duplicates. Observable result: business exists with the user as owner; redirect to Dashboard. Failure/recovery: validation or creation error with clear message and retry that does not create a duplicate. Continuation: Dashboard.
FR-8 — Protected dashboard. As a rental business owner, I should see a protected dashboard so that I have a home for my business. Provenance: explicit. Lifecycle: authenticated owner with a business opens the Dashboard; server verifies the session and loads only that owner's business. Observable result: business identity and dashboard content rendered. Failure/recovery: unauthenticated access redirects to /auth/login; data failure shows a clear error with retry. Continuation: navigate via the app navigation.
FR-9 — App navigation. As a rental business owner, I should see the app navigation so that I can move around the product. Provenance: explicit. Lifecycle: the Dashboard renders a left rail on desktop and a bottom tab bar on mobile, with numbered monospace section labels and a tangerine active-section marker. Observable result: the owner can move between the dashboard and the empty-state module screens. Failure/recovery: navigation to a protected destination without a session redirects to login. Continuation: return to the Dashboard.
FR-10 — Empty-state screens for future modules. As a rental business owner, I should see empty-state screens for future modules so that I understand what is coming without being offered unfinished features. Provenance: explicit. Lifecycle: the owner opens a module section from the navigation; a ruled schematic empty-state panel explains the module is forthcoming. Observable result: a clear empty state with no working module controls. Failure/recovery: if the section fails to load, a clear error with retry. Continuation: return to the Dashboard.
FR-11 — Redirect unauthenticated users away from protected routes. As a rental business owner, I should be kept out of protected routes until I sign in so that my workspace stays private. Provenance: explicit. Lifecycle: an unauthenticated request to /onboarding/create-business or the Dashboard is intercepted by the server-side session check. Observable result: redirect to /auth/login. Failure/recovery: after login, the owner continues to the intended destination via business-state routing. Continuation: protected work.
FR-12 — Redirect authenticated users away from login/signup. As a rental business owner, I should not see login or signup once I am signed in so that I am not confused by redundant forms. Provenance: explicit. Lifecycle: an authenticated request to /auth/login or /auth/sign-up is redirected. Observable result: the owner lands on the business-state destination. Failure/recovery: if session resolution fails, the owner is treated as anonymous and can sign in again. Continuation: Dashboard or onboarding.
FR-13 — Clear validation errors, loading states, and duplicate-submission prevention. As a rental business owner, I should get clear feedback on every form so that I know what to fix and never submit twice. Provenance: explicit. Lifecycle: on every auth and business form, Zod validation surfaces field-level errors; every submit button shows a loading state and is disabled while submitting. Observable result: no duplicate submissions; errors are specific and readable. Failure/recovery: correct the field and resubmit. Continuation: the form's success path.
FR-14 — Password reset never reveals whether an email exists. As a rental business owner, I should get the same reset response regardless of whether my email is registered so that account existence is not disclosed. Provenance: explicit. Lifecycle: any email submitted to /auth/forgot-password yields the identical neutral confirmation. Observable result: no existence disclosure in copy, timing-sensitive messaging, or error text. Failure/recovery: validation errors concern format only. Continuation: use the emailed link if it arrives.
FR-15 — Business data isolation. As a rental business owner, I should access only my own business data and never another business's data so that my business stays private. Provenance: explicit. Lifecycle: every business-scoped read and write runs under Supabase Row Level Security bound to the authenticated user's owner membership. Observable result: only the owner's business rows are returned or mutated. Failure/recovery: a request for another business's data is denied by RLS and surfaces as not-found/denied, never as leaked data. Continuation: the owner's own work.
FR-16 — Server-only secrets and environment configuration. As a rental business owner, I should trust that privileged keys never reach the browser so that my account and business are not exposed. Provenance: explicit. Lifecycle: SUPABASE_SERVICE_ROLE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, and RESEND_API_KEY are read only in server contexts; a .env.example documents required variables. Observable result: no privileged key appears in client bundles or browser-visible configuration. Failure/recovery: missing configuration fails fast with a clear server-side error. Continuation: normal operation.
FR-17 — Cookie-based Supabase Auth with separate clients. As a rental business owner, I should have a session that persists across server and client rendering so that navigation feels continuous. Provenance: explicit. Lifecycle: cookie-based Supabase Auth via @supabase/ssr, with distinct browser, server-component, and server-action/route-handler clients; no custom JWT handling. Observable result: consistent session across renders and actions. Failure/recovery: an expired session redirects to login. Continuation: protected work.
Product context. The owner runs a small equipment or party-rental business — bounce houses, tables and chairs, tents, AV, tools, photo booths, or generators — and works from a phone between jobs. RentalDesk is their operating tool, and Phase 1 gives them the account, the business, and the protected workspace that later phases will fill with gear, jobs, and customers.
Primary goal. Get from "no account" to "my own business, open on a protected dashboard" quickly and without ambiguity, and be certain that no other business can see their data.
Distinct accepted responsibilities.
Relevant inputs and decisions. Email and password; the business name at onboarding; the decision to sign out on a shared device; the decision to reset a forgotten password.
Interactions with other accepted participants. The owner interacts with Supabase Auth as the identity provider (credential verification, session cookies, confirmation and recovery emails, callback exchange). No other human persona participates in Phase 1; there are no staff, customer, or admin roles in this phase.
Observable success. The owner reaches the Dashboard as the owner of their business, sees the navigation and ruled empty-state panels, can sign out and back in, can reset a password, and can never reach another business's data.
/auth/sign-up./auth/callback; the route handler exchanges the code for a session cookie. If the link is invalid or expired, the owner is returned to an auth surface with a clear message and can sign in or request a new link./onboarding/create-business./auth/login (or is redirected there from a protected route)./onboarding/create-business or the Dashboard redirects to /auth/login./auth/forgot-password and enters their email./auth/callback to /auth/reset-password./auth/login and signs in with the new password.The creative direction — systematic product craft after Rasmus Andersson — is authoritative. The interface is the image: schematic diagrams, ruled tables, and code-like panels; no stock photography.
Mode. Dark mode as the primary ground.
Color tokens (exact hex by role).
#141517 (graphite ground)#1C1E21#F6F3EE (warm paper)#FF6A2B (tangerine — primary actions and active nav)#C6F24E (acid green — status only)#8A8F98#2A2D31Typography.
Shape language. Compact rounded controls at 6px radius; hairline 1px borders; sharp data rows with tabular alignment. No large-radius pill buttons.
Spacing rhythm. 4/8-pt spacing scale.
Layout. Left rail navigation on desktop; bottom tab bar on mobile; dense ruled rows and label/value pairs.
Imagery style. The interface itself is the imagery — schematic diagrams, ruled tables, code-like panels. No stock photos, no gradient blobs, no glass panels, no playful illustration.
Readability constraint. Headlines, wordmarks, labels, numbers, and card text and controls stay entirely inside the viewport and their container at 375px, 768px, and 1280px, wrapping or scaling (for example clamp() with its mobile size) to fit; no other element covers any part of them.
The public entry is a full-width graphite panel (#141517) carrying a 9-column stacked Space Grotesk headline at 44px on mobile rising to 104px on desktop: "Run your rental business from one desk", with the subline "Set up your business, sign in and open the dashboard that later holds your gear, jobs and customers." A single tangerine (#FF6A2B) rule sits beneath the headline. A compact sign-up card — hairline #2A2D31 border, 6px radius, surface #1C1E21 — pins to the right on desktop and stacks below the headline on mobile, carrying the primary call to action "Create your business" and a secondary "Sign in" path. The composition reads as a ruled instrument panel: the headline spans the viewport width, the tangerine rule marks the entry point, and the card is the one actionable object. It recomposes only accepted content and controls — no new behavior, page, or destination.
Interaction Model: Static Motion Tempo: restrained Hero Dimensionality: flat
Landing Hero Motion Brief.
/auth/sign-up.SUPABASE_SERVICE_ROLE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, and RESEND_API_KEY are never exposed to the browser; they are read only in server contexts and documented in .env.example. Provenance: explicit. Rationale: the source names these keys as never-browser-visible.@supabase/ssr with separate browser, server-component, and server-action/route-handler clients; no custom JWT handling. Provenance: explicit./onboarding/create-business and the Dashboard require login; unauthenticated users are redirected away from protected routes; authenticated users are redirected away from login/signup. Provenance: explicit.@/, a scalable folder structure, reusable UI components, consistent error and loading states. Provenance: explicit.Source-specified stack, preserved exactly:
@supabase/supabase-js@supabase/ssr (cookie-based Supabase Auth for Next.js App Router)@/Provisioned infrastructure inventory (authoritative for runnable services):
Supabase Postgres with RLS remains the authoritative store for identity-linked business data because the source requires Supabase for Postgres, Auth, Storage, and Row Level Security. The MariaDB service is available for application-owned persistent data and does not by itself justify new domain entities, authentication, or an ER diagram.
Constraints (binding).
SUPABASE_SERVICE_ROLE_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, or RESEND_API_KEY to the browser.Assumptions (narrow, labeled).
[Assumption] Email confirmation is required only when the Supabase project configuration requires it; the flow supports both cases.[Assumption] A user owns at most one business in Phase 1; business-state routing therefore reduces to "has a business" or "does not."[Assumption] The business creation form collects the business name and only the fields needed to create the business; no additional business profile fields are specified.[Assumption] The empty-state module screens name the future modules from the source list and contain no working controls for them.[Assumption] The provisioned FastAPI backend and MariaDB database are runtime inventory; Supabase remains the authoritative store for identity-linked business data per the explicit stack requirement./onboarding/create-business; business exists → Dashboard./auth/callback route handler that exchanges a Supabase Auth code for a session cookie.
RentalDesk
Set up your business, sign in and open the dashboard that later holds your gear, jobs and customers.
Phase 1 foundation
Create the account, then name the business you own.
Create your businessSign in
RentalDesk
Set up your business, sign in and open the dashboard that later holds your gear, jobs and customers.
Phase 1 foundation
Create the account, then name the business you own.
Create your businessSign in
No comments yet. Be the first!