Oasis User Backend is the backend service for the user-facing section of the Oasis Scholarships Platform. This service provides a RESTful API for managing user accounts, scholarships, and advanced features such as complex search filters and user notifications.
-
User Management
- User registration, login, and CRUD operations.
- Account verification and password recovery procedures.
-
Scholarship Management
- Complex search with advanced filters (IDs, locations, deadlines).
- Add/remove scholarships from user favorites.
- Follow scholarships to receive notifications.
-
Security
- Secure authentication and data handling.
- Robust protection against common vulnerabilities.
This project is built with the following technologies and packages:
| Package | Purpose |
|---|---|
bcrypt |
For hashing passwords to securely store sensitive user credentials. |
cookie-parser |
To parse and manage HTTP cookies. |
cors |
Enables Cross-Origin Resource Sharing for secure client-server interaction. |
express-validator |
Middleware for validating and sanitizing incoming user inputs. |
helmet |
Adds security headers to protect against common web vulnerabilities. |
jsonwebtoken |
Implements secure authentication using JSON Web Tokens (JWT). |
mongoose |
Object Data Modeling (ODM) for MongoDB, simplifying database interactions. |
morgan |
Logs HTTP requests for better monitoring and debugging. |
multer |
Middleware for handling file uploads. |
nodemailer |
Sends email notifications for account verification and password recovery. |
swagger-ui-express |
Provides interactive API documentation using Swagger UI. |
The project includes Swagger-based API documentation for developers to easily explore and test the available endpoints.
To access the documentation, start the server and navigate to:
http://<server-host>:<server-port>/api-docs
Follow these steps to set up and run the project locally:
- Clone the repository:
git clone https://github.com/Yassinekrn/Oasis-User-Backend.git
- Navigate to the project directory:
cd Oasis-User-Backend - Install dependencies:
npm install
- Configure environment variables:
Create a.envfile in the root directory and specify the following:MONGODB_URI=<your-mongodb-uri> FRONTEND_URL=<your-frontend-url> EMAIL_FROM=<your-email> PORT=<server-port> SALT=<bcrypt-salt> ACCESS_JWT_SECRET=<access-jwt-secret> REFRESH_JWT_SECRET=<refresh-jwt-secret> SENDGRID_API_KEY=<sendgrid-api-key> NODE_ENV=development - Start the server:
npm start
- Development Mode:
npm run dev
- Production Mode:
npm run start
Contributions are welcome! If you have ideas to improve this project, feel free to fork the repository and submit a pull request.
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of changes" - Push to the branch:
git push origin feature-name
- Open a pull request.
This project is licensed under the MIT License.
Made with ❤️ by the Oasis Team
