Commit Graph

56 Commits

Author SHA1 Message Date
poprhythm 1c7e704ad3 Add comprehensive validation system with runtime configuration
Implements a flexible validation framework for student rankings, team assignments, and team composition with administrator-configurable rules and thresholds.

Validation System:
- Reflection-based rule discovery eliminates manual registration
- Base classes (RequiredEventTypeRuleBase, EventCountThresholdRuleBase) reduce code duplication by ~250 lines
- 12 validation rules covering event requirements, counts, and team constraints
- Configurable severity levels (Warning/Error) per rule type
- ValidationService with caching for optimal performance
- Rules apply contextually (StudentRanking, StudentAssignment, TeamComposition)

Configuration & Admin UI:
- ValidationSettings admin page for editing thresholds and severity levels
- ChapterSettings admin page for editing chapter information
- Settings stored in Data/appsettings.json for runtime configuration
- JSON config works in both development and production environments
- Auto-creates Data directory and config template on first run

User Experience:
- ValidationWarnings component displays inline warnings/errors
- Integrated in Event Ranking, Registration, and Team Assignment pages
- Color-coded severity indicators (warning yellow, error red)
- Includes "Too Many Regional Events" rule (max 3 recommended)

Technical Improvements:
- Template Method pattern for rule base classes
- Singleton rule instances with lazy initialization
- Configuration loaded via IConfiguration with fallback to defaults
- Safe JSON updates preserve other appsettings sections
2025-12-13 22:15:16 -05:00
poprhythm 215b9dccca Don't display captain for individual events 2025-12-12 14:05:29 -05:00
poprhythm b465235096 Add some local storage to save settings between
page reloads.
2025-12-12 12:48:44 -05:00
poprhythm aeafdcee1a Add a student/team list used for registration 2025-12-12 10:35:37 -05:00
poprhythm 27dc995bb8 Improvements for home page and formatting 2025-12-11 14:17:33 -05:00
poprhythm 8289b7139a Improve Event Ranking Editor 2025-12-07 00:00:57 -05:00
poprhythm abd4840ec1 Improve home page layout 2025-12-06 23:47:27 -05:00
poprhythm 5ea3289d39 Fix Logged In message on the navbar 2025-12-06 23:08:47 -05:00
poprhythm 1c5017bf51 Do not allow team assignment when other teams exist already 2025-12-06 23:08:06 -05:00
poprhythm 56dbd549fd Update settings for production deployment 2025-12-05 14:28:23 -05:00
poprhythm 2d5d075879 Feature-based folder structure
1. Created feature-based folder structure - Components now organized by domain feature
  2. Moved all components - 20+ files moved to new locations
  3. Updated _Imports.razor - Added all new namespace paths for global component access
  4. Updated CustomThemes.cs namespace - Changed from WebApp.Components.Layout to WebApp.Components.Shared.Layout
  5. Removed old using directives - Cleaned up Login.razor and Routes.razor
  6. Removed empty directories - Cleaned up old folder structure
2025-12-03 22:04:23 -05:00
poprhythm bd04483bed Database migrations are now checked in production. 2025-12-03 15:20:43 -05:00
poprhythm 6fc1ec1192 Remove logs 2025-12-03 14:15:19 -05:00
poprhythm a0313687da 1. Fixed Misleading Property Names
- File: WebApp/ChapterSettings.cs
  - Change: Renamed StateContainer.UserId to ScheduledTeams
  - Impact: Property name now accurately reflects what it stores

  2.  Added Structured Logging with Serilog

  - Packages Added:
    - Serilog.AspNetCore
    - Serilog.Sinks.Console
    - Serilog.Sinks.File
  - Files Modified:
    - Program.cs - Added Serilog configuration with console and file logging
    - appsettings.json - Added Serilog minimum log levels
    - appsettings.Development.json - Added Debug level logging for development
  - Benefits:
    - Structured log output for better parsing/analysis
    - Automatic file rotation (daily, 30 days retention)
    - Logs stored in logs/webapp-.txt
    - Better formatted console output

  3.  Added Global Error Handling

  - File Created: WebApp/Components/Shared/AppErrorBoundary.razor
  - File Modified: WebApp/Components/App.razor
  - Features:
    - Catches unhandled exceptions throughout the app
    - Shows detailed error info in Development environment
    - Shows user-friendly message in Production
    - Logs errors automatically
    - Provides "Return to Home" button

  4.  Enhanced Input Validation

  - File Modified: WebApp/Components/Login.razor
  - Validations Added:
    - Email: Required, valid email format, max 100 chars, regex validation
    - Password: Required, min 8 chars, max 100 chars
  - Benefits:
    - Client-side validation before submission
    - Clear error messages for users
    - Prevents invalid data submission
