-
Notifications
You must be signed in to change notification settings - Fork 0
Technical Manual
It's me Eldrex edited this page May 8, 2026
·
2 revisions
This document provides a comprehensive explanation of the codebase, system architecture, and algorithmic logic for the Smart Library Search and Management System developed for Navotas Polytechnic College.
The system is built using a modular design to separate concerns between data management, algorithmic logic, and user interface.
| Component | Responsibility |
|---|---|
main.py |
Application entry point, window initialization, and event loop handling. |
gui.py |
User Interface (Tkinter), event handling, theme configuration, and user interactions. |
data_manager.py |
File I/O operations (JSON persistence) and CRUD data management. |
algorithm.py |
Core searching logic (Binary Search) and utility operations. |
Located in algorithm.py, this is used for fast ID-based lookup operations.
- Repeatedly divides the dataset into halves to locate the target efficiently.
- Requires data sorted by ID.
- Used for instant retrieval of book records.
The system uses Python’s built-in sorted() function.
- Hybrid of Merge Sort and Insertion Sort
- Stable sorting algorithm
- Highly optimized in Python
Use cases:
- Sorting by Title
- Sorting by Author
- Sorting by Date Added
Used for real-time search-as-you-type.
-
Combines:
- ID
- Title
- Author
- Location
- Shelf
-
Optimized by merging fields into a single searchable string for fast matching.
- Storage:
data.json - Every change triggers immediate save
- Ensures data consistency between memory and disk
- Formatted using indentation for readability
- Indigo (#4F46E5) → Primary color
- Emerald (#10B981) → Success state
- Red (#EF4444) → Error / delete / borrowed state
- Font: Inter
- Live search using
trace_add("write", callback) - Table selection using
<<TreeviewSelect>>
- Launch via
main.py - Load data from JSON
- Sort using
sorted()(Timsort) - Search dynamically filters data
- User actions trigger save + refresh
- Fixed Windows taskbar icon using ctypes AppID
- Optimized large dataset handling using Binary Search
- Ensured EXE compatibility using resource path handling
- Removed custom sorting in favor of Python built-in optimization
- Search: O(log n)
- Sorting: O(n log n)
- Filtering: O(n)
- UI: Event-driven real-time updates
End of Technical Documentation
DSA Final Project 2026
Group 1 • Byte Me Maybe