How mezea11/health-care-system works
Project type and purpose
• This is a C#/.NET 9 console application implementing a layered, in-memory-plus-CSV “healthcare management” system with a strong focus on security/privacy and fine-grained role-based access control (RBAC).
Main architectural layers and components
• Presentation Layer (Console UI)
• Program.cs – application entry point
• NotificationService.cs – console notifications/alerts
• Models/PersonnelUI.cs – role-specific menus and prompts
• Business Logic Layer (Services & Domain Entities)
• Services/JournalService.cs – journal-reading/writing workflows
• Services/ScheduleService.cs – appointment scheduling workflows
• Models/*.cs – domain entities: User, Appointment, Location, Schedule, WorkShift
• Models/RolePermissions.cs & PasswordHelper.cs – RBAC and authentication logic
• Models/Utils.cs – shared helper functions
• Data Access Layer
• Models/FileHandler.cs – repository-style API for reading/writing CSV files
• Persistence / Storage
• Data/*.txt / Data/*.csv – persistent storage of users, appointments, journals, backups
• Unit Tests (XUnit)
• Tests/UserTests.cs, Tests/AdminTests.cs – automated validation of authentication, registration, permissions
Relationships and data flows
• User inputs → Presentation Layer
• Presentation invokes → Business Services (JournalService, ScheduleService)
• Services operate on → Domain Entities (User, Appointment, etc.)
• Services call → FileHandler
• FileHandler reads/writes → CSV data files in Data folder
• RolePermissions & PasswordHelper are used by both UI and services for auth checks
Key patterns and principles
• Layered architecture: clean separation UI → services → data access → storage
• RBAC & security as cross-cutting concerns (Password hashing, Permission checks)
• Repository-style pattern in FileHandler for abstracting CSV I/O
• Domain-driven design: small cohesive classes for entities and operations
Technologies & frameworks
• C# / .NET 9 console application
• CSV files as lightweight persistent store
• XUnit for unit testing of core business/security logic