PROJECT_INFO

OmniwareWeb (Omniware.lk) is a full-stack e-commerce web app for custom PC builds and components in Sri Lanka. It is a monorepo with a Next.js frontend and an Express API that can run inside the same app (serverless) or as a standalone server.


Architecture

  • Frontend: Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS 4.
  • API: Express 5, Mongoose, JWT — mounted at `/api/*` via a catch-all route for single-origin deployment (e.g. Vercel).
  • Database: MongoDB via Mongoose.
  • Standalone server: The `server/` folder can run as a separate Express app for local or other hosting.

  • Main Features

  • Storefront: Home (hero, search, featured), shop by category, product detail with gallery/variants/specs, cart, checkout.
  • Auth: Login/register; JWT in localStorage; axios sends `Authorization: Bearer <token>`.
  • Admin: Dashboard, products (list/create/edit), orders (list/detail), categories & spec features, settings; protected by `requireAdmin`, rate limiting.
  • API surface: Auth, products, orders, admin, builder (custom build requests), analytics.
  • Data models: User, Product (variants, specs, images, stock), Category, Brand, Order, OrderEvent, BuildRequest, CategoryFeaturedSpecs, AuditLog, AnalyticsDaily, Event.

  • TECH_STACK
    C:\TECH>list
    Next.js 16React 19TypeScriptExpress 5MongooseMongoDBJWTTailwind CSS 4React QueryZodFramer Motion
    KEY_FEATURES
    • [01]Storefront: shop by category, product detail, cart & checkout
    • [02]Custom PC builder requests (BuildRequest API)
    • [03]JWT auth; admin dashboard (products, orders, categories, analytics)
    • [04]Single-origin API at /api/* (serverless-friendly for Vercel)
    • [05]Admin: products CRUD, orders, categories & spec features, settings