Skip to content

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 configuration

Shared Package (@mallguide/shared)

Types and constants shared across web, admin, and functions.

  • Models: One file per entity in shared/src/models/, re-exported via index.ts
  • Paths: Firestore path builders in shared/src/paths/firestorePaths.ts
  • Static types: Union types derived from as const arrays (e.g. storeCategoriesStoreCategory)
  • 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

EnvironmentProject IDStatus
Devqss-payments-devActive
Prodseeder-22c4dFunctions 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 setUserRole Cloud Function only
  • API key auth (x-api-key: mg_*) for external/agent access