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.
- 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-motionsupport
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.jsonpip install -r requirements.txt
python api/index.py # http://127.0.0.1:5000Tables are created and the catalogue is seeded automatically on first run.
cd frontend
npm install
npm run dev # http://127.0.0.1:5173 (proxies /api to Flask)cd frontend && npm run build # outputs frontend/dist
python api/index.py # Flask now serves the built SPA at /| 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 |
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.
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