project-1e993573

byDeep Prajapati

ReviewGen is a modern enterprise-grade multi-tenant SaaS platform that enables businesses with multiple locations to generate more high-quality customer reviews using AI, QR codes, analytics, and centralized team management. The application is built as a commercial Software-as-a-Service product where thousands of independent businesses (tenants) can securely operate inside the same platform while remaining completely isolated from one another. The platform has two completely separate layers. The first layer is the Platform Layer, which belongs only to the SaaS owner. Platform administrators manage pricing plans, subscriptions, AI providers, feature flags, billing rules, maintenance mode, platform users, audit logs, announcements, background jobs, email templates, API credentials, diagnostics, tenant management, and overall system health. Platform administrators never belong to customer organizations by default. Instead, they can temporarily impersonate an organization in a secure read-only support mode for troubleshooting without becoming part of that tenant. The second layer is the Organization Layer, where every customer company operates its own isolated workspace. When a company signs up, the system automatically creates a new organization, assigns the creator as the Organization Owner, provisions a trial subscription, creates a default shop location, initializes AI configuration, and generates the first QR code. Every organization has its own members, shops, reviews, QR codes, analytics, subscriptions, AI settings, invitations, usage limits, and business data. No organization can ever access another organization's data. Each organization supports a complete hierarchy of business roles. The Organization Owner has complete control over the workspace, billing, team members, shops, subscriptions, and settings. Organization Admins manage daily operations and staff but cannot transfer ownership or manage platform-level settings. Managers are assigned to specific shop locations and can manage only those assigned branches. Staff members have limited operational permissions. Viewers have read-only access to analytics and reports. Permissions are controlled through a centralized RBAC permission engine instead of hardcoded role checks. The application follows a true multi-tenant architecture where every database query, API request, and business operation is scoped to the currently active organization. The active organization is resolved through authenticated session context rather than trusting client-side data. All sensitive operations validate authentication, organization membership, role permissions, subscription limits, and ownership before execution. Authentication is implemented using Supabase Auth with secure JWT sessions, refresh tokens, email verification, password recovery, organization invitations, workspace switching, and enterprise identity resolution. Platform administrators are resolved independently from organization members using a dedicated identity resolver. Client-side cookies are never trusted for authorization decisions; every protected request is validated server-side. The platform includes comprehensive business modules including organization management, shop management, QR code generation, AI-powered review generation, customer review collection, analytics dashboards, invitations, audit logging, subscriptions, pricing plans, feature flag management, announcements, maintenance mode, AI provider management, API key management, email template management, background job monitoring, and system diagnostics. Subscription management is organization-based rather than user-based. Each organization subscribes to a pricing plan that defines limits such as maximum shops, maximum team members, AI generation quotas, review limits, storage quotas, and premium features. Every protected API validates subscription limits before allowing actions such as creating shops, inviting members, or generating AI reviews. Organizations exceeding their limits receive appropriate upgrade prompts while suspended or expired subscriptions are automatically restricted to billing-related functionality. Security is a primary design goal throughout the platform. Every API validates authentication, organization membership, permissions, subscription status, and resource ownership. Audit logs record important business events including logins, workspace switches, organization creation, shop modifications, permission denials, subscription changes, and platform administration activities. Platform-wide maintenance mode, feature flags, diagnostics, and monitoring tools allow safe operation of the SaaS environment. The application is designed with clean architecture principles including repository patterns, service layers, dependency abstraction, centralized permission guards, reusable business services, typed interfaces, modular APIs, and support for both Mock and Supabase database providers. Mock mode allows the entire application to function without an actual database for development and testing, while Supabase mode provides production-ready PostgreSQL persistence with Row Level Security support. The frontend is built with Next.js App Router, React, TypeScript, Tailwind CSS, and modern responsive UI principles. Backend APIs are implemented using Next.js Route Handlers with Supabase as the primary authentication and database provider. The project is designed to be scalable, secure, maintainable, and production-ready for deployment as a commercial SaaS product serving many independent organizations simultaneously.

LandingReviewsLogin
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 6

project-1e993573 System Requirements Document

Introduction

This document outlines the system requirements for "project-1e993573," a modern enterprise-grade multi-tenant SaaS platform designed to enable businesses with multiple locations to generate high-quality customer reviews using AI, QR codes, analytics, and centralized team management.

System Overview

project-1e993573 is a SaaS platform that allows thousands of independent businesses to operate securely within the same platform while remaining isolated from one another. The platform consists of two layers: the Platform Layer and the Organization Layer. The Platform Layer is managed by platform administrators who oversee pricing plans, subscriptions, AI providers, and more. The Organization Layer is where each customer company operates its own workspace, complete with its own members, shops, reviews, and data.

Source Content Inventory

  • Platform Layer: Managed by platform administrators, includes management of pricing plans, subscriptions, AI providers, feature flags, billing rules, maintenance mode, platform users, audit logs, announcements, background jobs, email templates, API credentials, diagnostics, tenant management, and system health.
  • Organization Layer: Each organization has its own isolated workspace with members, shops, reviews, QR codes, analytics, subscriptions, AI settings, invitations, usage limits, and business data.
  • RBAC Permission Engine: Centralized control of permissions instead of hardcoded role checks.
  • Authentication: Supabase Auth with secure JWT sessions, refresh tokens, email verification, password recovery, and more.
  • Subscription Management: Organization-based with pricing plans defining limits on shops, team members, AI generation quotas, and more.
  • Security: Comprehensive validation of authentication, organization membership, permissions, subscription status, and resource ownership.
