Profile management and administrative operations REST API routing configuration
This module provides complete routing configuration for the WayrApp user management system,
implementing user profile operations, password management, and administrative user management
functions. The routes support both user-facing profile management operations and administrative
functions with appropriate role-based access control.
The routing structure follows RESTful conventions with clear separation between user profile
operations (accessible to authenticated users for their own profiles) and administrative
operations (restricted to admin users). The module implements comprehensive middleware stacking
including authentication, role-based authorization, and input validation using Zod schemas.
Key features include user profile CRUD operations, secure password update functionality,
administrative user listing with pagination and filtering, role management capabilities,
comprehensive input validation using Zod schemas, role-based access control with proper
authorization checks, and dependency injection pattern for clean architecture.
The routes are designed with security as a primary concern, ensuring that users can only
access and modify their own profiles while providing administrators with comprehensive
user management capabilities. All sensitive operations require proper authentication and
authorization validation.
Author
Exequiel Trujillo
Since
1.0.0
Example
// Mount user routes in main application importuserRoutesfrom'@/modules/users/routes/userRoutes';
// Available endpoints: // GET /api/v1/users/profile - Get current user profile // PUT /api/v1/users/profile - Update current user profile // PUT /api/v1/users/password - Update user password // GET /api/v1/users - List all users (admin only) // GET /api/v1/users/:id - Get user by ID (admin only) // PUT /api/v1/users/:id/role - Update user role (admin only)
Profile management and administrative operations REST API routing configuration
This module provides complete routing configuration for the WayrApp user management system, implementing user profile operations, password management, and administrative user management functions. The routes support both user-facing profile management operations and administrative functions with appropriate role-based access control.
The routing structure follows RESTful conventions with clear separation between user profile operations (accessible to authenticated users for their own profiles) and administrative operations (restricted to admin users). The module implements comprehensive middleware stacking including authentication, role-based authorization, and input validation using Zod schemas.
Key features include user profile CRUD operations, secure password update functionality, administrative user listing with pagination and filtering, role management capabilities, comprehensive input validation using Zod schemas, role-based access control with proper authorization checks, and dependency injection pattern for clean architecture.
The routes are designed with security as a primary concern, ensuring that users can only access and modify their own profiles while providing administrators with comprehensive user management capabilities. All sensitive operations require proper authentication and authorization validation.
Author
Exequiel Trujillo
Since
1.0.0
Example
Example