Library Management API

Explore
Library Management API

The Local Library is a simple Node.js Express application designed to manage books in a library. It follows the MVC (Model-View-Controller) architecture and utilizes the Pug templating engine to serve views.

Overview of the API codebase
  • controllers: Contains the controllers for handling book, genre and author-related logic.
  • models: Defines the Mongoose models for books, authors, genres, users.
  • public: Holds static files such as stylesheets.
  • routes: Defines the routes for different parts of the application (index, catalog, author).
  • views: Contains Pug templates for rendering different pages.
  • app.js: The main entry point for the application.
Technology Used
  • Express.js: Local server
  • pug: For serving templates
  • MongoDB : Primary database to store information about books, authors, users
What I learned from this project
  1. Creating a JS server and connecting to a database.
  2. Authentication and autorization (JWT)
  3. Hashing password before storing in the database.
  4. Templates using pug