Sudoku Solver Web App Development
A comprehensive skill for building a full-stack Sudoku solver application with a ReactJS + TypeScript frontend and Java Spring Boot REST API backend.
What This Skill Does
This skill guides you through the complete development lifecycle of a Sudoku solver web application, from project scaffolding to deployment. It ensures proper project structure, required tooling, compilation, and documentation for a production-ready full-stack application.
Instructions
Follow these steps to build the Sudoku solver application:
1. Verify Copilot Instructions Setup
Ensure the `copilot-instructions.md` file exists in the `.github` directory of your workspace. This file should contain workspace-specific custom instructions for GitHub Copilot.
2. Clarify Project Requirements
Confirm the architecture:
**Frontend**: ReactJS with TypeScript for type safety and modern UI development**Backend**: Java Spring Boot for building RESTful APIs**Integration**: REST API communication between frontend and backend**Core Feature**: Sudoku puzzle solving algorithm3. Scaffold the Project
Set up the project structure:
Create a root directory for the monorepo or separate repositoriesInitialize the React + TypeScript frontend using `create-react-app` or ViteInitialize the Spring Boot backend using Spring Initializr (https://start.spring.io/)Configure proper directory structure: - `/frontend` - React application
- `/backend` - Spring Boot application
- `.github/` - GitHub-specific files including Copilot instructions
4. Customize the Project
Tailor the generated scaffolding:
Configure TypeScript settings (`tsconfig.json`) for frontendSet up Spring Boot application properties (`application.properties` or `application.yml`)Define REST API endpoints for Sudoku operations (submit puzzle, get solution, validate)Create React components for Sudoku grid, input handling, and results displayImplement Sudoku solving algorithm in Java backendConfigure CORS settings for frontend-backend communication5. Install Required Extensions
Ensure proper development environment:
**Frontend**: ESLint, Prettier, TypeScript extensions**Backend**: Java Extension Pack, Spring Boot Extension Pack**General**: GitHub Copilot, GitLens, REST ClientInstall npm dependencies for React applicationInstall Maven/Gradle dependencies for Spring Boot6. Compile the Project
Build both parts of the application:
**Frontend**: Run `npm run build` or equivalent to compile TypeScript and bundle assets**Backend**: Run `mvn clean install` or `./gradlew build` to compile Java code and run testsVerify no compilation errorsEnsure all type checks pass in TypeScriptConfirm all unit tests pass in backend7. Create and Run Tasks
Set up automated tasks:
Configure VS Code tasks (`.vscode/tasks.json`) for building frontend and backendCreate npm scripts for common frontend operations (dev, build, test, lint)Set up Maven/Gradle tasks for backend operationsCreate a unified task to run both frontend and backend concurrentlyTest all tasks execute successfully8. Launch the Project
Start the application in development mode:
Launch Spring Boot backend (typically on port 8080)Launch React development server (typically on port 3000)Configure VS Code launch configurations (`.vscode/launch.json`)Verify frontend can communicate with backend APITest Sudoku solving functionality end-to-end9. Ensure Documentation is Complete
Finalize project documentation:
Create comprehensive README.md with: - Project overview and features
- Setup instructions for both frontend and backend
- API endpoint documentation
- Development workflow
- Build and deployment instructions
Document Sudoku algorithm approachAdd inline code comments for complex logicInclude example Sudoku puzzles for testingCreate CONTRIBUTING.md if open-sourceUpdate `copilot-instructions.md` with project-specific guidelinesExample Usage
1. Create workspace and initialize Git repository
2. Follow scaffolding steps to generate React and Spring Boot projects
3. Implement Sudoku grid UI with 9x9 input cells in React
4. Create POST endpoint `/api/sudoku/solve` in Spring Boot controller
5. Implement backtracking algorithm for solving Sudoku
6. Connect frontend form submission to backend API
7. Display solved puzzle or validation errors in UI
8. Build, test, and launch application
9. Document setup and usage instructions
Constraints
Requires Node.js and npm installed for frontend developmentRequires JDK 17+ for Spring Boot backendRequires Maven or Gradle build toolGitHub Copilot extension must be active in VS CodeEnsure proper CORS configuration for local developmentBackend should validate Sudoku puzzle inputsFrontend should handle API errors gracefullyNotes
Use GitHub Copilot to accelerate development of boilerplate codeLeverage TypeScript for compile-time type safety in frontendFollow Spring Boot best practices for REST API designConsider implementing additional features: puzzle generation, difficulty levels, hintsEnsure responsive design for Sudoku grid UIAdd loading states and error boundaries in React componentsImplement proper logging in Spring Boot for debugging