The Nigeria Association of Physiotherapy Students website backend written using Nodejs, Expressjs, MongoDB.
# Nigerian Association of Physiotherapy Students
---
## Project Title
Welcome to the **Nigerian Association of Physiotherapy Students (NAPS) Backend**. This is the backend API for the NAPS website, managing users, news, and administrative tasks.
---
## Features
- **User Management:** Create, retrieve, update, and delete user accounts with role-based access control.
- **Authentication:** Secure user sign-in using JWTs and password management with `bcryptjs`.
- **Authorization Middleware:** Role-based access control to restrict certain endpoints to authorized users like the President and Vice President.
- **News & Updates:** Create, read, update, and delete news articles with specific access permissions.
- **Password Reset Flow:** A secure, manual password reset system verified by designated administrators (President or Vice President).
- **Centralized Error Handling:** Consistent and informative error messages are managed by a dedicated middleware.
- **Database Management:** Uses Mongoose to connect to a MongoDB database.
- **Environment Configuration:** Secure handling of environment variables for different deployment stages.
---
## API Endpoints
The base URL for all endpoints is `/api/v1`.
### 1\. Auth Routes (`/auth`)
| Method | Endpoint | Description | Access |
| :------ | :------------------------ | :-------------------------------------------------------------- | :------------------------ |
| `POST` | `/login` | Signs in a user and returns a JWT token. | Public |
| `POST` | `/change-password` | Changes a user's password. | Authenticated User |
| `POST` | `/reset-password-request` | Initiates a password reset request. | Public |
| `PATCH` | `/reset-password` | Hand …