Prerequisites
Before you begin, ensure you have:- Python 3.8+ installed on your system
- Git for cloning the repository
- Basic command line familiarity
Installation Steps
Set Up Virtual Environment
Create an isolated Python environment to avoid dependency conflicts:
You should see
(venv) appear in your terminal prompt, indicating the virtual environment is active.Install Dependencies
Upgrade pip and install all required packages:This installs Flask, SQLAlchemy, and all other dependencies from
requirements.txt.Run the Application
Start the development server. The database will be automatically initialized on first run:You’ll see output indicating:
- Database creation (SQLite by default)
- Default admin account creation
- Sample inventory items seeded
- Server started on
http://0.0.0.0:5000
The application is accessible at:
- Local:
http://localhost:5000 - Network:
http://0.0.0.0:5000(from other devices on your network)
Default Configuration
On first run, SWL automatically creates:Admin Account
Sample Inventory
The system seeds initial inventory items:- Mouse USB - 50 units (general)
- VideoBeam - 10 units (premium)
- Cable HDMI - 20 units (premium)
- Televisor - 5 units (premium)
- Regleta/Extension - 15 units (premium)
- Kit LEGO Education - 8 units (premium)
MOU-1-001, VID-2-001).
First Steps
After logging in as admin, you should:Change Admin Password
Navigate to your profile and update the default password immediately.
Create Users
Add librarians, premium users, and students with appropriate roles.
Configure Settings
Customize penalty fees, loan durations, and other system settings.
Add Inventory
Expand your catalog with books, equipment, and accessories specific to your institution.
Verify Installation
Test that everything is working:- Admin Dashboard: Navigate to
/admin/dashboardto view loan statistics - User Management: Go to
/admin/usersto see the user list - Catalog: Visit
/admin/catalogto view inventory items - Fast Loan Kiosk: Access
/fast_loanto test the self-service mode
Troubleshooting
Port 5000 already in use
Port 5000 already in use
If you see “Address already in use” error:
Module not found errors
Module not found errors
Ensure your virtual environment is activated and dependencies are installed:
Database initialization fails
Database initialization fails
If the database doesn’t initialize:
Cannot access from other devices
Cannot access from other devices
Make sure:
- The server is running with
host='0.0.0.0'(default inrun.py) - Your firewall allows connections on port 5000
- Devices are on the same network
Next Steps
Detailed Installation
Learn about production deployment, PostgreSQL setup, and advanced configuration.
User Management
Understand the multi-tier user system and role-based permissions.
Loan System
Explore how the loan workflow, approvals, and penalties work.
Admin Guide
Complete guide to system administration and configuration.
For production deployment with PostgreSQL, Gunicorn, and Nginx, see the Installation Guide.