This is the Production branch. This branch is configured to run on your college's local network server for real-world use.
Here is the high-level architecture of the GECDahod Library System. It leverages Waitress as a production WSGI server and WhiteNoise for static files, making it a robust and self-contained solution for local network deployment.
graph TD
%% User Interfaces
Admin[Admin / Staff]
Student[Student / Library User]
Scanner[Kiosk Barcode Scanner]
%% Middlewares and Routing
Nginx[College Network Firewall / Intranet]
Waitress[Waitress WSGI Server Port 800]
%% Django Core
subgraph Django Application
DjangoRouter[URL Routing]
WhiteNoise[WhiteNoise Static Files]
Auth[JWT & Admin Auth]
Views[Business Logic / Views]
Reports[Reporting Engine Pandas]
ORM[Django ORM]
end
%% Database & Storage
DB[(SQLite Database)]
Disk[File System Logs]
%% Connections
Student --> |View Dashboard| Nginx
Admin --> |Access Admin Panel / Reports| Nginx
Scanner --> |POST /kiosk Barcode| Nginx
Nginx -.-> |HTTP Port 800| Waitress
Waitress --> DjangoRouter
DjangoRouter --> WhiteNoise
DjangoRouter --> Auth
Auth --> Views
Views --> Reports
Views --> ORM
Reports -.-> |Generate .xlsx| ORM
ORM <--> DB
DB <--> Disk
classDef ui fill:#4a90e2,stroke:#000,stroke-width:2px,color:#fff;
classDef server fill:#f5a623,stroke:#000,stroke-width:2px,color:#fff;
classDef app fill:#7ed321,stroke:#000,stroke-width:2px,color:#fff;
classDef db fill:#9013fe,stroke:#000,stroke-width:2px,color:#fff;
class Admin,Student,Scanner ui;
class Nginx,Waitress server;
class DjangoRouter,WhiteNoise,Auth,Views,Reports,ORM app;
class DB,Disk db;
-
Clone the Production branch:
git clone -b production https://github.com/PAVAN2005-LAB/GED_Dahod_library.git
-
Setup Environment:
- Install dependencies:
pip install -r requirements.txt - Create a
.envfile from.env.example. - Crucial: Set
DJANGO_DEBUG=FalseandDJANGO_ALLOWED_HOSTS=*.
- Install dependencies:
-
Prepare Static Files & Database:
python manage.py makemigrations python manage.py migrate python manage.py collectstatic --noinput
-
Start the Server (Running on Port 800):
python run_server.py
Once the server is running, anyone on the college network can access it by visiting the server's IP address and port 800:
http://[YOUR_SERVER_IP]:800
check your ip address by typing ipconfig in the command prompt.
If you don't have Python installed, or prefer deploying via containers, you can use Docker.
-
Build the Docker Image: Open a terminal in the project directory where the
Dockerfileis located and run:docker build -t library-system . -
Run the Container: Once built, start the server and map port 800:
docker run -p 800:800 --name library-container library-system
The application is now containerized and accessible at http://localhost:800 (or your server's IP).
You can easily bulk import students and books from standard .csv files using our custom management command import_data. This is built for fast ingestion while automatically checking for and skipping duplicate entries.
Expected CSV Headers: enrollment_id, name, email, mobile_no, department
python manage.py import_data students /absolute/path/to/your/students.csvExpected CSV Headers: access_code, title, author, shelf_location
(Note: access_code maps to Book ID in the database)
python manage.py import_data books /absolute/path/to/your/books.csvWe provide a comprehensive REST API and dedicated Web endpoints for scanning, reports, and JWT authentication.
Click here to read the full API Documentation
- Waitress Server: Handles multiple users concurrently on Windows.
- WhiteNoise Middleware: Fast and efficient serving of CSS/JS/Images.
- Port 800: Standard access on port 800, freeing up default ports and bypassing standard admin restrictions for port 80.
- Pandas Reporting: Heavy data processing handled gracefully with Pandas generating
.xlsxreports on the fly.
Note: For development and code changes, please use the local branch.