AP Malls

About the project

AP Malls

Full-stack retail commerce and point-of-sale platform

AP Malls connects a customer storefront, role-aware back office, inventory ledger, delivery operations, barcode printing, and cashier POS in one retail system.

Developers

The people building AP Malls

Abhishek Kumar Chaudhary

Abhishek Kumar Chaudhary

Full-stack Developer

Builds the connected customer, administration, and operational experience across Next.js and Laravel, with a focus on maintainable data flow, role-aware interfaces, transactional commerce behavior, and practical debugging.

Budhanagar Colony, Madhubani, Bihar, India

  • Builds responsive and performant web applications with a strong eye for UI and UX.
  • Develops responsive Next.js and React interfaces with TypeScript, Tailwind CSS, reusable components, and API-backed state.
  • Integrates Laravel services, validation, resources, authentication, permissions, and PostgreSQL-backed workflows across the application.
  • Works across catalog, cart, checkout, inventory, POS, barcode, delivery, printing, and access-control features.
  • Broader experience includes JavaScript, Node.js, .NET, Express, MongoDB, and SQL.
  • Professional experience includes Software Developer at IISERVZ and an MCA from AKTU.
Md. Faiyyaj Alam

Md. Faiyyaj Alam

Website designer, full-stack developer, PHP and Laravel developer

Contributes full-stack implementation experience with a practical focus on PHP, Laravel, interface delivery, and the operational needs of a retail application.

Purnea, Bihar, India

  • Full-stack web development profile focused on PHP, Laravel, Python, and software delivery.
  • Public GitHub profile with 62 repositories as of the latest sourced profile read.
  • Contributes practical UI, admin, and backend implementation experience to the project.

3

Experiences

Storefront, admin panel, and POS dashboard

1

Shared catalog

Products power online shopping and counter sales

80mm

Receipt style

Simple supermarket-style thermal bill output

Interview answer

Tell me about the project

AP Malls is a full-stack retail platform designed for both online ordering and physical counter sales. Customers browse a hierarchical catalog, manage carts and addresses, place orders, and confirm delivery. Staff use permission-scoped workspaces for catalog, inventory, fulfillment, delivery, access control, and POS billing. A Next.js application provides the user experiences and secure backend-for-frontend routes, while a Laravel API owns business rules, transactional stock, payments, and PostgreSQL persistence.

The problem

A retail business often manages its website, counter billing, stock, labels, delivery staff, and permissions in disconnected tools. That produces duplicate catalog work, inconsistent inventory, unclear ownership, and unreliable handoffs between roles.

The solution

The project uses one shared catalog and transactional backend so the storefront, admin operations, delivery workflow, and POS all work from the same products, prices, stock balances, orders, payments, and role rules.

What it includes

One retail system across website, back office, delivery, and counter billing

AP Malls is not only a storefront. It is shaped around the real operational loop: create catalog data once, sell it online and at the register, print labels, manage payments, and keep the admin view aligned with sales activity.

Customer Storefront

Public shopping pages for home, products, categories, product details, cart, wishlist, checkout, account access, support, and policies.

Admin Operations

Role-aware admin pages for dashboard insights, categories, brands, units, products, banners, orders, cash registers, barcode templates, and security.

POS Billing

Dedicated cashier workspace with register sessions, product search, barcode scan flow, held bills, checkout, printable receipts, reports, and order edits.

Barcode System

Admin product barcode generation, template management, printable labels, QR-capable layouts, and scan-friendly product lookup for store counters.

Inventory Ledger

Authoritative stock balances, immutable movements, reconciliation indicators, low-stock visibility, and reason-based physical adjustments.

Delivery Operations

Assignment lifecycle, courier handover reporting, customer confirmation, OTP verification, COD settlement, disputes, and manager resolution.

Access Control

User administration, protected system roles, grouped permission assignment, role-specific dashboards, and backend-enforced capability checks.

System architecture

How a request moves through AP Malls

The frontend is not trusted with business totals or authorization. It gathers user intent, presents optimistic feedback where appropriate, and sends minimal payloads through server-side proxies. Laravel validates the request, checks permissions, executes domain services, persists a transaction, and returns normalized resources.

A Next.js App Router frontend and backend-for-frontend layer consuming a versioned Laravel REST API backed by Eloquent and PostgreSQL/Supabase.

  1. 1

    Browser interaction in a Server or Client Component

  2. 2

    Next.js page data helper or same-origin Route Handler

  3. 3

    Sanctum bearer token attached only on the server

  4. 4

    Versioned Laravel controller and Form Request validation

  5. 5

    Permission middleware and domain service contract

  6. 6

    Eloquent transaction against PostgreSQL/Supabase

  7. 7

    API Resource response normalized into shared TypeScript models

  8. 8

    Role-aware UI refresh or optimistic-state reconciliation

