Storefront
apps/web — Next.js 16 shop: catalog, search, cart, checkout, customer
account, blog and vendor pages. Runs on port 3000.
What BabyMart is, the four apps it ships, who uses it and how these docs are organised.
BabyMart is a complete online baby store in one monorepo. Customers shop on a web storefront or a mobile app. Staff run the business from an admin dashboard. All three talk to one API that stores everything in MongoDB and takes payments through Stripe, SSLCommerz or cash on delivery.
The four apps share TypeScript types and one cream-and-chocolate design system, so a product, an order or a button looks and behaves the same everywhere.
Storefront
apps/web — Next.js 16 shop: catalog, search, cart, checkout, customer
account, blog and vendor pages. Runs on port 3000.
Admin dashboard
apps/admin — Vite + React console for catalog, orders, users, vendors,
purchases, content and analytics. Runs on port 5173.
API
apps/api — Express 5 + Mongoose 9. Auth, products, orders, payments,
uploads, email and the employee fulfilment workflow. Runs on port 8000.
Mobile app
apps/mobile — React Native 0.88 app for iOS and Android with shopping,
payments and admin/vendor screens.
Three shared packages sit under packages/: @babyshop/types (domain types),
@babyshop/ui (components, design tokens and the logo) and @babyshop/config
(API and payment constants). See Shared packages.
| Who | Role in the code | What they do | Where |
|---|---|---|---|
| Customer | user |
Browses, buys, tracks orders, keeps a wishlist and writes reviews. | Storefront, mobile app |
| Admin | admin |
Manages everything: catalog, orders, users, vendors, content, settings. | Admin dashboard, mobile app |
| Employee | employee + an employee_role |
Moves orders through fulfilment. call_center confirms, incharge assigns, packer packs, deliveryman delivers, accounts closes. |
Admin dashboard, mobile app |
| Vendor | vendor |
Applies to sell, then manages their own products. | Storefront /vendor, mobile app |
| Demo visitor | preview |
Browses the whole admin dashboard read-only — every write is blocked. | Admin dashboard |
The role list lives in apps/api/models/userModel.ts. How each role is checked is explained in Auth and roles.