v0.12.0 - Add modular system architecture with user-based module access
- Add Modules and UserModules database tables - Create home page with module selection grid - Implement per-user module assignment in user management - Add route guards for module access control - Refactor navigation: login -> home -> modules, admin console via button - Add Font Awesome icons
This commit is contained in:
@@ -29,6 +29,9 @@ Long-term goal: evolve into a WMS, but right now focus on making this workflow r
|
||||
5) **Keep it to the point.** Default to short answers. Only explain more if I ask.
|
||||
6) **Verify safety.** Warn me before destructive actions (delete/overwrite/migrations). Offer a safer alternative.
|
||||
7) **Evidence-based debugging.** Ask for exact error text/logs and versions before guessing.
|
||||
8) **CSS changes:** Ask which device(s) the change is for (desktop/mobile/scanner) before editing. Each has its own file.
|
||||
9) **Database changes:** The app auto-initializes the database if it doesn't exist. Schema is in /database/init_db.py.
|
||||
10) **Docker deployment:** Production runs in Docker on Linux (jisoo). Volume mounts only /app/database to preserve data between updates.
|
||||
|
||||
## How you should respond
|
||||
- Start by confirming which mode we’re working on: Cycle Count or Physical Inventory.
|
||||
@@ -37,10 +40,53 @@ Long-term goal: evolve into a WMS, but right now focus on making this workflow r
|
||||
- When writing SQL: be explicit about constraints/indexes that matter for lots/bins/sessions.
|
||||
- When talking workflow: always keep session isolation (shift-based counts) as a hard requirement.
|
||||
|
||||
## First response checklist (every new task)
|
||||
Ask for:
|
||||
- DB type (SQLite/Postgres/MySQL) + ORM (SQLAlchemy?) or raw SQL
|
||||
- Current data model (tables or SQLAlchemy models) for: count_session, bin/location, expected_lines, scans
|
||||
- How the Master Inventory list is formatted (CSV columns)
|
||||
- What “Finalize BIN” should do exactly (lock? allow reopen? who can override?)
|
||||
Then proceed one step at a time.
|
||||
## Scanlook (current product summary)
|
||||
Scanlook is a web app for warehouse counting workflows built with Flask + SQLite.
|
||||
|
||||
**Current Version:** 0.11.3
|
||||
|
||||
**Tech Stack:**
|
||||
- Backend: Python/Flask, raw SQL (no ORM)
|
||||
- Database: SQLite (located in /database/scanlook.db)
|
||||
- Frontend: Jinja2 templates, vanilla JS, custom CSS
|
||||
- CSS Architecture: Desktop-first with device-specific overrides
|
||||
- style.css (base/desktop)
|
||||
- mobile.css (phones, 360-767px)
|
||||
- scanner.css (MC9300 scanners, max-width 359px)
|
||||
- Deployment: Docker container, Gitea for version control + container registry
|
||||
|
||||
**Project Structure:**
|
||||
- app.py (main Flask app, routes for auth + dashboard)
|
||||
- /blueprints/ (modular routes: counting.py, sessions.py, users.py, data_imports.py, admin_locations.py)
|
||||
- /templates/ (Jinja2 HTML templates)
|
||||
- /static/css/ (style.css, mobile.css, scanner.css)
|
||||
- /database/ (scanlook.db, init_db.py)
|
||||
- db.py (database helper functions: query_db, execute_db)
|
||||
- utils.py (decorators: login_required, role_required)
|
||||
|
||||
**Key Features (implemented):**
|
||||
- Count Sessions with archive/activate functionality
|
||||
- Master baseline upload (CSV)
|
||||
- Current baseline upload (optional, for comparison)
|
||||
- Staff scanning interface optimized for MC9300 Zebra scanners
|
||||
- Scan statuses: Match, Duplicate, Wrong Location, Ghost Lot, Weight Discrepancy
|
||||
- Location/BIN workflow with Expected → Scanned flow
|
||||
- Session isolation (archived sessions blocked from access)
|
||||
- Role-based access: owner, admin, staff
|
||||
- Auto-initialize database on first run
|
||||
|
||||
**Two count types:**
|
||||
1. Cycle Count: shows Expected list for the BIN
|
||||
2. Physical Inventory: blind count (no Expected list shown)
|
||||
|
||||
**Long-term goal:** Modular WMS with future modules for Shipping, Receiving, Transfers, Production.
|
||||
|
||||
|
||||
|
||||
## Quick Reference
|
||||
- Database: SQLite at /database/scanlook.db
|
||||
- Scanner viewport: 320px wide (MC9300)
|
||||
- Mobile breakpoint: 360-767px
|
||||
- Desktop: 768px+
|
||||
- Git remote: http://10.44.44.33:3000/stuff/ScanLook.git
|
||||
- Docker registry: 10.44.44.33:3000/stuff/scanlook
|
||||
Reference in New Issue
Block a user