Initial commit: Tablet lending system with user-tablet many-to-many relationship

- Database schema: tablets, users, loans (junction table)
- CLI app: minimal_app.py
- Web apps: app.py (Flask), simple_app.py (http.server)
- Features: loan management, search, user loans view, project notes
- Git structure: CONTRIBUTING.md, .gitignore

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
ijuanes 2026-06-03 10:43:17 +01:00
commit 8a8d2f02fa
25 changed files with 2885 additions and 0 deletions

57
RUNNING.md Normal file
View file

@ -0,0 +1,57 @@
# Tablet Management System - Running
**Status**: Application is running successfully!
## Access Information
- **Web Interface**: [http://localhost:5000](http://localhost:5000)
- **Port**: 5000
- **Framework**: Flask 3.1.3
- **Database**: SQLite (`tablets.db`)
## How to Use
### Web Interface
1. Open your browser to: [http://localhost:5000](http://localhost:5000)
2. Use the navigation menu to:
- **Home**: View available tablets and active loans
- **Add Tablet**: Add new tablets to inventory
- **Add User**: Register new users
- **Loan Tablet**: Loan a tablet to a user
- **Loan History**: View complete loan history
### Command Line (Alternative)
If you prefer command line:
```bash
# Run the interactive application
python3 minimal_app.py
# Run the test/demo
python3 test_app.py
```
## Current Data
The system already contains test data:
- **3 Tablets**: Samsung Galaxy Tab S7, Apple iPad Pro, Lenovo Tab P11
- **3 Users**: John Doe, Jane Smith, Bob Johnson
- **2 Loans**: One active, one returned
## Stopping the Server
To stop the Flask application:
```bash
pkill -f "python app.py"
```
## Technical Details
- **Backend**: SQLite 3
- **Frontend**: Flask with HTML/CSS
- **Port**: 5000 (configurable in app.py)
- **Virtual Environment**: `.venv/` (created with uv)
## Troubleshooting
If you have issues:
1. Check if the server is running: `ps aux | grep app.py`
2. Check the database: `sqlite3 tablets.db`
3. Restart the server: `source .venv/bin/activate && python app.py`
Enjoy managing your tablets! 📱💻