A simple REST API for tracking your learning goals and courses built with Java and Spring Boot.
- Complete CRUD operations for course management
- JSON file-based storage (no database needed)
- RESTful API design
- Proper error handling
- Clone or download the project
- Install Java JDK 17 or higher
- Install Maven (if not already installed)
Navigate to the project directory and run:
mvn spring-boot:runOr build and run the JAR:
mvn clean package
java -jar target/codecrafthub-1.0.0.jarThe API will be available at http://localhost:8080
POST /api/courses
Request body:
{
"name": "Python Basics",
"description": "Learn Python fundamentals",
"target_date": "2025-12-31",
"status": "Not Started"
}GET /api/courses
GET /api/courses/{id}
PUT /api/courses/{id}
Request body (all fields optional):
{
"status": "In Progress"
}DELETE /api/courses/{id}
Use the provided curl commands or import the Postman collection to test all endpoints.
Problem: "JAVA_HOME not set"
Solution: Set the JAVA_HOME environment variable to your JDK installation path
Problem: "Port already in use"
Solution: Stop other applications using port 8080, or change the port in application.properties
codecrafthub/
├── src/
│ └── main/
│ ├── java/
│ │ └── com/codecrafthub/
│ │ ├── CodeCraftHubApplication.java
│ │ ├── controller/
│ │ ├── model/
│ │ └── service/
│ └── resources/
├── courses.json # Data storage (auto-created)
└── pom.xml # Dependencies
Disclaimer: The response generated by your LLM might differ from the sample response shown here.