generated from azures04/Base-REST-API
Add badges, checkins, and transport endpoints
Introduce gamification and check-in support plus expanded transport/admin APIs. Added DDL for checkins, badges and user_badges. New repositories: badgeRepository, userBadgeRepository, checkinRepository. New routes: admin badge management, admin transport (lines/platforms/stations), public transport endpoints, user checkins and stations endpoints, and user badges on /me. Services updated: adminService (badge CRUD & user assignment), userService (checkins, badge queries), authService (hasAdminRights). Minor package.json name update. These changes implement database, repo, service and route wiring for badges, user_badins and checkin features and additional transport admin routes.
This commit is contained in:
@@ -1,21 +1,2 @@
|
||||
# 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](https://zod.dev/) 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**
|
||||
```bash
|
||||
git clone https://gitea.azures.fr/azures04/Base-REST-API.git
|
||||
cd Base-REST-API
|
||||
```
|
||||
# TCJourney Server
|
||||
TCJourney (TCJ) est un jeu de collection de transports. Ce dépôt contient le code de son backend
|
||||
Reference in New Issue
Block a user