Skip to content

Standardize API response format across all endpoints #905

Description

@nanaf6203-bit

Problem

API endpoints return inconsistent response formats: some return raw Prisma objects, some have { data, meta }, some just { message }. No standardized envelope format.

Expected Outcome

Every API response follows the same structure.

Acceptance Criteria

  • Response interceptor wraps all successful responses
  • Standard envelope: { success, data, meta, timestamp }
  • Standard error format
  • Pagination meta: { page, limit, total, totalPages }

Files Affected

New: src/common/interceptors/response-format.interceptor.ts, all controllers

Difficulty

Medium

Estimated Effort

Medium (1 week)

Labels

api, refactoring, enhancement

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions