Skip to main content
Get your SWL Library Management System up and running quickly with this streamlined guide.

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

1

Clone the Repository

Download the SWL source code from GitHub:
git clone https://github.com/MaickFeliz/SWL.git
cd SWL
2

Set Up Virtual Environment

Create an isolated Python environment to avoid dependency conflicts:
python -m venv venv
source venv/bin/activate
You should see (venv) appear in your terminal prompt, indicating the virtual environment is active.
3

Install Dependencies

Upgrade pip and install all required packages:
python -m pip install --upgrade pip
pip install -r requirements.txt
This installs Flask, SQLAlchemy, and all other dependencies from requirements.txt.
4

Run the Application

Start the development server. The database will be automatically initialized on first run:
python run.py
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)
5

Access the System

Open your browser and navigate to http://localhost:5000.Log in with the default admin credentials:
  • Document ID: 1000000000
  • Password: admin123
Change the default password immediately after your first login. Access the profile section to update your credentials.

Default Configuration

On first run, SWL automatically creates:

Admin Account

Document ID: 1000000000
Full Name: Administrador Principal
Role: admin
Email: admin@biblioteca.com
Password: admin123

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)
Each item has unique serial codes generated automatically (e.g., 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:
  1. Admin Dashboard: Navigate to /admin/dashboard to view loan statistics
  2. User Management: Go to /admin/users to see the user list
  3. Catalog: Visit /admin/catalog to view inventory items
  4. Fast Loan Kiosk: Access /fast_loan to test the self-service mode

Troubleshooting

If you see “Address already in use” error:
# Find the process using port 5000
lsof -i :5000  # Mac/Linux
netstat -ano | findstr :5000  # Windows

# Kill the process or change the port in run.py
Ensure your virtual environment is activated and dependencies are installed:
# Activate venv
source venv/bin/activate  # or .\venv\Scripts\activate on Windows

# Reinstall dependencies
pip install -r requirements.txt
If the database doesn’t initialize:
# Delete the instance folder and restart
rm -rf instance/
python run.py
Make sure:
  • The server is running with host='0.0.0.0' (default in run.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.