Data and reliability principles

The Laravel API is authoritative for permissions, prices, totals, stock, order state, and payment state.

Stock movements are immutable audit events; product stock is only a synchronized compatibility field.

URL parameters represent catalog filters and pagination so browsing state is reproducible.

Critical completion flows are row-locked and idempotent to make retries safe.

Public project-profile data is static and contains no credentials or private operational records.

Technical deep dive

Built layer by layer

Open any area to see how it is implemented, which decisions shape it, and which tools support it.

Frontend

Next.js renders public, customer, staff, and POS experiences from shared typed contracts.

  • Next.js App Router
  • Role-aware screens
  • Customer, admin, and POS surfaces

Backend

Laravel owns validation, business rules, authorization, transactions, resources, and persistence.

  • Laravel REST API
  • Service and resource layers
  • PostgreSQL-backed commerce data

Security and Access

Authentication and authorization are enforced at both presentation and API boundaries.

  • Sanctum token flow
  • Roles and permissions
  • Protected role-specific workspaces

Catalog and Inventory

A structured catalog feeds every channel while one ledger remains the source of stock truth.

  • Two-level categories
  • Backend filtering and pagination
  • Auditable stock movements

Commerce and POS

Online orders and counter billing share catalog, pricing, stock, order, and payment rules.

  • Orders and payments
  • Cash register sessions
  • Receipts and balance tracking

Delivery and Confirmation

Delivery completion requires an auditable handoff instead of a one-sided courier action.

  • Assignment state machine
  • Customer consent
  • Idempotent COD settlement

Media and Printing

Product labels, counter receipts, and staff invoices use purpose-built output formats.

  • Barcode and QR labels
  • 80mm receipts
  • A4 sales invoices

Role-aware product design

One system, six focused experiences

Navigation and actions follow each person's job, while Laravel permissions enforce the same boundaries at the API.

Customer

Discover products, place orders, and control personal delivery confirmation.

  • Catalog and category browsing
  • Cart, wishlist, addresses, and checkout
  • Order tracking, OTP generation, confirmation, and disputes

Super Admin

Control the complete platform and its access model.

  • Store-wide metrics and operations
  • Catalog, barcode, delivery, banners, and registers
  • Users, roles, and grouped permissions

Admin

Run delegated administration without bypassing protected system records.

  • Permission-scoped catalog and order management
  • Delivery oversight and dispute resolution
  • Assigned access-control operations

Store Manager

Manage day-to-day inventory, fulfillment, delivery, and store performance.

  • Stock balances, movements, and adjustments
  • Order fulfillment and delivery assignment
  • Revenue, cost, margin, and exception visibility

Cashier

Complete fast, session-bound counter billing.

  • Assigned cash register sessions
  • Product scan, search, hold, recall, and payment
  • Thermal receipt printing and current-session sales

Delivery Boy

Manage only personally assigned deliveries and customer handoffs.

  • Availability and owned assignments
  • Ordered delivery status transitions
  • Handover reporting and customer-provided OTP confirmation

Project flow

How the pieces work together

1

Shopping

Customer browses products, adds items to cart or wishlist, accepts terms on signup, checks out, and tracks orders.

2

Catalog

Admin maintains product details, pricing, tax, stock, media, barcode data, categories, brands, units, and product visibility.

3

Promotion

Admin creates website banners for homepage sliders and offer sections, with image or video support and scheduled visibility.

4

Counter Sale

Cashier opens the assigned register, scans or searches products, holds bills when needed, recalls them, accepts payment, and prints receipts.

5

Inventory

Every stock-changing event records a transactional movement; managers investigate exceptions and use reason-required adjustments for physical corrections.

6

Delivery

A confirmed order is assigned, progressed by the courier, reported as handed over, and completed only after customer or manager confirmation.

Operating principles

Built for a premium mall workflow

The current build supports a retail business that needs online discovery, structured admin control, reliable counter sales, and simple print outputs. The design direction stays quiet and practical so staff can repeat the same workflows every day without visual noise.

Catalog first

Product data feeds browsing, billing, labels, and admin details.

Counter ready

Cashiers can scan, hold, recall, edit, pay, and print.

Role separated

Admins, customers, managers, delivery staff, and cashiers each get purpose-built screens.

Promotion aware

