A robust, terminal-based Enterprise Resource Planning (ERP) system for modern libraries, engineered with Python.
Modern Library ERP is a fully engineered backend system featuring Role-Based Access Control (RBAC), the Factory Design Pattern, decoupled data persistence (Repository Pattern), and an isolated business logic engine.
- Multi-Tiered Users: Secure environments for
Students,Faculty,Librarians, andAdmins. - Dynamic Permissions: Borrowing limits, fine thresholds, and access rights scale securely based on the inherited user role.
- Security: Salted password hashing implementation for secure user authentication.
- State Machine: Resources transition through strict states (
Available,Checked Out,Lost,Archived). - Financial Logic: Automated calculation of overdue fines, grace periods, payment tracking, and fine waiving workflows.
- Concurrency Control: Strict validation rules prevent users from borrowing duplicate copies or exceeding tier limits.
- Repository Pattern: File I/O operations are strictly isolated in the data access layer. The business engine never directly touches the database.
- Factory Pattern: Polymorphic instantiation of Users and Resources (Books, Journals, Digital Media) from raw data.
- Abstract Base Classes: Enforced architectural contracts across all resource and user types.
The codebase is organized following industry-standard separation of concerns:
📦 Modern-Library-ERP
┣ 📂 .github/workflows/ # CI/CD Pipeline Configuration
┣ 📂 data/ # Persistent CSV Storage (Isolated Database)
┣ 📂 src/ # Core Application Code
┃ ┣ 📂 core/ # Business Logic & Rules Engine (engine.py, validator.py)
┃ ┣ 📂 models/ # Domain Entities & Schemas (user.py, book.py)
┃ ┣ 📂 repository/ # Data Access Layer (storage.py)
┃ ┣ 📂 utils/ # Shared Helpers (logger.py, auth_tools.py)
┃ ┗ 📜 main.py # CLI Entry Point & Controller
┣ 📂 tests/ # 98-Test Pytest Suite (Integration & Unit)
┣ 📜 .gitignore # Environment & Cache exclusion
┣ 📜 requirements.txt # Project Dependencies
┗ 📜 README.md # Documentation
- Python 3.10 or higher installed.
- Clone the repository:
git clone [https://github.com/yourusername/Modern-Library-ERP.git](https://github.com/yourusername/Modern-Library-ERP.git)
cd Modern-Library-ERP
- Create and activate a virtual environment:
# On Windows
python -m venv venv
.\venv\Scripts\activate
# On macOS/Linux
python3 -m venv venv
source venv/bin/activate
- Install dependencies:
pip install -r requirements-test.txt
- Run the Application:
python -m src.main
(Note: On first run, the storage engine will automatically initialize the secure database files in the /data directory).
This project is heavily tested with a 98-test pytest suite covering unit rules, database storage, and full integration workflows. It uses GitHub Actions for Continuous Integration to ensure code reliability on every push.
To run the tests locally:
pytest tests/ -v
Satyabrata Behera Software Engineering Intern Candidate | Machine Learning Enthusiast
- Education: B.Tech in Electronics & Telecommunication, Veer Surendra Sai University Of Technology (VSSUT)
- LinkedIn: Satyabrata Behera
- GitHub: @titan-spyer