A React-based library management web application. Users can add books, update or delete their own listings, borrow books, and return them when finished. It includes Firebase Authentication (email/password and Google), dark/light mode, category browsing, and protected routes for a complete frontend experience.
| Layer | Stack |
|---|---|
| UI | React 18, Vite |
| Styling | Tailwind CSS, DaisyUI |
| Routing | React Router DOM v6 |
| Auth & backend | Firebase (Auth, etc.) |
| HTTP | Axios |
| Forms & interaction | React Hook Form, Swiper, Lottie React |
| Notifications / feedback | React Toastify, React Hot Toast, SweetAlert2, SweetAlert |
| Other | React Helmet Async, React Datepicker, React Icons, React Rating |
- Firebase authentication: Sign in / sign up with email/password and Google
- Book CRUD: Signed-in users can add, update, and delete their own posted books
- Borrow & return: Any user can borrow a book and return it after reading
- My books / borrowed lists: Dedicated routes for your posted books and borrowed books
- Categories: Browse books by category
- All books: All books in one place (table/list style)
- Dark and light mode
- Protected routes: Sensitive pages require authentication
axios, firebase, localforage, lottie-react, match-sorter, react, react-datepicker, react-dom, react-helmet-async, react-hook-form, react-hot-toast, react-icons, react-rating, react-router-dom, react-toastify, sort-by, sweetalert, sweetalert2, swiper
@vitejs/plugin-react, vite, tailwindcss, daisyui, postcss, autoprefixer, eslint and React-related ESLint plugins, @types/react, @types/react-dom
For exact versions, see package.json.
- Node.js (LTS recommended, typically v18+)
- pnpm (specified as
packageManagerin this project) — or usenpm/yarnforinstallif you prefer
-
Clone the repository
git clone https://github.com/rajiul93/library.git cd library -
Install packages
pnpm install
(
npm installoryarnworks too; the scripts stay the same.) -
Firebase environment variables
Create a
.envfile in the project root with your Firebase config (Vite requires theVITE_prefix):VITE_API_KEY=your_api_key VITE_AUTH_DOMAIN=your_auth_domain VITE_PROJECT_ID=your_project_id VITE_STORAGE_BUCKET=your_storage_bucket VITE_MESSAGING_SENDER_ID=your_messaging_sender_id VITE_APP_ID=your_app_id
Copy values from Firebase Console → Project settings → Your apps.
-
Start the dev server
pnpm dev
Open
http://localhost:5173in the browser (or whichever port the terminal prints). -
Production build & preview (optional)
pnpm build pnpm preview
| Resource | Link |
|---|---|
| Live demo (Netlify) | https://libraryan.netlify.app |
| Source code (GitHub) | https://github.com/rajiul93/library |
Example account previously used to test all-books and similar pages (demo only; do not rely on this in production):
- Email:
xyz@gmail.com - Password:
aaaaaA
Follow any LICENSE or contributing guidelines added to the repository. Open an issue on GitHub if you have questions.
