LibraTech is a Flutter + Firebase–powered Library Management System with role-based access control, real-time book management, and secure borrowing functionality.
The application supports two roles:
- 👤 User – Browse, search, borrow, and manage borrowed books
- 🛠 Admin – Manage library inventory (add, edit, delete books)
- Email & Password authentication using Firebase Auth
- Secure login and signup flow
- Persistent user sessions
- Logout functionality
- View all available books (real-time updates)
- Search books by title or author
- Filter books by category
- View detailed book information
- Borrow books (if available)
- Prevent duplicate borrowing
- View My Borrowed Books
- Return borrowed books
- Visual availability status (Available / Borrowed)
- Add new books
- Edit existing book details
- Delete books
- View availability counts
- Admin-only access enforced by Firestore rules
- User roles stored in Firestore (
users/{uid}) - Default role:
user - Admin access controlled via Firestore
- UI and backend both enforce role restrictions
- No client-side privilege escalation
| Layer | Technology |
|---|---|
| Frontend | Flutter |
| Backend | Firebase |
| Authentication | Firebase Auth |
| Database | Cloud Firestore |
| State Updates | Firestore Streams |
| Environment | flutter_dotenv |
lib/
├── admin/
│ ├── screens/
│ └── services/
├── auth/
│ ├── screens/
│ └── services/
├── books/
│ ├── models/
│ ├── screens/
│ └── services/
├── core/
│ ├── screens/
│ └── theme/
├── shared/
│ └── widgets/
└── main.dart
books/{bookId}
{
title: string,
author: string,
isbn: string,
category: string,
description: string,
totalCopies: number,
availableCopies: number
}
borrowed_books/{borrowId}
{
bookId: string,
userId: string,
borrowedAt: timestamp,
dueDate: timestamp
}
users/{uid}
{
email: string,
role: "user" | "admin",
createdAt: timestamp
}
cd client
flutter pub get
flutter run
- New users are assigned the user role by default
- Admin role must be assigned manually in Firestore
- Users can only access user features
- Admins have exclusive access to the admin dashboard
- Piyush
- Pawan
- Nikhil