Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raghavbhatirv/library-ideaclan

This project is a backend application for a library management system. It is developed using Node.js with a GraphQL API, integrated with MongoDB database.
https://github.com/raghavbhatirv/library-ideaclan

apollo-server expressjs graphql javascript jwt mongodb mongoosejs nodejs

Last synced: about 9 hours ago
JSON representation

This project is a backend application for a library management system. It is developed using Node.js with a GraphQL API, integrated with MongoDB database.

Awesome Lists containing this project

README

        

# Library Management System

## Introduction
This project is a backend application for a library management system. It is developed using Node.js with a GraphQL API, integrated with MongoDB database. The application manages "Books" and "Users" entities and implements authentication and book management features.

## Live Links
**Backend:** https://adorable-yoke-elk.cyclic.app


**Postman:** https://www.postman.com/raghavbhatirv/workspace/graph-ql-ideaclan

## Tech Stack
- Node.js
- Express.js
- MongoDB
- Mongoose
- GraphQL
- Apollo Server
- JWT for Authentication

## Installation
To get started with the project, follow these steps:

1. Clone the repository.

```bash
https://github.com/Raghavbhati/EduHub-IdeaClan.git
```

2. Install the dependencies using.

```bash
npm install
```

3. Start the application by running.

```bash
npm run dev
```

## API Endpoints
### Queries
- `users`: Get all users
- `user(id)`: Get a user by ID
- `books`: Get all books
- `book(id)`: Get a book by ID
- `searchBooks(title)`: Search books by title

### Mutations
- `addUser(email, password, role)`: Register a new user
- `loginUser(email, password)`: Login a user
- `updateUser(email, password)`: Update a user's details
- `deleteUser()`: Delete a user
- `addBook(title, author, publishedYear)`: Add a new book (Admin only)
- `updateBook(id, title, author, publishedYear)`: Update a book's details (Admin only)
- `deleteBook(id)`: Delete a book (Admin only)
- `borrowBook(bookId)`: Borrow a book
- `buyBook()`: Buy a book

## File Structure
![File Structure](./image/FileStructure.png)

## Important links:

**Portfolio:** https://www.raghavbhatirv.in/


**Github:** https://github.com/Raghavbhati


**Linkdin:** https://www.linkedin.com/in/raghavbhatirv/


**Twitter:** https://twitter.com/raghavbhatirv/