A WPF application for managing books, members, and loan transactions with a clean, multi-layer architecture.
- .NET 6 SDK (or later) installed.
- SQLite support via
Microsoft.Data.Sqlite(bundled). - Visual Studio, JetBrains Rider, or another C# IDE.
-
Clone the repo:
git clone https://github.com/RaresMarta/Library-Management-System.git cd LibrarySystem -
appsettings.json (copied to output on build):
{ "ConnectionStrings": { "DefaultConnection": "Data Source=Data/LibraryDB.sqlite" } }- On first launch, the app creates
LibraryDB.sqliteand the required tables. - Subsequent runs will reuse the existing database and apply any migrations.
- On first launch, the app creates
-
DatabaseInitializer:
- Automatically creates or migrates Books, Members, and Loans tables.
From the root of the repository (where LibrarySystem.csproj lives):
-
Restore dependencies:
dotnet restore
-
Build:
dotnet build
-
Run:
dotnet run --project LibrarySystem.csproj
Or simply:
dotnet run
if your working directory is the project root, and then select
LibrarySystemas the startup project if prompted by your IDE.
-
CRUD for Books and Members with validations.
-
Search books by Title and Author filters.
-
Lending and Return flows:
- Prevent loans when stock is depleted or member already has an open loan.
- Prevent returns when loan is already returned.
-
Renewals: extend due dates for active loans.
-
Automatic Overdue: loans past due are marked Overdue on each refresh or startup.
-
Loan History Tracking: view history per book and per member in dedicated windows.
The Analytics Dashboard provides real-time insights on library usage:
-
Genre Distribution
- Shows a table of each Genre and the number of books in that category.
-
Loan Status Distribution
- Displays counts of Active and Overdue loans.
-
Top 5 Borrowed Books
- Lists the five most frequently borrowed books with borrow counts.
-
Accessing the Dashboard
- Click Analytics Dashboard in the main window to open.
- Data updates automatically on open.
This dashboard helps librarians spot popular genres, track overdue load, and identify high-demand titles for ordering.
- All business logic resides in the Service layer; UI only handles display and user interaction.
- The app uses MVVM-inspired patterns, with dependency injection of services into windows.
- No manual DB setup required: clone, build, and run!