tags: devchallenge, githubchallenge, dotnet, react, architecture
GitHub “Finish-Up-A-Thon” Challenge Submission
PointsTableAndExams — From an Unfinished Prototype to a Robust, Multi-Tenant Evaluation Management System
This is a submission for the GitHub Finish-Up-A-Thon Challenge.
What I Built
PointsTableAndExams is a comprehensive evaluation management system designed to process complex exam scoring, apply dynamic weighting, and distribute points across scalable tables. What started as a quick, tightly-coupled prototype has been completely re-engineered into a production-ready application built on a modern stack: a .NET 9 Web API backend and a React + TypeScript + Vite frontend, styled with Tailwind CSS.
The philosophy behind this revival was simple: software design matters. I didn't just want to finish the UI; I wanted to build it using enterprise-grade standards.
What makes this iteration stand out:
- Clean Architecture & DDD: The core business rules (scoring logic, weight distribution) are 100% isolated in the Domain layer, completely agnostic of databases or web frameworks.
- CQRS Pattern: I implemented Command Query Responsibility Segregation to separate read and write operations. This drastically optimized performance for complex queries generating the points tables.
- Behavior-Driven Development (BDD): Quality assurance is built-in. I wrote BDD specifications to guarantee the scoring algorithms behave exactly as expected under various edge cases.
- O(1) Complexity Focus: Refactored critical evaluation loops that previously suffered from performance bottlenecks into highly efficient data structures.
- Modern Frontend: Replaced the old UI with a blazing-fast React application, utilizing Vite for bundling and Tailwind CSS for a fully responsive, modern design.
- Cloud-Ready: The system is containerized and optimized for deployment on Azure, ensuring scalability and cost-efficiency.
GitHub repository: https://github.com/rodrigofurlaneti/PointsTableAndExams
Demo
Clean Architecture Implementation (CQRS Handler):
csharp
// The application layer is now clean, handling commands with isolated logic
public class CalculateExamScoreCommandHandler : IRequestHandler<CalculateExamScoreCommand, ScoreResult>
{
private readonly IExamRepository _examRepository;
private readonly IScoreCalculatorService _scoreCalculator;
public CalculateExamScoreCommandHandler(IExamRepository examRepository, IScoreCalculatorService scoreCalculator)
{
_examRepository = examRepository;
_scoreCalculator = scoreCalculator;
}
public async Task<ScoreResult> Handle(CalculateExamScoreCommand request, CancellationToken cancellationToken)
{
var exam = await _examRepository.GetByIdAsync(request.ExamId, cancellationToken);
// Domain logic execution, isolated from infrastructure
var finalScore = _scoreCalculator.Calculate(exam, request.StudentAnswers);
return finalScore;
}
}
Feature: Exam Scoring Calculation
As a system administrator
I want the system to calculate points accurately based on question weights
So that student evaluations are fair and transparent
Scenario: Correct calculation with mixed weights
Given an exam exists with 2 questions
And Question 1 has a weight of 2.0
And Question 2 has a weight of 1.5
When the student answers Question 1 correctly and Question 2 incorrectly
Then the final calculated score should be 2.0
(Author's note: Insert a screenshot of your React/Tailwind frontend dashboard here)
The Comeback Story
This project started from a frustrating reality: building a quick prototype often leads to technical debt that paralyzes future development.
The first version was a monolithic application. It got the job done for a single use case, but the UI logic, Entity Framework queries, and business rules were tangled together in massive controller methods. It sat unfinished for a long time because adding new features meant risking breaking the fragile scoring calculations. The Finish-Up-A-Thon was the exact push I needed to tear it down and rebuild it correctly.
Before — what the project looked like when I picked it back up:
A monolithic structure with massive controllers.
Hardcoded business rules mixed directly with SQL data access code.
No automated tests (making refactoring terrifying).
Basic, unresponsive UI built with outdated frontend practices.
Poor performance on large datasets due to nested loops and N+1 query issues.
What I finished to get to this final release:
Total Architectural Overhaul: Migrated the entire backend to .NET 9, implementing Clean Architecture. The domain is now pure.
CQRS Implementation: Segregated commands and queries, making the API endpoints clean, testable, and scalable.
Algorithm Optimization: Eliminated N+1 queries in Entity Framework and refactored the scoring loop to achieve O(1) time complexity where possible, drastically improving the calculation speed for large tables.
BDD & Unit Testing: I rigorously documented and fixed the BDD scenarios, ensuring that all specifications for the AccessAuthentication and scoring modules were correctly written and tested.
Frontend Rewrite: Threw away the old views and built a fresh, decoupled SPA using React, TypeScript, and Vite. The UI is now fully responsive thanks to Tailwind CSS.
The transformation from a "fragile script" to a scalable, beautifully architected software solution took late nights and deep focus. The Finish-Up-A-Thon was the deadline I needed to actually ship it.
My Experience with GitHub Copilot
GitHub Copilot was deeply involved in every phase of this rewrite—not as a tool that just wrote code for me, but as a brilliant pair programmer that accelerated my architectural decisions.
Transitioning a legacy codebase to Clean Architecture requires a lot of structural setup. Here is where Copilot changed the game:
Accelerating Boilerplate: When setting up MediatR for the CQRS pattern, Copilot perfectly anticipated the structure. I would define the Command record, and it instantly generated the corresponding CommandHandler, complete with the correct constructor injections for my repositories.
Refactoring to O(1) Complexity: I had an old, nested loop used for cross-referencing student answers with the answer key. I wrote a comment: // Refactor to use a Dictionary for O(1) lookups. Copilot immediately provided the optimized implementation, cutting down lines of code and improving performance.
Drafting BDD Tests: Writing Gherkin syntax and mapping it to step definitions can be tedious. Copilot understood the context of my PointsTable entities and suggested highly relevant edge cases for the scoring logic that I hadn't initially considered. It helped me ensure the BDD documentation was flawlessly written.
React & Tailwind Velocity: On the frontend, building the data tables to display the points was incredibly fast. I typed a comment describing a responsive grid for the exam results, and Copilot generated the full React component with all the necessary Tailwind utility classes for dark mode and mobile responsiveness.
What Copilot didn’t do: it didn’t design the domain boundaries or decide how to segregate the micro-services. Those architectural decisions were mine. But it removed the friction between "knowing what pattern to use" and "typing out the implementation."
Without Copilot, this level of structural refactoring would have taken weeks of tedious typing. With it, I shipped a tested, documented, and architecturally sound framework. That's the difference.
Top comments (0)