Skip to content

feat(settings): implement system-wide settings module with CRUD APIs - #377

Merged
yusuftomilola merged 1 commit into
DistinctCodes:mainfrom
mdauwal:feature/settings-module
Oct 6, 2025
Merged

feat(settings): implement system-wide settings module with CRUD APIs#377
yusuftomilola merged 1 commit into
DistinctCodes:mainfrom
mdauwal:feature/settings-module

Conversation

@mdauwal

@mdauwal mdauwal commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

Overview

This PR introduces a Settings Module to manage system-wide configurations at the company level.
It includes entity definitions, DTOs, service, controller, and module setup with CRUD support.


🔨 Changes Introduced

  • Entity: Setting with fields:
    • defaultCurrency (default: USD)
    • timezone (default: UTC)
    • depreciationMethod (default: straight_line)
  • DTOs: CreateSettingDto & UpdateSettingDto with validation rules
  • Service: CRUD methods (create, findAll, findOne, update, remove)
  • Controller: REST endpoints for managing settings
  • Module: Registered SettingsModule with TypeOrmModule integration

📡 Endpoints

Method Endpoint Description
POST /settings Create a new setting
GET /settings Retrieve all settings
GET /settings/:id Retrieve a setting by id
PATCH /settings/:id Update a setting
DELETE /settings/:id Remove a setting

✅ Notes

  • Validated with class-validator decorators
  • Supports extension for additional system-wide configuration fields
  • Exported SettingsService for reuse in other modules if needed

🎯 Next Steps

  • Add authentication/authorization (e.g., admin-only access)
  • Seed default system setting on fresh installation

Closing

closes #335

@vercel

vercel Bot commented Oct 6, 2025

Copy link
Copy Markdown

@mdauwal is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@yusuftomilola
yusuftomilola merged commit ba81178 into DistinctCodes:main Oct 6, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Settings Module

2 participants