Video summary

Build a Enterprise Multi-Tenant SaaS POS Application | Java Spring Boot + React + Redux Full Course

Main summary

Key takeaways

Technology

Course / Project Overview (POS SaaS, Multi-Tenant, Enterprise Features)

  • Builds a fullstack multi-tenant POS system for mall/supermarket/retail chains, emphasizing production-grade, scalable, and interview-worthy architecture.
  • Coverage includes:
    • Frontend design
    • Backend APIs
    • Authentication / Authorization
    • Billing
    • Inventory
    • Sales reporting
    • Discounts / Coupons
    • Role-Based Access Control (RBAC)
    • Payments
    • PDF receipts / invoices

Dashboards / Roles

  1. Cashier terminal

    • Create orders, view order history
    • Refunds
    • Customer management
    • Shift summaries
    • Search products
  2. Branch manager dashboard

    • Sales reports
    • Low stock view
    • Inventory updates
    • Employee and branch operations
    • Refund visibility
  3. Store admin / manager dashboard

    • Store-level analytics and management:
      • branches, products, categories, employees, alerts
  4. Super admin dashboard

    • Manage stores and subscriptions
    • Approve / block / pending requests

Tech Stack & Backend Foundations

Frontend

  • React, Redux Toolkit, Tailwind CSS, shadcn/ui (component library)
  • Supports dark/light themes
  • Dashboard UI patterns (cards, tables, dialogs, layouts)

Backend

  • Spring Boot, MySQL
  • Spring Security + JWT
  • Role-Based Access Control for endpoints (e.g., /api/superadmin requires an admin role)
  • Middleware:
    • JWT validator filter to authenticate requests and populate the security context
  • Payment integrations mentioned:
    • Stripe
    • Razorpay
  • Other tooling mentioned:
    • JWT libraries (JJWT + Jackson)
    • Cloud image upload placeholder
    • Mail sender setup

Demo Highlights: Cashier Terminal (Product → Order → Invoice PDF)

Cashier can…

  • Add products to cart, adjust quantities, and remove items
  • Select a customer and apply a discount percentage
  • Choose payment method (card/cash/UPI), with backend-integrated payment flows
  • Complete payment to create the order
  • Download invoice/receipt as PDF

Additional cashier features

  • View order history
  • Create refunds (reason + payment method)
    • Refunds reflect in shift summaries
  • Search products within store context
  • View shift-based summaries, including:
    • top selling product
    • payment breakdown
    • recent orders
    • refund counts

Dashboard Analytics & Operational Features

Branch Manager

  • Daily metrics:
    • today’s sales/orders
    • activation share
  • Low stock items
  • Payment breakdown (card/UPI)
  • Product performance breakdown
  • Inventory updates:
    • adjust quantities / add inventory
  • Employee management:
    • add/edit employees
  • Branch settings:
    • update store details, working days, address/description

Store Manager / Admin

  • Store-wide totals:
    • total sales, branches, products, employees (dynamic / non-static)
  • Sales trends and transaction reports
  • Alerts:
    • cashiers inactive beyond a configurable threshold
    • low stock
    • no sales today
    • refund spike filtering (e.g., refunds over a value)

Super Admin

  • Subscription plan management per store
  • Store status distribution:
    • pending / active / blocked
  • Approve/activate pending stores and approve store registrations

Backend API Course Content (Auth First, Then Domain APIs)

Authentication API

  • Spring Boot project initialization via Spring Initializer
  • JWT auth flow:
    • login/register endpoints
    • custom UserDetailsService
    • BCrypt password encoding
    • JWT claims include email and authorities/roles
    • stateless sessions; CSRF disabled
    • CORS configured for frontend origin(s)

User Domain

  • Endpoints described:
    • GET /api/users/profile (current user from JWT context)
    • GET /api/users/{id} (lookup by ID)
  • Uses JWT security context within service methods to fetch the current user

Store Domain

  • Store entity fields include:
    • brand/name
    • store admin (1–1)
    • status lifecycle: pending/active/decline/banned/blocked
    • contact (embedded)
    • store type
  • Endpoints include:
    • create/get/update/delete store (role restrictions implied)
    • get store created by current admin
    • get store by employee
    • super admin moderation (approve/decline/block)

Product & Category

  • Product entity includes:
    • name, SKU id, description
    • MRP/selling price
    • brand, image URL
    • created/updated times
  • Categories are store-scoped:
    • 4 CRUD endpoints: create/get-by-store/update/delete category
  • Product endpoints:
    • CRUD for products
    • get products by store
    • search products by keyword (store scoped)

Branch Domain

  • Branch model includes:
    • name, address, phone/email
    • working days (element collection)
    • open/close times
    • store relation, branch manager relation
  • Branch endpoints:
    • CRUD for branches
    • get branches by store ID

