Skip to content

Introduction

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.

  • Catalog — products with categories (as a tree), brands, product types, product bases, sizes and colors; bulk upload from Excel/CSV in the admin.
  • Finding things — filters, text search, voice search (mobile) and search by image, which matches products by dominant colour.
  • Buying — server-side cart, wishlist, compare (up to 4 products), addresses, reviews, display-only multi-currency prices.
  • Paying — Stripe Checkout (web), Stripe PaymentSheet (mobile), SSLCommerz and cash on delivery. Paid orders are confirmed by webhook.
  • Fulfilment — a role-based workflow from confirmation to packing, delivery, cash collection and completion. See How it works.
  • Running the business — dashboards and analytics, purchases from suppliers, salaries, notifications, newsletter subscriptions.
  • Content — banners, menus, CMS pages built from sections, and a blog with authors, categories and tags.
  • Marketplace — optional vendor storefronts that an admin can turn on or off.
  • SEO — metadata, Open Graph image, sitemap and JSON-LD on the storefront.
  1. Start Here — the product without code: what it is, the main flow, the stack.
  2. Getting Started — from an empty machine to all apps running locally.
  3. Architecture — how the pieces fit: API, auth, payments, shared packages.
  4. Apps — a tour of the storefront, the admin dashboard and the mobile app.
  5. Operations — deploying and fixing common problems.
  6. Reference — every endpoint, every data model and the glossary.