azures04 f8c1340b41 Refactor license and permission management, add services
Renamed licenceRepository.js to licenseRepository.js and updated its API to use status instead of userId for licenses. Moved permission checking logic from userRepository to permissionsRepository. Added new service layers for license, permissions, and user management, implementing error handling and business logic. Removed the old register.js service and cleaned up test.js. Updated database schema to remove userId from licenses.
2026-01-27 05:49:50 +01:00
2026-01-27 04:16:08 +01:00
2026-01-27 04:16:08 +01:00
2026-01-27 04:16:08 +01:00
2026-01-27 04:16:08 +01:00
2026-01-27 04:16:08 +01:00
2026-01-27 04:16:08 +01:00
2026-01-27 04:16:08 +01:00

Base-REST-API

A robust, modular, and secure REST API boilerplate built with Node.js and Express. It features a recursive file loader for routes and schemas, along with a powerful validation middleware using Zod.

🚀 Features

  • Automated Loading: Recursively loads routes and validation schemas from the file system.
  • Strict Validation: Request bodies and query parameters are validated using Zod before reaching the controller.
  • Clean Architecture: Separation of concerns with Routes (HTTP layer), Services (Business logic), and Schemas (Validation).
  • Security First: Inputs are stripped of unknown fields automatically.
  • Custom Logger: Integrated color-coded logging system for development and file logging for production.
  • Error Handling: Standardized JSON error responses.

📦 Installation

  1. Clone the repository
       git clone https://gitea.azures.fr/azures04/Base-REST-API.git
       cd Base-REST-API
    
Description
No description provided
Readme 150 KiB
Languages
JavaScript 100%