Skip to content

Create the Game Session Backend Module #611

Description

@A6dulmalik

Create the Game Session Backend Module

Priority

P0 — Critical

Labels

backend game-engine feature priority: p0 help wanted

Description

Game sessions are a core part of Mind Block's gameplay experience.

A dedicated backend abstraction is required to represent an active gameplay session instead of relying on individual puzzle/progress records.

Objective

Create a dedicated NestJS game-sessions module.

Suggested Structure

backend/src/game-sessions/

├── game-sessions.module.ts
├── game-sessions.controller.ts
├── game-sessions.service.ts
├── entities/
├── dto/
├── interfaces/
└── tests/

Session States

The session should support:

- CREATED
- ACTIVE
- PAUSED
- COMPLETED
- EXPIRED
- ABANDONED

Suggested Fields

id
userId
guestId
status
difficulty
selectedCategories
challengeCount
currentChallenge
score
xpEarned
startedAt
completedAt

Requirements

Implement:

Session creation
Session retrieval
Session ownership
Session status management
Session state transitions
Session completion
Session expiration
Validation of invalid state transitions

Acceptance Criteria

  • game-sessions module exists.
  • Session creation endpoint exists.
  • Active session can be retrieved.
  • Session status transitions are validated.
  • Session ownership is enforced.
  • Invalid transitions return appropriate errors.
  • Unit tests are included.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions