How slimshanks/classroutinemanager works
Purpose and executable entry point
Class Routine Manager is a native desktop application for managing class schedules. It is built in C++17 with Qt 6 Widgets and SQLite, with CMake producing the ClassRoutineManager executable. Application startup is in src/main.cpp; build composition and Qt linkage are defined by CMakeLists.txt.
Application shell and UI boundary
The main window owns the desktop interaction surface and coordinates user-facing schedule/authentication actions. src/mainwindow.h and src/mainwindow.cpp form the Qt Widgets presentation boundary, while resources/styles/main.qss supplies application-wide Qt stylesheet styling.
Authentication stage
AuthManager encapsulates authentication-related operations, separating credential/session logic from widgets and schedule management. The UI should invoke this layer rather than directly handling auth persistence or validation. Paths: src/authmanager.h, src/authmanager.cpp.
Database and persistence boundary
DBManager is the SQLite access layer. It centralizes database connection, schema/query operations, and persistence concerns so higher-level managers do not depend directly on Qt SQL/SQLite APIs. Paths: src/dbmanager.h, src/dbmanager.cpp.
Routine domain management
RoutineManager represents the schedule-focused application/service layer. It mediates routine creation, retrieval, modification, or organization between the main window and database layer. Paths: src/routinemanager.h, src/routinemanager.cpp.
Primary control and data flow
1. src/main.cpp initializes the Qt application runtime and creates the main window.
2. src/mainwindow.cpp receives desktop UI events and delegates authentication concerns to AuthManager and schedule concerns to RoutineManager.
3. Manager components use DBManager for durable reads/writes.
4. DBManager communicates through Qt SQL to the local SQLite database.
5. Returned auth/routine state is presented back through Qt Widgets.
This creates a practical boundary chain: Qt UI → domain/auth managers → database manager → SQLite.
Runtime and infrastructure
The application runs as a local Qt 6 Widgets desktop process, not as a web service. Material dependencies are Qt 6 Widgets for UI, Qt SQL for database integration, SQLite for local persistence, and CMake for build generation. Windows bootstrap support is provided by setup-windows.ps1; repository styling resources live under resources/styles/.
Main entry points: mainwindow.cpp Main window · dbmanager.cpp DB manager · main.cpp Application entry · CMakeLists.txt CMake build
Components 14
Desktop Application
- CMake build · Builds the ClassRoutineManager executable and links Qt.
CMakeLists.txt - Application entry · Initializes the Qt runtime and creates the main window.
src/main.cpp - Qt 6 Widgets + SQL · Provides the desktop UI runtime and SQL integration.
- Application stylesheet
resources/styles/main.qss - Windows bootstrap
setup-windows.ps1
Application Layers
- Main window · Desktop presentation boundary and interaction coordinator.
src/mainwindow.cpp - Main window interface
src/mainwindow.h - Auth manager · Encapsulates credential and session operations.
src/authmanager.cpp - Auth manager interface
src/authmanager.h - Routine manager · Mediates schedule creation, retrieval, modification, and organization.
src/routinemanager.cpp - Routine manager interface
src/routinemanager.h
Local Persistence
- DB manager · Centralizes database connection, schema, queries, and persistence.
src/dbmanager.cpp - DB manager interface
src/dbmanager.h - Local SQLite database
Connections 17
- CMake build → Application entry: builds executable
- CMake build → Qt 6 Widgets + SQL: links
- Application entry → Main window: creates
- Application entry → Qt 6 Widgets + SQL: initializes
- Main window interface → Main window: declares
- Auth manager interface → Auth manager: declares
- Routine manager interface → Routine manager: declares
- DB manager interface → DB manager: declares
- Main window → Auth manager: delegates authentication
- Main window → Routine manager: delegates schedule actions
- Main window → Qt 6 Widgets + SQL: presents through
- Application stylesheet → Main window: styles
- Auth manager → DB manager: persists and reads
- Routine manager → DB manager: persists and reads
- DB manager → Qt 6 Widgets + SQL: uses Qt SQL
- DB manager → Local SQLite database: reads and writes
- Windows bootstrap → CMake build: bootstraps Windows build