From f08c823dc106685bedc8e63c28220766c0fe4909 Mon Sep 17 00:00:00 2001 From: ijuanes Date: Sat, 20 Jun 2026 08:05:05 +0100 Subject: [PATCH] docs: update CLI_VS_WEB.md with deprecation notice - Add deprecation notice at top of document - Mark CLI as deprecated throughout - Add migration path for existing CLI users - Document database compatibility notes - Recommend web interface for all operations --- docs/CLI_VS_WEB.md | 67 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 4 deletions(-) diff --git a/docs/CLI_VS_WEB.md b/docs/CLI_VS_WEB.md index 5329e31..f9eb00c 100644 --- a/docs/CLI_VS_WEB.md +++ b/docs/CLI_VS_WEB.md @@ -1,12 +1,28 @@ # CLI vs Web Functionality Comparison +## ⚠️ DEPRECATION NOTICE + +**The CLI version (`minimal_app.py`) is now DEPRECATED.** + +Please use the **web interface (`app.py`)** for all operations. The web interface provides: +- Complete feature set +- Full database schema support +- Responsive mobile interface +- Better user experience + +The CLI will be removed in a future version. This document is kept for historical reference. + +--- + ## Overview -This document compares the functionality between the **CLI version** (`minimal_app.py`) and the **Web version** (`app.py`) of the Tablet Management System. +This document compares the functionality between the **DEPRECATED CLI version** (`minimal_app.py`) and the **Web version** (`app.py`) of the Tablet Management System. ## Current State -### Web Version (app.py) - Complete Feature Set +### Web Version (app.py) - ✅ RECOMMENDED + +The web version is the **primary and recommended** interface for all users. | Feature | Status | Route | Template | |---------|--------|-------|---------| @@ -24,11 +40,15 @@ This document compares the functionality between the **CLI version** (`minimal_a | Delete Non-Loanable Device | ✅ | `/delete_non_loanable_device/` | N/A (redirects) | | Project Management | ✅ | `/project_management` | `project_management.html` | -### CLI Version (minimal_app.py) - Incomplete +### CLI Version (minimal_app.py) - ❌ DEPRECATED + +**This CLI is deprecated and should not be used for new development.** + +The CLI has limited functionality and does not support all database columns used by the web version. | Feature | Status | Function | |---------|--------|----------| -| Add Tablet | ✅ | `add_tablet()` | +| Add Tablet | ⚠️ Partial | `add_tablet()` - Missing notes field | | Add User | ⚠️ Partial | `add_user()` - Missing email/phone | | Loan Tablet | ✅ | `loan_tablet()` | | Return Tablet | ✅ | `return_tablet()` | @@ -43,6 +63,45 @@ This document compares the functionality between the **CLI version** (`minimal_a | **Edit Non-Loanable Device** | ❌ Missing | N/A | | **Project Management** | ❌ Missing | N/A | +## Migration Path + +### For Existing CLI Users + +**Stop using the CLI and switch to the web interface:** + +1. Run the web interface: + ```bash + python3 app.py + ``` + +2. Open your browser to: http://localhost:5000 + +3. The web interface uses the **same database** (`tablets.db`), so all your data is preserved. + +### Database Compatibility + +The CLI's database schema is **missing some columns** that the web version uses: +- `tablets.notes` - Added by web version +- `users.email` - Added by web version +- `users.phone` - Added by web version + +**If you've only used the CLI:** Your database is missing these columns. The web interface will still work, but won't be able to store notes, email, or phone until the columns are added. + +**To fix the database schema:** +```bash +# Run the web interface - it will add missing columns automatically +python3 app.py +``` + +The web version's `init_db()` will add any missing columns when it runs. + +## Recommendation + +**Use `app.py` (web interface) for all operations.** + +The CLI (`minimal_app.py`) is deprecated and will be removed in a future version. All development and maintenance efforts should focus on the web interface. + + ## Missing Features in CLI ### 1. User Management