Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Lumina Library - Library Management System

A neon, fully animated library management system. The frontend is a React + Vite single page app (Tailwind CSS + Framer Motion), the backend is a Flask JSON API on SQLite, and the catalogue ships pre-seeded with 735 real books by 344 authors across 45 genres.


✨ Features

  • 735-book catalogue with author, genre and publication year, seeded from api/data/books_seed.txt
  • Authors directory (344 authors) with book counts, signature genre and active years - click an author to open their shelf
  • Live search + filters: keyword (title/author/genre), genre, availability, five sort orders, paginated 24 per page
  • Borrow / return flow with an issued-books register, timestamps and instant stat updates
  • Donate & delete books straight from the UI
  • Animated everything: aurora background blobs, animated gradient text, count-up stats, staggered card reveals, layout-animated tab pill, spring modals, toast notifications, shimmering skeleton loaders
  • Responsive + accessible: keyboard focus rings, ESC to close dialogs, prefers-reduced-motion support

🗂 Project Structure

Library-Management-System/
├── api/
│   ├── index.py              # Flask JSON API + serves the React build
│   └── data/books_seed.txt   # 735 books: Title|Author|Genre|Year
├── frontend/
│   ├── src/
│   │   ├── App.jsx           # layout, hero, stats, tabs
│   │   ├── api.js            # fetch helpers
│   │   ├── components/       # BookCard, StatCard, Modal, Toaster, ...
│   │   └── views/            # BooksView, AuthorsView, IssuedView
│   └── tailwind.config.js    # theme colors, keyframes, animations
├── library.db                # SQLite database (books, authors, issued_books)
├── requirements.txt
└── vercel.json

🚀 Getting Started

1. Backend (Flask API)

pip install -r requirements.txt
python api/index.py          # http://127.0.0.1:5000

Tables are created and the catalogue is seeded automatically on first run.

2. Frontend (React dev server)

cd frontend
npm install
npm run dev                  # http://127.0.0.1:5173 (proxies /api to Flask)

3. Production build

cd frontend && npm run build     # outputs frontend/dist
python api/index.py              # Flask now serves the built SPA at /

🔌 API Reference

Method Endpoint Description
GET /api/stats totals: books, available, issued, authors, genres
GET /api/books search, genre, author, status, sort, page, per_page
GET /api/genres genres with book counts
GET /api/authors search, page, per_page
GET /api/issued issued-book register
POST /api/borrow { "student": "...", "book_id": 1 }
POST /api/return/<issue_id> return an issued book
POST /api/books donate { "title", "author", "genre", "year" }
DELETE /api/books/<id> remove a book

🗃 Database Schema

books(id, title, author, genre, year, status)
authors(id, name, book_count, top_genre, first_year, last_year)
issued_books(id, student_name, book_title, book_id, issued_on)

authors is derived from books and refreshed whenever books are added or removed.


☁️ Deployment

vercel.json builds the Flask API as a Python function and the React app as a static build: /api/* hits Flask, everything else serves the SPA.


Made with ❤️ by Dhriti

About

A modern and responsive Library Management System built with Flask, SQLite, and Bootstrap 5. It helps manage books, borrowing, returns, donations, and issued book records through an easy-to-use web interface.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages