How tri-p/covid-contact-tracing-app works
Purpose and Entry Point
This is a local desktop COVID contact-tracing data-entry application. Users enter personal and COVID-related details, persist them to CSV, and search stored records by surname.
• Startup module: main_app.py
• Primary application/UI implementation: application_ui.py
Runtime Model
The application runs as a Python process with a Tkinter GUI event loop. main_app.py initializes the application and starts the interactive window; user actions are handled through GUI callbacks implemented in application_ui.py.
There is no server, browser client, database service, or network integration indicated.
UI/Application Controller
application_ui.py is the architectural center: it contains the form layout, form state, command buttons, dialog/window behavior, and application logic. Its object-oriented design likely groups related UI and action behavior so changes can be made centrally.
• application_ui.py
• main_app.py
Data Capture and Submission Flow
1. A user fills in personal-information fields and COVID-related questions in the primary Tkinter form.
2. The Submit action collects the current form values.
3. Submitted values are appended to the local CSV data store.
4. Clear resets the form fields for the next entry.
The persistence boundary is filesystem-based CSV rather than a database.
• application_ui.py
• details.csv
Search Flow
1. The Search action opens a secondary search interface/window.
2. The user supplies a last name.
3. Application logic reads details.csv and matches records by surname.
4. Matching details are displayed; an unsuccessful lookup presents “No result found.”
Search is constrained to surname input, and CSV column ordering/schema must remain compatible with the UI’s read/write logic.
• application_ui.py
• details.csv
Storage Contract
details.csv is the sole durable record store and is both written during submission and read during searches. It is an important boundary: manually edited data must remain comma-separated and match the expected application columns.
• details.csv
• application_ui.py
User-Controlled Lifecycle
The primary command surface consists of Clear, Submit, Search, and Exit. Exit terminates the GUI/application process; the Tkinter event loop and process bootstrap reside across:
• main_app.py
• application_ui.py
Main entry points: application_ui.py Primary entry form · main_app.py Application bootstrap · details.csv Contact records
Components 11
Desktop runtime
- Application bootstrap · Initializes the application and starts the GUI.
main_app.py - Tkinter event loop · Dispatches interactive window events.
Tkinter application
- Application controller · Centralizes form layout, dialogs, and command behavior.
application_ui.py - Primary entry form · Captures personal and COVID-related details.
application_ui.py - Submit action · Collects current form values for persistence.
application_ui.py - Clear action · Resets fields for the next entry.
application_ui.py - Search window · Accepts a surname lookup.
application_ui.py - Surname lookup · Matches CSV records and displays results or no-result feedback.
application_ui.py - Exit action · Terminates the GUI process.
application_ui.py
Local storage
- Contact records · Shared durable store; column order must match UI read/write logic.
details.csv
Other components
- Data-entry user · Enters records and searches by surname.
Connections 16
- Application bootstrap → Application controller: initializes
- Application bootstrap → Tkinter event loop: starts
- Tkinter event loop → Application controller: dispatches events to
- Data-entry user → Primary entry form: fills in
- Application controller → Primary entry form: renders and manages
- Primary entry form → Submit action: Submit
- Submit action → Contact records: appends record
- Primary entry form → Clear action: Clear
- Clear action → Primary entry form: resets fields
- Primary entry form → Search window: Search
- Data-entry user → Search window: supplies surname
- Search window → Surname lookup: submits query
- Surname lookup → Contact records: reads records
- Surname lookup → Search window: shows matches or no result
- Primary entry form → Exit action: Exit
- Exit action → Tkinter event loop: stops