A Spring Boot REST API for solving Wordle puzzles using intelligent heuristics and data structures.
- Smart Wordle Solving: Advanced algorithms to suggest optimal words
- RESTful API: Clean endpoints for frontend integration
- CORS Support: Ready for web application integration
- Health Monitoring: Built-in health check endpoint
- Framework: Spring Boot 3.3.5
- Language: Java 17
- Build Tool: Maven
- API: RESTful endpoints
GET /api/wordle/health
Returns: "Wordle Solver API is running!"
POST /api/wordle/solve
Content-Type: application/json
{
"word": "hello",
"hints": "- e - - x"
}
Response:
{
"suggestions": ["world", "house", "mouse"],
"message": "Found 3 suggestions",
"success": true
}- Java 17 or higher
- Maven 3.6+
# Clone the repository
git clone https://github.com/YiranHu361/wordle-backend.git
cd wordle-backend
# Run the application
mvn spring-boot:runThe API will be available at http://localhost:8080
# Build the application
mvn clean package
# Run the JAR
java -jar target/wordle-backend-0.0.1-SNAPSHOT.jar- Connect your GitHub repository to Render
- Set build command:
mvn clean package - Set start command:
java -jar target/wordle-backend-0.0.1-SNAPSHOT.jar - Deploy!
PORT: Server port (auto-set by platform)SPRING_PROFILES_ACTIVE: Set toproductionfor production
The API is configured to accept requests from:
http://localhost:3000(development)https://*.vercel.app(Vercel deployments)https://*.netlify.app(Netlify deployments)
server.port=${PORT:8080}
spring.application.name=wordle-backend
spring.profiles.active=${SPRING_PROFILES_ACTIVE:default}Use the following format for hints:
-= Gray (letter not in word)y= Yellow (letter in word, wrong position)g= Green (letter in word, correct position)
Example:
- Word:
hello - Hints:
- e - - x - Meaning:
h(gray),e(yellow),l(gray),l(gray),o(gray)
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is open source and available under the MIT License.
Yiran Hu - GitHub