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!

Project Tasks22

#15

Implement Products & Categories API

To Do

As a backend developer, I want to implement FastAPI endpoints for products and categories so that the Customer Portal and Admin Portal can fetch, search, filter, and manage product data. Endpoints: GET /products (with search, category, stock filter, pagination), GET /products/{id}, POST /products (admin), PUT /products/{id} (admin), DELETE /products/{id} (admin), GET /categories. Include real-time stock validation logic and auto-hide out-of-stock items from customer-facing responses.

AI 80%
Human 20%
High Priority
2 days
AI Credits:7
Backend Developer
#1

Implement Theme & Design System

To Do

As a frontend developer, I want to implement the global color palette, typography, and design tokens from the polar-architecture design system so that all pages share a consistent visual identity. Set up CSS variables for primary (#003366), secondary (#FF6600), accent (#28A745), neutral whites and grays. Configure Inter font, spacing scale, border radius tokens, and shadow system. Remove any scaffold pages not present in the design (welcome page, generic dashboard sub-pages not matching design). This task must be completed before any page implementation begins.

AI 85%
Human 15%
High Priority
1 day
AI Credits:4
Frontend Developer
#2

Build Landing Page

To Do

As a customer, I want to see an interactive blueprint-themed homepage (Landing v2 design) so that I get a memorable first impression of Navjeevan Supershopee. Implement the pencil-sketch retail store animation, scroll-triggered blueprint-to-store transition, hover effects showing product details, drawing-pin button micro-interactions, and the hero section with category highlights. Implement based on the existing Landing (v2) JSX design. Links to Login and Register pages.

Depends on:#1
Waiting for dependencies
AI 90%
Human 10%
High Priority
2 days
AI Credits:8
Frontend Developer
#19

Implement Reviews & Ratings API

To Do

As a backend developer, I want to implement FastAPI endpoints for product ratings and reviews so that customers can submit reviews and admins can moderate them. Endpoints: GET /products/{id}/reviews, POST /products/{id}/reviews, PUT /admin/reviews/{id} (approve/reject), DELETE /admin/reviews/{id}. Include average rating calculation and review validation (one review per order item per customer).

Depends on:#15
Waiting for dependencies
AI 80%
Human 20%
Medium Priority
1 day
AI Credits:5
Backend Developer
#12

Build Admin Inventory Page

To Do

As an admin, I want to use the Inventory page (Inventory v2 design) to add, edit, update stock levels, and auto-hide out-of-stock products so that the Customer Portal always shows accurate availability. Implement the product table with status badges, visibility toggle, inline edit and delete actions, Add Product modal with image upload, low-stock alert panel, stats bar, and search/filter toolbar. Implement based on existing Inventory (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
2 days
AI Credits:8
Frontend Developer
#22

Implement Role-Based Access Control

To Do

As a backend developer, I want to implement role-based access control (RBAC) so that admin-only endpoints are protected and customers cannot access admin functionality. Implement JWT middleware with role claims (customer, admin), FastAPI dependency injection guards on all /admin/* routes, Firebase Auth token verification, and frontend route guards that redirect unauthorised users to Login. Include bcrypt password encryption for email/password auth.

Depends on:#15
Waiting for dependencies
AI 78%
Human 22%
High Priority
1.5 days
AI Credits:7
Backend Developer
#9

Build Checkout Page

To Do

As a customer, I want to use the Checkout page (Checkout v2 design) to enter delivery details and make a payment via Razorpay so that my order is placed securely. Implement order summary panel, address form, payment method selector (UPI, cards, net banking), Razorpay payment gateway integration, payment success and failure handling, and order confirmation screen. Implement based on existing Checkout (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 82%
Human 18%
High Priority
2 days
AI Credits:8
Frontend Developer
#4

Build Auth/Register Page

To Do

As a new customer, I want to use the Auth/Register page (Auth v2 design) to create an account via Mobile OTP or Email & Password so that I can start shopping. Implement registration form with OTP verification flow, Firebase Auth integration, field validation with inline error messages, and redirect to Home page on success. Implement based on existing Auth (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1.5 days
AI Credits:6
Frontend Developer
#3

Build Login Page

To Do

As a customer or admin, I want to use the Login page (Login v2 design) to sign in via Mobile OTP or Email & Password so that I can access my portal securely. Implement the two-column layout: left brand panel with deep blue gradient and blueprint illustration, right auth form panel with tab switcher (Mobile OTP / Email & Password), OTP input flow, show/hide password toggle, Forgot Password link, Guest access option, and Admin Portal link. Use Firebase Auth for OTP. Implement based on existing Login (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1.5 days
AI Credits:6
Frontend Developer
#18

Implement Inventory Management API

To Do

As a backend developer, I want to implement FastAPI endpoints for inventory management so that admins can update stock levels, trigger low-stock alerts, and auto-hide out-of-stock products. Endpoints: GET /admin/inventory (with stock status filters), PUT /products/{id}/stock, GET /admin/inventory/low-stock-alerts. Include inventory log recording on every stock change and threshold-based alert logic.

Depends on:#15
Waiting for dependencies
AI 78%
Human 22%
High Priority
1.5 days
AI Credits:6
Backend Developer
#14

Build Admin Reports Page

To Do

As an admin, I want to use the Reports page (Reports v2 design) to generate and export reports on sales, orders, best sellers, revenue by category, and payment mode breakdown so that I can analyse business performance. Implement report type selector, date range picker, report preview with charts and tables, PDF export button, Excel export button, and summary KPI cards. Implement based on existing Reports (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
2 days
AI Credits:8
Frontend Developer
#10

Build Orders Tracking Page

To Do

As a customer, I want to use the Orders page (Orders v2 design) to track the real-time status of my orders and view order history so that I know exactly when my order is ready. Implement order status timeline (Placed → Preparing → Ready → Served), order history list, order details drawer, invoice PDF download button, and status badge colour coding. Implement based on existing Orders (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1.5 days
AI Credits:7
Frontend Developer
#6

Build Products Page

To Do

As a customer, I want to use the Products page (Products v2 design) to search, filter, and browse the full product catalogue so that I can find specific items. Implement search bar, category filter chips, stock status filter, sort controls (price, rating, popularity), product grid with cards showing name, price, rating, and Add to Cart button. Blueprint-style loading state. Implement based on existing Products (v2) JSX design. Links to Product Detail and Cart.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1.5 days
AI Credits:7
Frontend Developer
#13

Build Admin Orders Page

To Do

As an admin, I want to use the Orders page (Orders v2 design) to view all incoming orders in a sequential timestamp view and update their statuses so that customers receive timely service. Implement order list with timestamp sorting, status update controls (Placed → Preparing → Ready → Served), order detail drawer, search and filter by status/date, and real-time refresh indicator. Implement based on existing Orders (v2) JSX design for the admin context.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1.5 days
AI Credits:7
Frontend Developer
#8

Build Cart Page

To Do

As a customer, I want to use the Cart page (Cart v2 design) to review, update, and remove items before proceeding to checkout so that I have full control over my order. Implement cart item list with quantity controls, price breakdown (subtotal, taxes, total in INR), empty cart illustration, real-time stock validation indicators, and Proceed to Checkout CTA. Implement based on existing Cart (v2) JSX design. Links to Checkout page.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1 day
AI Credits:6
Frontend Developer
#16

Implement Cart & Checkout API

To Do

As a backend developer, I want to implement FastAPI endpoints for cart management and checkout so that customers can add/remove items, validate stock in real time, and place orders. Endpoints: GET /cart, POST /cart/items, PUT /cart/items/{id}, DELETE /cart/items/{id}, POST /orders (place order with stock validation), POST /payments/initiate (Razorpay order creation), POST /payments/verify (webhook signature validation). Include INR currency handling and payment failure rollback.

Depends on:#15
Waiting for dependencies
AI 78%
Human 22%
High Priority
2.5 days
AI Credits:8
Backend Developer
#7

Build Product Detail Page

To Do

As a customer, I want to use the Product Detail page (Product Detail v2 design) to view full product information, ratings, and reviews, and add items to my cart so that I can make an informed purchase decision. Implement product image gallery, name, SKU, price in INR, stock indicator, quantity selector, Add to Cart button with animation, ratings breakdown, review list, and review submission form. Implement based on existing Product Detail (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1.5 days
AI Credits:7
Frontend Developer
#11

Build Admin Dashboard Page

To Do

As an admin, I want to use the Dashboard page (Dashboard v2 design) to view analytics — sales trends, best sellers, low inventory alerts, and peak order times — so that I can make informed business decisions. Implement stat summary cards (total sales, order count, revenue, low-stock count), sales trend chart, best-selling products list, peak order times heatmap, and low inventory alert banners. Implement based on existing Dashboard (v2) JSX design.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
2 days
AI Credits:8
Frontend Developer
#5

Build Customer Home Page

To Do

As a logged-in customer, I want to use the Home page (Home v2 design) to browse product categories and featured items so that I can quickly find what I need. Implement category grid, featured products carousel, search bar linking to Products page, cart icon with item count badge, and navigation header. Implement based on existing Home (v2) JSX design. Links to Products, Product Detail, and Cart pages.

Depends on:#1
Waiting for dependencies
AI 88%
Human 12%
High Priority
1.5 days
AI Credits:7
Frontend Developer
#17

Implement Orders Management API

To Do

As a backend developer, I want to implement FastAPI endpoints for order tracking and management so that customers can track order status and admins can update order statuses. Endpoints: GET /orders (customer history), GET /orders/{id}, GET /orders/{id}/invoice (PDF generation), PUT /orders/{id}/status (admin), GET /admin/orders (all orders with filters and timestamp sort). Include invoice PDF generation using a Python PDF library.

Depends on:#16
Waiting for dependencies
AI 78%
Human 22%
High Priority
2 days
AI Credits:7
Backend Developer
#20

Implement Reports & Analytics API

To Do

As a backend developer, I want to implement FastAPI endpoints for admin reports and analytics so that admins can generate and export business performance data. Endpoints: GET /admin/reports/sales-summary, GET /admin/reports/orders-count, GET /admin/reports/best-sellers, GET /admin/reports/revenue-by-category, GET /admin/reports/payment-breakdown, GET /admin/reports/export?format=pdf|excel, GET /admin/analytics/sales-trends, GET /admin/analytics/peak-order-times. Include PDF and Excel export generation.

Depends on:#18#17
Waiting for dependencies
AI 78%
Human 22%
Medium Priority
2.5 days
AI Credits:7
Backend Developer
#21

Integrate Frontend with Backend APIs

To Do

As a frontend developer, I want to wire all designed pages to the live FastAPI backend so that real data flows through the application end-to-end. Replace all mock/static data in Landing, Home, Products, Product Detail, Cart, Checkout, Orders, Dashboard, Inventory, and Reports pages with API calls using a shared Axios/fetch service layer. Implement loading states, error handling toasts, and auth token injection (JWT) for protected routes. Configure environment-based API base URLs.

Depends on:#5#2#17#16#10#4#6#13#20#18#8#19#14#9#3#11#15#7#12
Waiting for dependencies
AI 80%
Human 20%
High Priority
3 days
AI Credits:8
Frontend Developer
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