Project Overview
MallGuide is an indoor mapping and store discovery platform for shopping centres.
Project Structure
platform/
├── web/ # React web application (consumer PWA)
├── admin/ # Admin dashboard
├── shared/ # Shared types, models, and utilities
├── functions/ # Firebase Cloud Functions
├── agent/ # AI agent workspace (skills, scripts, agent CLAUDE.md)
├── docs/ # This documentation site (VitePress)
├── firestore.rules # Firestore security rules
└── firebase.json # Firebase configurationShared Package (@mallguide/shared)
Types and constants shared across web, admin, and functions.
- Models: One file per entity in
shared/src/models/, re-exported viaindex.ts - Paths: Firestore path builders in
shared/src/paths/firestorePaths.ts - Static types: Union types derived from
as constarrays (e.g.storeCategories→StoreCategory) - No build step — consumed directly via
"main": "src/index.ts"
Rule: All enums/constants that are validated by both UI and API MUST live in @mallguide/shared. Never hardcode enum arrays in functions/ or web/ locally.
Firebase Projects
| Environment | Project ID | Status |
|---|---|---|
| Dev | qss-payments-dev | Active |
| Prod | seeder-22c4d | Functions not yet deployed |
Security
- Admin access via Firebase Custom Claims (
request.auth.token.role == 'admin') - Editor role with per-mall assignment (
request.auth.token.role == 'editor'+assignedMalls) - Role changes through
setUserRoleCloud Function only - API key auth (
x-api-key: mg_*) for external/agent access