https://github.com/soap171/library-management-backend
Complete REST API using NODE JS | EXPRESS and MongoDB | JWT Auth and Authorization | User Role Management
https://github.com/soap171/library-management-backend
express-js jwt-authentication library mongodb nodejs rest-api role-based-access-control user
Last synced: 3 months ago
JSON representation
Complete REST API using NODE JS | EXPRESS and MongoDB | JWT Auth and Authorization | User Role Management
- Host: GitHub
- URL: https://github.com/soap171/library-management-backend
- Owner: Soap171
- Created: 2024-06-29T07:47:27.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-04T13:06:05.000Z (almost 2 years ago)
- Last Synced: 2025-02-25T05:17:41.569Z (over 1 year ago)
- Topics: express-js, jwt-authentication, library, mongodb, nodejs, rest-api, role-based-access-control, user
- Language: JavaScript
- Homepage:
- Size: 3.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MERN Stack Backend Project
## Overview
This is a comprehensive backend project developed using (MongoDB, Node.js, Express Js and JWT). The project focuses on managing user roles, book reservations, and CRUD operations.
## Tech Stack
- **Backend:** Node.js, Express.js
- **Database:** MongoDB
- **Authentication:** JWT
## Features
### User Roles
#### Admin
- View reservations for each book
- Perform CRUD operations on books
- Search books
- Lend books to users based on reservations
- Manage book returns
#### Member
- Sign up and log in with Google
- Register and sign in
- Update profile
- Search books by category
- Make reservations for books
## Installation
1. Clone the repository:
```bash
git clone https://github.com/yourusername/your-repo.git
```
2. Navigate to the project directory:
```bash
cd your-repo
```
3. Install dependencies:
```bash
npm install
```
4. Create a `.env` file in the root directory and add the following environment variables:
```env
PORT=5000
MONGODB_URI=your-mongodb-uri
JWT_SECRET=your-jwt-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
```
5. Start the server:
cd into the server folder and,
npm run dev
## Usage
- Use Postman or any other API client to interact with the backend endpoints.
- Admin and member functionalities are differentiated by their roles.
## Contributing
Feel free to fork this repository and contribute by submitting a pull request. Any contributions are highly appreciated!
## License
This project is licensed under the MIT License.
---
Feel free to replace the placeholders with your actual information, such as the repository link and any specific details about your project.