A Frappe-based Library Management System for managing library articles, members, memberships, and issue/return transactions.
The Library Management System is a custom Frappe application designed to provide the core functionality required to manage a library.
The system allows library staff to:
- Manage library articles and their availability
- Register and manage library members
- Create and manage library memberships
- Configure loan periods and borrowing limits
- Issue and return articles
- Track article availability
- Validate active memberships before issuing articles
- Enforce the maximum number of articles a member can have issued
- Publish selected articles on the website
The application also includes a public-facing article catalogue where published articles can be viewed.
Articles contain information such as:
- Article name
- Author
- ISBN
- Publisher
- Description
- Image
- Publication status
- Availability status
Articles have two separate states:
- Published — controls whether the article is visible on the website
- Available / Issued — tracks whether the article is currently available for borrowing
The system maintains library member records containing:
- First name
- Last name
- Full name
- Email address
- Phone number
- Linked Frappe user account
Each library member can be associated with a Frappe user, allowing the system to connect website activity with a specific member.
Memberships define the period during which a member is allowed to borrow articles.
The system:
- Validates active memberships
- Prevents overlapping active memberships
- Automatically calculates the membership end date
- Uses the configured loan period from Library Settings
Library Transactions record article issue and return activities.
Supported transaction types:
- Issue
- Return
When an issue transaction is submitted:
Article → Issued
When a return transaction is submitted:
Article → Available
The system also handles transaction cancellation by reversing the corresponding article status.
The system supports a configurable maximum number of articles that a member can have issued at one time.
The limit is configured through Library Settings.
For example:
Maximum Number of Issued Articles: 10
Before an article is issued, the system checks the member's current number of outstanding issues.
Before an article can be issued, the system verifies that the member has a valid submitted membership covering the transaction date.
If no valid membership exists, the transaction is rejected.
Published articles are available through the public website.
Example:
/articles
Each published article can have its own detail page containing information about the article.
Website visibility is controlled independently from article availability.
For example:
| Published | Status | Website |
|---|---|---|
| Yes | Available | Visible and available |
| Yes | Issued | Visible but unavailable |
| No | Available | Not publicly listed |
| No | Issued | Not publicly listed |
- Frappe Framework
- Python
- MariaDB
- Redis
- JavaScript
- HTML/CSS
- Jinja Templates
library_management/
├── library_management/
│ ├── library_management/
│ │ ├── doctype/
│ │ │ ├── article/
│ │ │ ├── library_member/
│ │ │ ├── library_membership/
│ │ │ ├── library_settings/
│ │ │ └── library_transaction/
│ │ └── ...
│ └── ...
├── hooks.py
├── modules.txt
├── patches.txt
└── pyproject.toml
| DocType | Purpose |
|---|---|
| Article | Stores library article information and availability |
| Library Member | Stores member information and linked user accounts |
| Library Membership | Manages member borrowing eligibility |
| Library Settings | Stores configurable library settings |
| Library Transaction | Records article issue and return transactions |
This application is intended to run inside a Frappe Bench environment.
From your Frappe Bench:
cd ~/frappe-bench/apps
git clone git@github.com:muthomijnewton/Library-Management.git library_managementFrom the bench directory:
cd ~/frappe-bench
bench --site library.localhost install-app library_managementbench --site library.localhost migratebench startThe application can then be accessed through the configured Frappe site.
For a local development setup using the Frappe development server:
http://library.localhost:8000
Library-wide settings are managed through the Library Settings DocType.
Current configurable settings include:
Defines the number of days for which a membership remains active.
Defines the maximum number of articles a member can have issued simultaneously.
Member
↓
Valid Membership?
↓
Within Borrowing Limit?
↓
Article Available?
↓
Create Issue Transaction
↓
Submit Transaction
↓
Article → Issued
Issued Article
↓
Create Return Transaction
↓
Submit Transaction
↓
Article → Available
Cancelling an Issue transaction restores the article to:
Available
Cancelling a Return transaction restores the article to:
Issued
The application is developed using the Frappe Framework and follows the standard Frappe application structure.
Run migrations after DocType or schema changes:
bench --site library.localhost migrateStart the development environment with:
bench startFrappe tests can be executed using:
bench --site library.localhost run-tests --app library_managementSpecific DocType tests can also be run as needed during development.
Potential future improvements include:
- Website-based article issuing
- Member self-service pages
- Article search and filtering
- Borrowing history
- Due-date tracking
- Overdue notifications
- Email notifications
- Library reports and dashboards
- Improved website interface
- Role-based member portal
- Automated tests for additional business scenarios
The project currently includes the core library management functionality:
- Article management
- Library member management
- Membership management
- Library settings
- Issue and return transactions
- Transaction cancellation handling
- Membership validation
- Borrowing-limit validation
- Public article catalogue
Further development will extend the website functionality and member self-service capabilities.
Newton Muthomi
GitHub: @muthomijnewton
This project is developed for educational and portfolio purposes.