2025-12-03 14:10:08 -05:00
poprhythm 54875e970c Add more secure form handling 2025-12-02 22:36:41 -05:00
poprhythm feaaf76f46 Add an empty layout for the login page.
Move some of the shared components
2025-12-01 20:54:34 -05:00
poprhythm 3461f94854 Refactor TeamScheduler, easier to read and maintain 2025-12-01 06:58:56 -05:00
poprhythm 69dd517d73 Fix a bunch of warnings 2025-12-01 00:11:52 -05:00
poprhythm bfaebfbb13 Fix up CRUD pages a bit. 2025-12-01 00:03:25 -05:00
poprhythm a2857d56e0 Auth configuration in docker 2025-11-30 23:55:34 -05:00
poprhythm e5bf3692f6 Authentication implementation 2025-11-30 23:48:58 -05:00
poprhythm 382fffe1d4 Refactor the Meeting Scheduler 2025-11-30 23:03:52 -05:00
poprhythm 46843fea0f Removed extra title for absent student. 2025-11-24 15:04:19 -05:00
poprhythm 688dfd6d0f Add text box selector for students 2025-11-24 08:21:23 -05:00
poprhythm d8f2a3cf52 Improve team identifier handling 2025-11-23 13:30:24 -05:00
poprhythm 1aaebe5dce Handle absent students in meetin schedule 2025-11-23 11:39:16 -05:00
poprhythm 72da28992f Team scheduler now considers all available students 2025-11-23 11:05:29 -05:00
poprhythm 87be3e9c68 Refinements to auth 2025-11-23 11:04:20 -05:00
poprhythm d188d4fbd1 Add simple auth 2025-11-11 14:41:51 -05:00
poprhythm 307c6e103f Update mudblazor 2025-11-11 14:01:14 -05:00
poprhythm b7fa7fcbe1 Add recomendations for meeting scheduler 2025-10-31 13:29:43 -04:00
poprhythm cf9949876d Add a TimeSlot object, refactor 2025-10-30 09:35:41 -04:00
poprhythm 967aa567e8 Progress on schedule page formatting 2025-10-27 14:44:11 -04:00
poprhythm ea21406309 Meeting schedule updates
including copy to clipboard
2025-10-27 10:13:54 -04:00
poprhythm 2119de05a8 Update formating for event ranking 2025-10-22 10:11:07 -04:00
poprhythm 5708d846d1 Fix for team comparison in UnassignedStudentScheduler 2025-10-22 09:42:44 -04:00
poprhythm d777b4f67d Update the icons on Ranking and Assignment 2025-10-20 12:54:48 -04:00
poprhythm c42cc43399 Scheduler refinements 2025-10-20 12:03:46 -04:00
poprhythm 054166d7af Redo routes for meeting schedule 2025-10-19 10:05:18 -04:00
poprhythm 349ec09cd7 Scheduler improvements 2025-10-19 10:03:26 -04:00
poprhythm 0ff45f9310 Docker and EF Sqlite adjustments 2025-10-17 14:28:10 -04:00
poprhythm 3964a61794 Team schedule improvements 2025-10-17 07:58:14 -04:00
poprhythm 551688f6fe Add container registry publishing 2025-10-16 15:05:46 -04:00
poprhythm 7c2ba9044a Refactor CrudActions from index pages 2025-10-03 13:48:46 -04:00
poprhythm df27cbc298 Refactor TeamStudents from other components 2025-10-03 13:22:22 -04:00
poprhythm 6407dfca71 Remove Team.Number
Add Team.Identifier
2025-10-03 12:47:05 -04:00
poprhythm 05e5e69d0b Clean up Team page
Add an EventAttributes display
2025-10-03 12:37:11 -04:00
poprhythm 9152c86d41 Refactor Delete
Add Scheduler
2025-10-03 09:29:28 -04:00
poprhythm 338eab0294 Add Title graphic 2025-10-02 15:47:52 -04:00
poprhythm eee377dffc Merge 2025-10-02 15:29:26 -04:00