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.
-
Run the following command to start the application:
mvn spring-boot:run
Alternatively, you can build and run the JAR:
mvn clean package java -jar target/codecrafthub-1.0.0.jar
The 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.
Solution: Set JAVA_HOME environment variable to your JDK installation path.
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