Skip to content

AtharvaZalkikar/bookexplorer-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

# πŸ“š BookExplorer API

BookExplorer is a Django REST Framework (DRF)-powered backend project that allows users to search, fetch, and save books using the Open Library API. It supports searching by title, fetching by ISBN, and prevents duplicate entries β€” all via clean, well-structured REST APIs.


## πŸš€ Features

πŸ” Search books by title using Open Library's public API

πŸ“š Fetch book details using ISBN (title, author, publish date, cover, description)

✍️ Save books to local database with duplicate prevention

πŸ” Admin-only deletion of books

πŸ“‘ Pagination, filtering, searching, and ordering

πŸ“¦ API-first architecture for React/JS frontend consumption


## πŸ›  Tech Stack

Python 3.10

Django 5.1

Django REST Framework

Open Library API (external)

SQLite (dev), deploy-ready with PostgreSQL

Insomnia/Postman/React-compatible API


## βš™οΈ Getting Started

### 1. Clone the repo

git clone https://github.com/AtharvaZalkikar/bookexplorer-backend.git

cd bookexplorer-backend




## 2. Create a virtual environment

python -m venv venv

\\# On Windows:

venv\\\\Scripts\\\\activate

\\# On Mac/Linux:

source venv/bin/activate




## 3. Install dependencies

pip install -r requirements.txt




## 4. Run migrations

python manage.py migrate




## 5. Run the development server

python manage.py runserver 

πŸ” Authentication

  • All GET and POST endpoints are publicly accessible.
  • DELETE and PUT operations on books require authentication and are restricted to staff/admin users.
  • Authentication system is DRF-ready (token-based or session-based login support).

πŸ”— API Endpoints

| Endpoint | Method | Description | Auth Required |

| ------------------------ | ----------- | -------------------------------------- | ------------- |

| /search-open?title=... | GET | Search books from Open Library | No |

| /fetch-book/?isbn=... | GET | Fetch book details from Open Library | No |

| /fetch-and-save/ | POST | Fetch from ISBN and save to DB | No |

| /save-from-search/ | POST | Save book (manual or from search list) | No |

| /books/ | GET | List all saved books (with filters) | No |

| /books/<id>/ | DELETE | Delete a book | βœ… Yes (Admin) |

| /books/<id>/ | PUT/PATCH | Update a book | βœ… Yes (Auth) |


##πŸ“ŒFiltering, Search, and Ordering

You can use the following query params on /books/:

  • ?search=tolkien β†’ matches title or author
  • ?ordering=published_date β†’ ascending
  • ?ordering=-title β†’ descending by title
  • ?published_date=2001 β†’ exact match filter

πŸ§‘β€πŸ’» Author

Atharva Zalkikar GitHub


πŸ“ Roadmap

βœ… Backend API completed with testing 🎨 React / Tailwind frontend integration (up next!) 🌐 Deployment to global server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published