https://github.com/nec0ti/librisapi
A REST API for managing a book collection. Built with Node.js, Express, and MongoDB.
https://github.com/nec0ti/librisapi
api api-documentation api-rest auth authentication authorization book-management books catalog crud-api documentation express expressjs jwt library-api mangodb node nodejs rest-api restful-api
Last synced: 3 days ago
JSON representation
A REST API for managing a book collection. Built with Node.js, Express, and MongoDB.
- Host: GitHub
- URL: https://github.com/nec0ti/librisapi
- Owner: Nec0ti
- License: mit
- Created: 2025-03-03T15:07:28.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2025-04-14T20:58:37.000Z (13 days ago)
- Last Synced: 2025-04-24T03:11:56.608Z (3 days ago)
- Topics: api, api-documentation, api-rest, auth, authentication, authorization, book-management, books, catalog, crud-api, documentation, express, expressjs, jwt, library-api, mangodb, node, nodejs, rest-api, restful-api
- Language: JavaScript
- Homepage: http://librisapi.necoti.dev
- Size: 116 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# LibrisAPI
LibrisAPI is a RESTful API for managing your personal book collection.
## Purpose
This API allows you to:
* Create, retrieve, update, and delete books.
* Authenticate users with JWT (JSON Web Tokens).## Documentation
For detailed information on how to use the API, please refer to the [LibrisAPI Documentation](https://docs.librisapi.necoti.dev).
## Getting Started
1. Clone the repository:
```bash
git clone https://github.com/Nec0ti/LibrisAPI/
cd LibrisAPI
```2. Install dependencies:
```bash
npm install
```3. Set up environment variables:
Create a `.env` file with the following variables:
```
MONGODB_URI=mongodb+srv://:@.mongodb.net/?retryWrites=true&w=majority
JWT_SECRET=your_jwt_secret_key
```4. Start the server:
```bash
npm run dev
```## Endpoints
Here are a few basic examples:
* **Register:** `POST /api/auth/register`
```json
{
"username": "testuser",
"password": "testpassword"
}
```* **Login:** `POST /api/auth/login`
```json
{
"username": "testuser",
"password": "testpassword"
}
```* **Get All Books:** `GET /api/books` (requires JWT token in `x-auth-token` header)
## Contributing
We welcome contributions! Please feel free to open issues or submit pull requests.
## License
This project is licensed under the MIT License.