Inventory Domain

  • Inventory managed at branch level
  • Entity links: branch ↔ product, plus quantity + last updated
  • Inventory endpoints:
    • create/update/delete inventory
    • get by inventory ID
    • get inventory by product across branches
    • branch-specific queries supported

Employee Domain

  • Employees modeled as users with roles assigned and mapped to branch/store context
  • Endpoints include:
    • create employee for store
    • create employee for branch
    • update/delete/find employees
    • list employees under store or branch

Customer Domain

  • CRUD + search:
    • create/update/delete/get by ID/get all/search by keyword
  • Customer search uses repository methods:
    • case-insensitive full name/email matching

Orders Domain

  • Order entity + order items:
    • order ↔ branch, cashier, customer
    • order ↔ many order items
    • order items ↔ products
  • Includes total amount, status, payment type
  • Endpoints:
    • create order
    • get order by ID
    • filter orders by branch (optional filters: customer ID, cashier ID, payment type, order status)
    • get today’s orders for branch
    • orders by cashier
    • orders by customer
    • top 5 recent orders by branch (date-time range logic)

Refund Domain

  • Refund model:
    • refund ↔ order, cashier, branch, sift report (shift period)
    • includes reason + amount
  • Refund endpoints:
    • create refund for an order (cashier context)
    • fetch refunds for admin/cashier/branch
    • fetch refunds by sift report
    • fetch refunds in cashier date ranges
    • delete refund (not always enabled; described as admin-only / production caution)

Shift / Sift Report Domain (Shift Summaries)

  • Shift (sift report) captures a cashier’s working period:
    • start/end times
    • totals (sales, refunds, net sales)
    • total orders
    • payment breakdown (cash/card/UPI)
    • top selling products + recent orders + refunds list
  • Endpoints:
    • start shift (create shift record)
    • end shift (compute summary)
    • get current shift progress
    • get sift report by cashier and date
    • get sift reports by cashier / by branch / by ID
    • delete (role restricted)

Implementation logic highlights

  • Calculate totals based on orders/refunds within shift time window
  • Aggregate payment summary by payment type
  • Compute top-selling products by summing product quantities across shift orders
  • Avoid DB duplicate constraint issues by fixing relationship mapping
    • (top selling products mention includes resolving a duplicate key error)

Frontend Integration Work (React + Redux + Routing + UI)

Redux Store Architecture

  • Creates global Redux store with slices for:
    • o/auth, user, customer, product, category, store, branch, employee
    • operational slices like cart and shift
  • Uses:
    • createAsyncThunk for API calls via Axios
    • extra reducers for pending/fulfilled/rejected state

Routing & Navigation

  • React Router defines pages:
    • cashier flow: order/terminal, customer, return/refund, saved summary
  • Sidebar navigation includes links for:
    • terminal, order history/refund/customer/sift summary
  • Logout:
    • dispatches logout thunk and redirects

Login Integration

  • Login form dispatches login thunk
  • On success:
    • stores JWT in localStorage
    • dispatches get user profile
    • redirects based on role (cashier/store admin/branch manager/super admin, etc.)

UI Integration Examples

  • Product card:
    • Redux-driven addToCart dispatch
  • Cart state supports:
    • add/update/remove quantities
    • discount (percentage or fixed)
    • select customer
    • hold/resume orders
    • clear cart/reset after order completion
  • Proceed payment:
    • triggers order creation and then clears cart

Order History + Order Details

  • Dialog-based view:
    • opens order details in an invoice-like layout
    • includes invoice PDF download placeholder

Refund UI

  • Refund page flow:
    • select order
    • select refund reason + refund method
    • confirm → dispatch refund create thunk
    • show receipt dialog after success (PDF logic to be added later)

Shift Summary UI

  • Sift summary page includes:
    • shift info card
    • sales summary
    • payment summary
    • top selling items
    • recent orders table
    • refunds processed table
  • Reads from safe report Redux slice (current shift)
  • Refresh logic displays computed totals

Key Tutorials / Guides Emphasized

  • JWT authentication configuration
    • stateless, CORS, role checks via request matchers
  • Spring Initializer project setup
    • dependencies: web, security, JPA, MySQL, validation, JWT, payments
  • Entity modeling & relationships
    • store → branch → inventory
    • store → products → categories
    • order → order items
    • refund → order + cashier + branch + sift report
    • sift report → payment summaries/top products/recent orders/refunds
  • Aggregation computations for shift reports
    • net sales = sales − refunds
    • payment summary = group orders by payment type and compute totals + percentages
    • top selling products = sum quantities per product across shift orders

Main Speakers / Sources (Implied)

  • Course instructor / presenter: referenced via “Hey everyone” / “welcome back” (no specific name in subtitles)
  • Auto-generated subtitle source:
    • YouTube video: “Build a Enterprise Multi-Tenant SaaS POS Application | Java Spring Boot + React + Redux Full Course”

Original video