Skip to content

[GF-BE-13] Build resource and equipment booking backend module #1088

Description

@yusuftomilola

Problem

ManageHub only supports booking workspace slots (desks, offices, meeting rooms). There is no way to book individual equipment or resources such as projectors, podcast booths, standing desks, or camera rigs. Hubs that offer these items have no way to manage or monetise them through the platform.

Proposed Solution

Create a new NestJS module at backend/src/resources/ with two entities.

Entity: Resource

  • id (UUID), name (string), description (text)
  • type (enum: projector | monitor | whiteboard | podcast_booth | camera | standing_desk | locker | other)
  • totalQuantity (integer), pricePerHour (integer, kobo — 0 for free resources)
  • isAvailable (boolean, default true)
  • images (JSONB array of URLs, nullable)
  • locationId (UUID FK → locations, nullable)
  • createdAt, updatedAt

Entity: ResourceBooking

  • id (UUID), resourceId (FK → resources), userId (FK → users)
  • startTime (timestamp), endTime (timestamp)
  • quantityRequested (integer, default 1)
  • status (enum: pending | confirmed | cancelled | completed)
  • paymentId (UUID FK → payments, nullable)
  • totalAmount (integer, kobo)
  • createdAt, updatedAt

Endpoints:

Method Path Access
POST /resources Admin
GET /resources Public
GET /resources/:id Public
PATCH /resources/:id Admin
DELETE /resources/:id Admin
GET /resources/:id/availability Public — accepts date query param
POST /resources/:id/book Authenticated member
GET /resources/bookings/my Authenticated member

Acceptance Criteria

  • Both entities created with TypeORM migrations
  • Availability check validates requested quantity against totalQuantity - sum of confirmed bookings for the time slot
  • POST /resources/:id/book initiates payment via PaymentsService for paid resources
  • ResourcesModule is registered in AppModule

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignStellar WaveIssues in the Stellar wave programbackendenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions