How claudesaul/salesforce-taskmanager works
Project type and purpose
• This is a Python‐based command‐line Service Technician Management System.
• It manages technicians’ tasks by loading initial data from text files, persisting it into an SQLite database, and offering CLI menus for inventory, customer, and machine management.
• Key features include viewing machines needing repair, distance calculations between customer sites, on-the-fly inventory updates, service history lookups, and order suggestions.
File structure
• Top‐level items:
• Inventory_Management.py – main application logic (presentation + business layer)
• Inventory Management Tests.py – unit tests for core functionality
• README.md – project overview and usage instructions
• inventoryList.txt, customerList.txt, machinesList.txt – initial data sources
• No separate “frontend” or “backend” folders; the CLI acts as the presentation layer, and the business logic and persistence are together in a single script.
README for additional insights
• Confirms Python + SQLite usage.
• Data files are parsed and loaded into an in-memory or file-based SQLite database on each run.
• No external web front end; pure CLI interactions.
• Distance calculation likely uses an internal algorithm or a geolocation library.
Components
a. Data Sources
• Text File Ingestion Module (parses .txt files)
• inventoryList.txt, customerList.txt, machinesList.txt
b. Database Layer
• SQLite Engine (schema: Inventory, Customers, Machines, ServiceHistory tables)
• Data Access Objects (CRUD)
c. Business Logic Layer
• Inventory Management (add/remove/update items)
• Customer Management (list, details, distance calculations)
• Machine Management (status, location, service history)
d. Presentation Layer
• CLI Menu & Input Handler
e. (Optional) External Services
• Geocoding/Distance API or internal algorithm for computing distances
Relationships and interactions
• On startup, the File Ingestion Module reads all text files → populates SQLite.
• CLI Menu → invokes Business Logic functions → issues SQL queries via Data Access Objects → returns results.
• Business Logic may call Distance Calculation component → uses either internal math or an external API.
• Inventory modifications in Business Logic → commit back to SQLite → persisted until next run.
• Unit Tests exercise Business Logic and Data Access with mock or test DB instances.
Architectural patterns / design principles
• Layered architecture: Presentation (CLI) → Business Logic → Data Access → Persistence (SQLite).
• Single‐responsibility: separate modules for ingestion, logic, DB operations, and tests.
• Data initialization pattern: seed DB from static files on each boot for reproducibility.
• Test harness to validate core modules independently of the live DB.