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!

Login 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