azures04 22542243f6 Add auth, JWT tokens, and bootstrap startup
Introduce bootstrap entrypoint and prestartup to ping DB and generate/manage RSA keypair. Add security module for key IO. Implement JWT-based access and refresh tokens (tokensService) with refresh_tokens table and repo. Add auth, provider and user services, and refresh-token management. Update repositories (users, credentials, providers, servers) with SQL fixes and new helper methods. Move DDL execution to bootstrap (remove from server). Update package.json main and add dependencies (bcryptjs, jsonwebtoken). Update .env.example and .gitignore accordingly.
2026-09-02 01:55:58 +02:00
2026-08-26 11:55:13 +02:00
2026-08-26 11:55:13 +02:00
2026-08-26 11:55:13 +02:00
2026-08-26 11:55:13 +02: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
    
S
Description
Backend REST fédéré et décentralisé pour l'écosystème de poinçonnerie de transports en commun. Intègre un provider OIDC autonome, un protocole d'authentification inter-serveur sécurisé et un moteur de gestion de réseaux (GTFS, lignes, stations et succès).
Readme AGPL-3.0
172 KiB
Languages
JavaScript 100%