How rs-team-2/employee-performance-tracker_team-2 works
What this project is (type + purpose)
This is a small full-stack-ish Python application (two “presentation layers”) that manages:
• Employee records + projects + assignments stored in SQLite (company.db, local file)
• Performance reviews stored in MongoDB Atlas (cloud NoSQL)
• A Streamlit web UI (app.py) and a terminal/CLI menu UI (main.py)
• Shared “service” modules that implement CRUD and reporting across the two databases
So the architecture is best represented as a modular monolith with two UIs and a hybrid persistence layer (SQLite + MongoDB).
How to read the file tree as architecture
From the repo root modules:
• app.py → Streamlit UI container (browser-driven)
• main.py → CLI UI container
• employee_manager.py → Employee domain logic (CRUD, likely SQLite)
• project_manager.py → Project + assignments domain logic (likely SQLite)
• performance_reviewer.py → Performance review domain logic (MongoDB)
• reports.py → Cross-database reporting (joins/aggregations across SQLite + MongoDB at the application layer)
• db_connections.py → DB connection + setup utilities for SQLite and MongoDB
• seed_data.py → Offline bootstrap job that creates tables + inserts initial data into both stores
• company.db → SQLite database file artifact
• tests/* → pytest test suite validating each module (useful to confirm boundaries/interactions)
Actors
• HR/Admin/Manager user (primary)
• Developer (runs seeding/tests)
System
• “Employee Performance Tracking System”
External Systems
• MongoDB Atlas (external managed cloud DB)
Data Stores
• SQLite file company.db (local data store; not an external system, but show as a store)
• User ↔ System (via Browser/Streamlit or Terminal/CLI)
• System ↔ MongoDB Atlas (performance reviews)
• System ↔ SQLite file (employees/projects/assignments)
Here “containers” are executable entrypoints / deployable units (even if all local):
Streamlit Web App (app.py)
• Talks to domain modules (employee/project/performance/reports)
• Reads Mongo URI from .env (show config source)
Terminal CLI App (main.py)
• Same domain modules
Database Access / Connection Layer (db_connections.py)
• SQLite connection (via sqlite3) to company.db
• Mongo connection (via pymongo or similar) to Atlas using MONGO_URI
SQLite DB (local file): company.db
• Employees, Projects, Assignments tables
MongoDB Atlas cluster
• Performance reviews collection(s)
Seeding Job / Script (seed_data.py)
• One-off/offline container that initializes SQLite tables + inserts seed rows and inserts Mongo seed documents
Test Runner (pytest)
• Streamlit app → employee_manager/project_manager → db_connections → SQLite
• Streamlit app → performance_reviewer → db_connections → MongoDB Atlas
• Streamlit app → reports → (db_connections → SQLite) + (db_connections → MongoDB) → aggregated report output
• seed_data.py → db_connections → SQLite + MongoDB (initialization)
• main.py → same as Streamlit paths (but separate UI)
Presentation
• app.py (Streamlit routes/widgets → calls service functions)
• main.py (menu prompts → calls service functions)
Domain/Service modules
• employee_manager.py
• project_manager.py
• performance_reviewer.py
• reports.py
Infrastructure
• db_connections.py (connection factory, create tables, helpers)
• .env / environment variables (config provider)
Data stores
• SQLite: company.db
• MongoDB Atlas
• app.py → employee_manager.py, project_manager.py, performance_reviewer.py, reports.py
• main.py → same modules
• Each service module → db_connections.py
• db_connections.py → SQLite file and → MongoDB Atlas
• reports.py → both SQLite and MongoDB paths (explicitly show it depends on both)
Hybrid persistence
• Relational data in SQLite (employees/projects/assignments)
• Document data in MongoDB (performance reviews)
• Reports must do “application-layer joins” (since the DBs can’t join across each other)
Infrastructure boundary via db_connections.py
• Single gateway/factory for DB connections and possibly table creation
Batch initialization
• seed_data.py is a separate execution path (job) that touches both persistence technologies
What “best and most accurate” means here (practical checklist)
• Treat SQLite as a local file store, not a server component.
• Treat MongoDB Atlas as an external managed service reachable via URI.
• both UIs (Streamlit + CLI) as first-class entrypoints.
• reports.py explicitly as the cross-db aggregator (it’s architecturally important).
• seed_data.py as a separate workflow that initializes both stores.
• A small “Dev/Test” corner showing pytest hitting the service modules (optional but useful for principal-level completeness).
• Verify any README-vs-tree inconsistencies (e.g., the mentioned connections/db_connections.py) before finalizing.
• “Submit performance review” (UI → performance_reviewer → db_connections → MongoDB)
• “Generate employee performance summary” (UI → reports → SQLite query + Mongo query → merge → output)
That set will be detailed, faithful to the repo structure, and will communicate the hybrid data model clearly.