polar-architecture

byAkhil

You are a senior full-stack AI application architect and product engineer. Design and generate a complete production-ready web and mobile application system. Provide: - System architecture - Tech stack recommendation - Database schema - API structure - UI/UX wireframe structure - Authentication flow - Payment integration logic - Admin analytics dashboard logic - Deployment approach - Security considerations - Scalability recommendations - Sample data models - Folder structure - Third-party integrations Business Overview Business Name: Navjeevan Supershopee Location: Jalgaon, India Type: Retail store (Food items, snacks, beverages, ready-to-eat dishes) Build two portals: 1. Customer Portal 2. Admin Portal Cloud-ready and scalable architecture required. Customer Portal Requirements Authentication: - Mobile OTP login - Email + password - Secure JWT/OAuth sessions Product Listing: - Show available items - Categories, search, filters - Ratings and reviews Cart & Checkout: - Add/remove items - Real-time stock validation - Promo-ready structure Payment Integration: - Razorpay / Stripe / PayU - UPI, Cards, Net Banking - Payment confirmation & failure handling Order Management: - Track order status (Placed, Preparing, Ready, Served) - Order history - Invoice PDF Ratings & Reviews: - Product rating system - Admin moderation Admin Portal Requirements Secure Login: - Role-based access Order Dashboard: - Sequential timestamp view - Status updates Inventory Management: - Add/edit products - Update stock - Auto-hide out-of-stock items Reports: - Total sales - Orders count - Dish-wise quantity sold - Best seller - Revenue by category - Payment mode breakdown - Export: PDF/Excel Analytics Dashboard: - Sales trends - Best-selling drinks - Low inventory alerts - Peak order times Technical Requirements Suggested Stack: Frontend: React / Next.js + React Native / Flutter Backend: Node.js (Express) or Django Database: PostgreSQL or MongoDB Hosting: AWS / Vercel / Firebase Storage: S3 / Cloudinary Payment: Razorpay OTP: Firebase Auth / Twilio Database Collections: - Users - Products - Categories - Orders - Order_Items - Payments - Reviews - Inventory_Logs - Admin_Users Security: - Bcrypt encryption - HTTPS - Role-based authorization - Input validation - Webhook validation - Rate limiting Scalability: - 1000+ daily orders - Horizontal scaling - Redis caching optional - Monitoring and backups Expected Output Generate: 1. System architecture diagram (text explanation) 2. Database schema 3. API endpoints 4. Authentication flow 5. Admin workflow logic 6. Folder structure 7. Third-party services list 8. Deployment guide 9. Scalability roadmap 10. AI feature recommendations

LandingLoginAuthCheckoutInventoryOrdersReportsProductsCartProduct DetailDashboardHome
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 4

System Requirements Document (SRD)

Project Name: polar-architecture

1. Introduction

The polar-architecture project is a comprehensive system designed to support the operations of Navjeevan Supershopee, a retail store located in Jalgaon, India. The system will include two portals: a Customer Portal for seamless shopping and a Admin Portal for efficient management of inventory, orders, and analytics. This document outlines the system's requirements, ensuring scalability, security, and user-friendly design tailored to the needs of the business and its customers.

2. System Overview

The polar-architecture system will provide a cloud-ready, scalable, and secure architecture to manage the retail operations of Navjeevan Supershopee. The system will include:

  • A Customer Portal for browsing products, placing orders, and tracking order statuses.
  • An Admin Portal for managing inventory, monitoring sales, and generating reports.
  • Real-time stock validation and secure payment integration for a seamless shopping experience.
  • Role-based access control to ensure secure admin operations.

The system will be designed to handle over 1,000 daily orders, with provisions for horizontal scaling and robust monitoring.

3. Functional Requirements

Customer Portal

  • As a Customer, I should be able to register and log in using mobile OTP or email and password.
  • As a Customer, I should be able to browse products by categories, search, and apply filters.
  • As a Customer, I should be able to view product ratings and reviews.
  • As a Customer, I should be able to add/remove items from the cart and proceed to checkout.
  • As a Customer, I should be able to make payments using UPI, cards, or net banking.
  • As a Customer, I should be able to track my order status (Placed, Preparing, Ready, Served).
  • As a Customer, I should be able to view my order history and download invoices in PDF format.
  • As a Customer, I should be able to rate and review products.