Page 2 of 6

Functional Requirements as Story Points

  • As a Platform Administrator, I should be able to manage pricing plans, subscriptions, AI providers, feature flags, billing rules, and platform users.
  • As a Platform Administrator, I should be able to temporarily impersonate an organization in a secure read-only support mode for troubleshooting without becoming part of that tenant.
  • As an Organization Owner, I should be able to control the workspace, billing, team members, shops, subscriptions, and settings.
  • As an Organization Admin, I should be able to manage daily operations and staff.
  • As a Manager, I should be able to manage specific shop locations assigned to me.
  • As a Staff Member, I should have limited operational permissions.
  • As a Viewer, I should have read-only access to analytics and reports.
  • As a User, I should be able to authenticate using Supabase Auth with secure JWT sessions.
  • As a User, I should be able to recover my password and verify my email.
  • As a User, I should be able to switch workspaces and resolve enterprise identity.
  • As an Organization, I should be able to subscribe to a pricing plan that defines limits such as maximum shops, team members, and AI generation quotas.
  • As an Organization, I should receive upgrade prompts when exceeding subscription limits.
  • As a Platform Administrator, I should be able to manage audit logs, announcements, maintenance mode, and system diagnostics.

User Personas

  • Platform Administrator: Manages the platform layer, including pricing plans, subscriptions, and system health.
  • Organization Owner: Has complete control over the organization's workspace and settings.
  • Organization Admin: Manages daily operations and staff within the organization.
  • Manager: Oversees specific shop locations.
  • Staff Member: Performs limited operational tasks.
  • Viewer: Accesses analytics and reports in a read-only mode.
Page 3 of 6

Core User Flows

  • Platform Administrator manages pricing plans -> updates subscription settings -> monitors system health.
  • Organization Owner creates a new organization -> assigns roles to team members -> manages billing and subscriptions.
  • Manager oversees shop operations -> reviews analytics -> manages assigned staff.
  • User authenticates via Supabase Auth -> switches workspaces -> accesses organization-specific data.

Visuals Colors and Theme

  • primary: #1A73E8 (a deep blue for the brand)
  • primary_light: #4D90FE (a lighter tint of primary for hover states)
  • secondary: #FF6F61 (a coral hue for headlines and emphasis)
  • accent: #FFD700 (a vibrant gold for CTAs and active states)
  • highlight: #FFA500 (an orange for hover states and notifications)
  • bg: #F5F5F5 (a light gray for the page background)
  • surface: rgba(255, 255, 255, 0.8) (a white card/panel background)
  • text: #333333 (a dark gray for primary text)
  • text_muted: #777777 (a softer gray for secondary text)
  • border: rgba(0, 0, 0, 0.1) (a subtle border color)
Page 4 of 6

Signature Design Concept

Interactive Review Generation Flow: The homepage features an interactive flow where users can see a dynamic representation of the review generation process. As users scroll, they witness a QR code being scanned, leading to a visual of AI processing customer feedback, culminating in a dashboard displaying analytics. This flow is animated using motion/react to provide a seamless and engaging experience. The QR code and AI processing stages are interactive, allowing users to click and explore more details about each step.

LANDING HERO MOTION BRIEF

The landing hero showcases a QR code that, when scanned, triggers an animation of AI processing, transforming customer feedback into actionable insights displayed on a dynamic dashboard. The animation loop lasts 10 seconds, with layers including the QR code, AI processing visuals, and the analytics dashboard. The interaction allows users to hover over elements for more information, with responsive behavior ensuring clarity on all devices.

Interaction Model & Motion Direction

  • Interaction Model: Animated
  • The landing page features moderate scroll-triggered reveals and hover transitions, with spring physics on interactive elements. Each section has a distinctive core mechanic, such as morphing SVGs or kinetic typography, to maintain user engagement.
Page 5 of 6

Non-Functional Requirements

  • The platform must support a multi-tenant architecture with isolated workspaces for each organization.
  • The system should ensure high availability and scalability to accommodate thousands of tenants.
  • Security measures must include comprehensive validation of authentication, permissions, and resource ownership.

Tech Stack

  • Frontend: Next.js, React, TypeScript, Tailwind CSS
  • Backend: Next.js Route Handlers, Supabase for authentication and database
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth
  • Deployment: Docker, Kubernetes

Assumptions and Constraints

  • The platform will be deployed as a commercial SaaS product.
  • Organizations will operate independently within the platform, with no data sharing between them.
  • The system must handle subscription management at the organization level.
Page 6 of 6

Glossary

  • SaaS: Software as a Service
  • RBAC: Role-Based Access Control
  • JWT: JSON Web Token
  • API: Application Programming Interface
  • AI: Artificial Intelligence

This document provides a comprehensive overview of the requirements for project-1e993573, ensuring a clear understanding of the system's capabilities and design.

Landing design preview
Login: Sign In
Dashboard: View Assigned Shops
Shops: Manage Shop Location
Staff: Manage Assigned Staff
Reviews: Respond to Reviews
Analytics: Review Shop Analytics
QR Codes: View QR Code
Landing design preview
Login: Sign In
Dashboard: View Assigned Shops
Shops: Manage Shop Location
Staff: Manage Assigned Staff
Reviews: Respond to Reviews
Analytics: Review Shop Analytics
QR Codes: View QR Code