Full-Stack E-Commerce Platform for Clothing Brands
Project Overview
Forever is a production-ready e-commerce platform designed for modern clothing retail. It combines a rich, browsable storefront for customers with a full admin and sub-admin system for running the business behind the scenes — everything from products and inventory to orders, promotions, and returns. The project uses a monolith-first, SPA-like architecture powered by Inertia.js, pairing Laravel 13 on the backend with React 19 and TypeScript on the frontend. That combination gives the feel and responsiveness of a single-page app without the overhead of building and maintaining a separate API layer. Storefront Features The customer-facing side includes a dynamic homepage with hero sections, featured collections, and promotional banners. Shoppers can search and filter products by name, gender, category, brand, size, colour, and price, then view detailed product pages with multi-image galleries, variant selection, and live stock indicators. From there, the shopping experience covers a persistent session-based cart, a full checkout flow with address management, promo code validation, and PayHere payment integration, plus a wishlist for saving items. Customers can leave verified-purchase reviews with ratings, track their orders in real time with full status history, and submit return requests down to the individual item level. Account management covers profile details, an address book, and order history. Admin Panel The admin panel centres on a dashboard with sales analytics, revenue charts built with Recharts, recent orders, and key performance indicators. It also handles user management for admins and sub-admins with role-based access, along with global store configuration. Sub-Admin Panel The sub-admin panel is where day-to-day store operations happen. It covers full product management with multi-image uploads and colour-and-size variant handling, brand and hierarchical category management, and curated collections that support optional discount percentages. Inventory is tracked per variant-size combination with a full inventory log, and promotions are managed through coupon codes with percentage or fixed discounts and expiry dates. Order management spans the full lifecycle from pending through shipped, delivered, and cancelled, with a dedicated returns workflow for approving, rejecting, or refunding requests. Sub-admins can also moderate customer reviews and update shipment status and tracking information. Security Security is handled through role-based access control via Spatie Laravel Permission, with two-factor authentication delivered by email OTP for admin and sub-admin logins. OTP tokens are bound to device fingerprints for an extra layer of protection, and authentication scaffolding is built on Laravel Fortify. AI Chatbot An AI-powered chatbot, built on OpenRouter, is integrated directly into the storefront to handle customer support queries. Tech Stack Backend: PHP 8.4, Laravel 13 as the application framework, Inertia.js as the server-driven SPA bridge, Laravel Fortify for authentication, Spatie Laravel Permission for role-based access control, Laravel Wayfinder for type-safe route generation, and Laravel Tinker for development. Frontend: React 19 and TypeScript for a type-safe UI, Inertia.js as the frontend adapter, Tailwind CSS for styling, Radix UI and shadcn/ui for accessible component primitives, Lucide React for icons, Recharts for dashboard charting, DnD Kit for drag-and-drop interactions, Sonner for toast notifications, and Vite as the build tool. Dev Tooling: Pest PHP for testing, Laravel Pint for PHP code style, ESLint and Prettier for JavaScript and TypeScript linting and formatting, Laravel Sail for a Dockerised development environment, and Laravel Pail for real-time log tailing. Payments & Integrations: PayHere for payment processing, OpenRouter for the AI chatbot, and Mailtrap as an email sandbox during development. Why This Stack Pairing Laravel with Inertia and React made it possible to build a genuinely SPA-like storefront and admin experience — fast navigation, no full page reloads — while keeping business logic, validation, and security on the backend where it belongs. Role-based access control and two-factor authentication were built in from the start given how much sensitive operational data flows through the admin and sub-admin panels, and the variant-level inventory system was designed to handle the real complexity of tracking stock across colour and size combinations rather than treating a product as a single unit.