Page 2 of 4

Admin Portal

  • As an Admin, I should be able to log in securely with role-based access.
  • As an Admin, I should be able to view and update order statuses in a sequential timestamp view.
  • As an Admin, I should be able to add, edit, and update product details and stock levels.
  • As an Admin, I should be able to auto-hide out-of-stock items from the Customer Portal.
  • As an Admin, I should be able to generate reports on total sales, orders count, dish-wise quantity sold, best sellers, revenue by category, and payment mode breakdown.
  • As an Admin, I should be able to export reports in PDF or Excel format.
  • As an Admin, I should be able to view sales trends, low inventory alerts, and peak order times in the analytics dashboard.

Additional Requirement

  • As a User, I should be able to selectively re-run and regenerate the System Requirements Document (SRD) to reflect updated requirements or changes.

4. User Personas

  1. Customer

    • Primary user of the Customer Portal.
    • Can browse products, place orders, and track order statuses.
    • Can rate and review products.
  2. Admin

    • Primary user of the Admin Portal.
    • Manages inventory, orders, and generates reports.
    • Has role-based access for secure operations.

5. Visuals Colors and Theme

The polar-architecture project will use a vibrant and modern design with the following color palette:

  • Primary Color: Green (#a6c637) – Represents growth, freshness, and reliability.
  • Secondary Color: Yellow (#ffec01) – Adds energy and highlights key actions.
  • Accent Color: Deep Blue (#1b3a69) – For contrast and emphasis on important elements.
  • Neutral Colors: White (#FFFFFF) and Light Gray (#F5F5F5) – For backgrounds and text readability.

The theme will focus on simplicity and clarity, ensuring a user-friendly experience for both customers and admins.

Page 3 of 4

6. Signature Design Concept

Interactive Blueprint Homepage
The homepage of the Customer Portal will resemble an architectural blueprint, reflecting the "polar-architecture" theme. The design will feature:

  • A pencil-sketch animation of a retail store layout that dynamically highlights different sections (e.g., Snacks, Beverages, Ready-to-Eat).
  • Hover effects that transform the sketch into a realistic product image with details like price and ratings.
  • A scroll-triggered animation where the blueprint evolves into a fully stocked store, symbolizing the journey from planning to execution.
  • Micro-interactions such as buttons that "pop" like drawing pins and a cart icon that animates like a shopping basket being filled.

This unique design will captivate users and create a memorable first impression.

7. Non-Functional Requirements

  • Scalability: Support for over 1,000 daily orders with horizontal scaling.
  • Security: HTTPS, bcrypt encryption for passwords, role-based authorization, and input validation.
  • Performance: API response time under 300ms.
  • Availability: 99.9% uptime with robust monitoring and backups.
  • Localization: Support for Indian currency (INR) and time zone (IST).

8. Tech Stack

Frontend

  • React for the web application.
  • React Native for the mobile application.

Backend

  • Python with FastAPI for building APIs.

Database

  • MySQL for relational data (e.g., users, orders, products).
  • Alembic for database migrations.

Payment Integration

  • Razorpay for secure payment processing.
Page 4 of 4

Authentication

  • Firebase Auth for OTP-based login.

Deployment

  • Docker and Kubernetes for containerization and orchestration.

9. Assumptions and Constraints

  • The system will primarily serve users in India, with INR as the default currency.
  • The system will be hosted on a cloud platform (e.g., AWS or GCP) for scalability.
  • Real-time stock validation assumes accurate and timely updates from the admin.
  • Payment gateway integration will comply with Indian regulations (e.g., UPI, net banking).

10. Glossary

  • JWT: JSON Web Token, used for secure user authentication.
  • UPI: Unified Payments Interface, a real-time payment system in India.
  • RDBMS: Relational Database Management System, used for structured data storage.
  • IST: Indian Standard Time, the time zone for India.
  • HTTPS: HyperText Transfer Protocol Secure, ensures secure communication over the web.

This updated SRD reflects your request for a Yellow and Green theme and includes the additional requirement for selective SRD regeneration. Let me know if there’s anything else you’d like to refine or expand upon!

Landing design preview
Login: Sign In
Dashboard: View Analytics
Orders: Update Status
Inventory: Manage Products
Inventory: Edit Stock
Reports: Generate Report
Reports: Export PDF/Excel