DEV Community

Cover image for Library.com
Rounak Bakshi
Rounak Bakshi

Posted on

Library.com

๐Ÿš€ New Release: Library Books API v1.1.0 โ€” Now with Auth and Enhanced Filtering!

Hey Devs! ๐Ÿ‘‹

I'm excited to share that version 1.1.0 of my Library Books Backend API is now live! This update brings a bunch of quality-of-life improvements, especially for developers building full-stack apps with user authentication and MongoDB.


๐Ÿ”‘ Key Features

๐Ÿ” User Authentication (Login + Logout)

You can now register users, securely log them in using JWT tokens, and manage access to protected routes!

๐Ÿ“š Book Management with MongoDB

All book data is stored in MongoDB, with support for:

  • Adding new books
  • Retrieving all books
  • Filtering free books based on price ("Free", "0", or 0)

๐Ÿ›  Improved API Responses

Consistent JSON responses across all routes โ€” no more missing fields!


๐Ÿ› Bug Fixes

  • Fixed "Illegal arguments: string, undefined" caused by using User.find() instead of findOne().
  • Resolved a MongoDB Atlas connection failure due to bad auth.
  • Ensured that the price field is always included in the book data returned from the database.

๐Ÿงช Example Book Object

{
  "name": "Story Book",
  "title": "A Friend and a Foe",
  "price": "Free",
  "category": "Story",
  "image": "https://cdn.pixabay.com/photo/2018/01/18/09/13/book-3089857_1280.jpg"
}
Enter fullscreen mode Exit fullscreen mode

GitHUB repo:

Top comments (1)

Collapse
 
nathan_tarbert profile image
Nathan Tarbert

Been cool seeing steady progress - it adds up. what do you think actually keeps things growing over time? habits? luck? just showing up?