Skip to content

piotrproszowski/library-api

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Library API

Modern API for library management, built with NestJS.

Project Description

Library API is a comprehensive backend solution for library systems. It enables management of books, users, and loans. The system offers full CRUD operation support for all entities, user authentication and authorization, and advanced library management features.

Main Features

  • 📚 Library Structure Management: cataloging books, categories, and authors
  • 👥 User Management: registration, login, roles (client, employee, administrator)
  • 📝 Loan Management: reserving, borrowing, and returning books
  • 🔐 Security: JWT, roles, and permissions
  • 📧 Notifications: automatic email notifications for users

Project Structure

The project is organized in a modular structure:

  • auth - authentication and authorization
  • config - application configuration
  • database - database configuration
  • mailer - email handling
  • rent - loan management
  • structure - library structure management (books, etc.)
  • users - user management

Technologies

Requirements

  • Node.js (v18+)
  • pnpm
  • PostgreSQL

Installation

# Clone repository
$ git clone [REPOSITORY_URL]
$ cd library-api

# Install dependencies
$ pnpm install

# Environment configuration
$ cp .env.example .env
# Edit the .env file to customize the configuration

Running the Application

# Development mode
$ pnpm run start:dev

# Production mode
$ pnpm run start:prod

API Documentation

After starting the application, Swagger documentation is available at:

http://localhost:3000/api

Tests

# Unit tests
$ pnpm run test

# End-to-end tests
$ pnpm run test:e2e

# Test coverage
$ pnpm run test:cov

Code Standards

The project uses ESLint and Prettier to maintain high code quality:

# Code linting
$ pnpm run lint

# Code formatting
$ pnpm run format

License

This project is covered by the MIT license.

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published