Add OpenAPI/Swagger documentation infrastructure for AI-assisted frontend development#50
Draft
Add OpenAPI/Swagger documentation infrastructure for AI-assisted frontend development#50
Conversation
…oints Co-authored-by: glittle <85186+glittle@users.noreply.github.com>
…tion Co-authored-by: glittle <85186+glittle@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Decouple frontend from .NET service for improved flexibility
Add OpenAPI/Swagger documentation infrastructure for AI-assisted frontend development
Oct 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR implements comprehensive OpenAPI/Swagger documentation for the TallyJ Election Management System, enabling AI-assisted frontend development and establishing the foundation for decoupling the frontend from the .NET backend.
Problem Addressed
The current TallyJ implementation couples UI rendering and business logic, making upgrades and cross-platform integration difficult. This creates barriers for onboarding new users and developers, and prevents the use of modern AI tools for rapid frontend prototyping.
Solution
Added a complete REST API layer with OpenAPI 3.0 specification alongside the existing MVC application, providing:
API Infrastructure
/api/v1/...) for future compatibilityInteractive Documentation
/ApiDocsfor live API testing/api/v1/docs/openapi.jsonSample Implementation
Created a complete Elections API demonstrating:
Domain Model Documentation
AI Integration Ready
The implementation provides everything needed for AI-assisted frontend development:
openapi.jsonto generate React componentsExample AI workflow:
Backward Compatibility
Files Added
openapi.json- Complete OpenAPI 3.0 specificationAPI_DOCUMENTATION.md- Human-readable API referenceSite/App_Start/WebApiConfig.cs- Web API configurationSite/Controllers/Api/ElectionsApiController.cs- Sample REST APISite/Models/DTOs/- Data transfer objects with validationSite/Views/ApiDocs/Index.cshtml- Interactive documentation UIBenefits
This implementation addresses the core issue of difficult onboarding while providing a clear path for modernizing the frontend using AI-assisted development tools.
Original prompt
Fixes glittle/TallyJ-4#2
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.