Sliders and offer banners are controlled from the backend.

Engineering decisions

Problems solved during development

These examples show how the project moved from visible symptoms to durable fixes across UI, API, and database boundaries.

Accurate hierarchical browsing

Challenge
Frontend-only category filtering operated on one page of products and returned incorrect parent totals.
Solution
A public category-tree API and descendant-aware backend product query now combine category, search, sort, filters, and pagination.
Outcome
Parent and child browsing, counts, and pagination now agree across homepage, category pages, and product listings.

One source of inventory truth

Challenge
Independent product quantities and stock rows could diverge after purchases, sales, cancellations, or adjustments.
Solution
Stock services, row locking, movement keys, and immutable adjustments route every inventory event through the ledger.
Outcome
Store Managers can audit how a balance changed and reconcile legacy discrepancies without silent overwrites.

Stable rapid cart updates

Challenge
Fast quantity clicks allowed older server responses to overwrite newer customer intent, causing visible bouncing.
Solution
The cart provider retains the latest desired quantity, applies optimistic totals, and reconciles responses against pending mutations.
Outcome
The interface stays responsive while final prices and totals still come from the backend.

Consent-based delivery completion

Challenge
A courier could previously complete delivery and COD settlement without customer acknowledgement.
Solution
A two-party handoff records courier reporting, customer confirmation or OTP, disputes, timestamps, and manager resolution.
Outcome
Delivered metrics and COD payments reflect an auditable confirmation instead of a one-sided status update.

Permission-driven experiences

Challenge
A shared interface exposed irrelevant navigation and actions even when APIs correctly rejected them.
Solution
Central role helpers now shape sidebars, headers, dashboards, product actions, and POS isolation while middleware enforces every operation.
Outcome
Each role sees a focused workspace, and hidden controls never replace backend authorization.

Output designed for its paper

Challenge
Printing responsive screens clipped tables, while barcode labels lacked reliable quiet zones and scaling.
Solution
Dedicated templates now target small barcode labels, 80mm thermal receipts, and A4 staff invoices independently.
Outcome
Each output is readable, scannable, and sized for its real operational use.

Tools and packages

Technology with a defined job

Packages are selected around application responsibilities rather than listed as isolated technologies.

Frontend application

Rendering, interaction, styling, icons, feedback, and static analysis.

Next.js 16.2.10
App Router pages, layouts, Server Components, Route Handlers, caching, and metadata
React 19.2.4
Interactive forms, providers, dialogs, optimistic workflows, and role-aware components
TypeScript 5
Shared API contracts and compile-time checking across components and routes
Tailwind CSS 4
Responsive implementation of the AP Malls design system and print layouts
Lucide React
Consistent semantic icons across storefront, admin, delivery, and POS
Sonner
Accessible success, validation, permission, and network feedback

Backend and data

Versioned APIs, persistence, authentication, permissions, media, and operational documents.

PHP 8.3 and Laravel 13.8
REST controllers, validation, services, dependency injection, jobs, migrations, and API resources
Laravel Sanctum
Token authentication between Next.js server routes and protected Laravel endpoints
PostgreSQL / Supabase
Relational commerce data, constraints, transactional locking, and hosted persistence
Spatie Permission
Roles, capabilities, permission middleware, and protected administrative actions
Spatie Activity Log
Auditable model and operational changes
Socialite
Google authentication integration capability
Intervention Image
Server-side product and content image processing
Laravel Excel
Spreadsheet import and export capability for operational data

Barcode and document output

Machine-readable product labels and purpose-sized print documents.

Picqer Barcode Generator
Barcode generation for product labels and scanning workflows
Milon Barcode
Laravel barcode rendering used by printable label templates
Simple QR Code
QR-capable barcode template output
Dompdf
Backend PDF document generation capability
Browser print CSS
Dedicated 80mm receipts, A4 sales invoices, and label-sheet previews

Quality and developer tooling

Repeatable verification of backend behavior, frontend contracts, and API documentation.

PHPUnit 12
Feature coverage for authorization, stock, POS, delivery, and lifecycle rules
ESLint 9
Next.js and React code-quality checks
TypeScript compiler
No-emit application-wide contract verification
Laravel Postman generator
Regenerated API collection from the implemented Laravel routes
Laravel Pint
Consistent backend PHP formatting

Project maturity

A working platform with room to grow from real feedback

AP Malls already demonstrates end-to-end commerce, operational roles, transactional inventory, delivery consent, and purpose-built printing. Future refinements can follow client feedback without replacing the shared domain foundation.