Overview
ManageHub supports only a single physical location. Hub operators running multiple sites (e.g. two Lagos branches, one Abuja branch) cannot manage all locations under one account. Multi-location support is a critical feature for growing hub operators.
Context
Workspace entity: backend/src/workspaces/entities/workspace.entity.ts
WorkspaceLog entity: backend/src/workspace-tracking/entities/workspace-log.entity.ts
Booking entity: backend/src/bookings/entities/booking.entity.ts
- This is a schema-level change — requires a TypeORM migration, not just
synchronize: true
Tasks
Files to Modify / Create
- New:
backend/src/locations/ (module, entity, controller, service)
backend/src/workspaces/entities/workspace.entity.ts
backend/src/workspaces/workspaces.controller.ts
- New:
backend/src/migrations/AddLocationEntity.ts
backend/src/app.module.ts
Overview
ManageHub supports only a single physical location. Hub operators running multiple sites (e.g. two Lagos branches, one Abuja branch) cannot manage all locations under one account. Multi-location support is a critical feature for growing hub operators.
Context
Workspaceentity:backend/src/workspaces/entities/workspace.entity.tsWorkspaceLogentity:backend/src/workspace-tracking/entities/workspace-log.entity.tsBookingentity:backend/src/bookings/entities/booking.entity.tssynchronize: trueTasks
Locationentity:id,name,address,city,country(default"Nigeria"),timezone(IANA timezone string, e.g."Africa/Lagos"),isActive(bool),createdAt,updatedAtlocationIdFK toWorkspaceentity; existing workspaces get a default location seeded in migrationPOST /locations— create location (super_admin only)GET /locations— list all active locations (all authenticated users)PATCH /locations/:id— update location details (super_admin only)GET /workspaces— support?locationId=filter to scope results to a location?locationId=filter for cross-location reportingnpm run migration:generate -- src/migrations/AddLocationEntityFiles to Modify / Create
backend/src/locations/(module, entity, controller, service)backend/src/workspaces/entities/workspace.entity.tsbackend/src/workspaces/workspaces.controller.tsbackend/src/migrations/AddLocationEntity.tsbackend/src/app.module.ts