Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CodeCraftHub Learning Management System

A simple REST API for tracking your learning goals and courses built with Java and Spring Boot.

Features

  • Complete CRUD operations for course management
  • JSON file-based storage (no database needed)
  • RESTful API design
  • Proper error handling

Installation

  1. Clone or download the project.
  2. Install Java JDK 17 or higher.
  3. Install Maven (if not already installed).

Running the Application

  1. Navigate to the project directory.

  2. 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.

API Endpoints

1. Add a Course

POST /api/courses

Request body:

{
  "name": "Python Basics",
  "description": "Learn Python fundamentals",
  "target_date": "2025-12-31",
  "status": "Not Started"
}

2. Get All Courses

GET /api/courses

3. Get Specific Course

GET /api/courses/{id}

4. Update Course

PUT /api/courses/{id}

Request body (all fields optional):

{
  "status": "In Progress"
}

5. Delete Course

DELETE /api/courses/{id}

Testing

Use the provided curl commands or import the Postman collection to test all endpoints.

Troubleshooting

Problem: "JAVA_HOME not set"

Solution: Set 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

Project Structure

codecrafthub/
├── src/
│   └── main/
│       ├── java/
│       │   └── com/codecrafthub/
│       │       ├── CodeCraftHubApplication.java
│       │       ├── controller/
│       │       ├── model/
│       │       └── service/
│       └── resources/
├── courses.json     # Data storage (auto-created)
└── pom.xml         # Dependencies

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages