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 (3)

Collapse
 
devops_fundamental profile image
DevOps Fundamental

This was such a well-written and thoughtful postβ€”I really enjoyed the way you explained your ideas and offered a fresh perspective. Looking forward to reading more from you!

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?

Collapse
 
saturn_ring profile image
Rounak Bakshi

True..