Skip to content

sk116/cource_management_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Course Management API

This project is a RESTful API for managing topics and cources related to them, built with Spring Boot. It utilizes Spring Boot Web for building web applications, Apache Derby as the database, and Spring Data JPA for interacting with the database.

Features

  • Cource Management: CRUD operations for managing topics and cources related to them.
  • Database Storage: In-memory database using Apache Derby.
  • Interface: RESTful endpoints for course management.

Technologies Used

  • Java: Core programming language for the application logic.
  • Spring Boot: Java framework for fast, scalable web applications.
  • JPA: ORM tool for efficient database interaction.
  • Apache Derby: Database for storing user and note information.

Prerequisites

  • Java Development Kit (JDK) 8 or higher.
  • Maven for building the project.

Getting Started

Clone the repository

git clone https://github.com/sk116/cource_management_api.git

Navigate to the project directory

cd cource_management_api

Build the project using Maven

mvn clean install

Run the application

mvn spring-boot:run

The application will start on http://localhost:8080.

API Endpoints

Topics

Get all topics

GET /topics

Get a topic by ID

GET /topics/{topicId}

Create a new topic

POST /topics

Request Body:

{
  "id": "Topic Id"
  "name": "Topic Name",
  "description": "Topic Description"
}

Update an existing topic

PUT /topics/{topicId}

Request Body:

{
  "id": "Topic Id"
  "name": "Topic Name",
  "description": "Topic Description"
}

Delete a topic

DELETE topics/{topicId}

Cources

Get all courses

GET /topics/{topicId}/courses

Get a course by ID

GET /topics/{topicId}/courses/{courceId}

Create a new course

POST /topics/{topicId}/courses

Request Body:

{
  "id": "Cource Id"
  "name": "Course Name",
  "description": "Course Description"
}

Update an existing course

PUT /topics/{topicId}/cources/{courceId}

Request Body:

{
  "id": "Cource Id"
  "name": "Course Name",
  "description": "Course Description"
}

Delete a course

DELETE topics/{topicId}/cources/{courceId}

Database Configuration

This application uses Apache Derby as an embedded, in-memory database. The database is configured in the application.properties file:

spring.datasource.url=jdbc:derby:memory:courseDB;create=true
spring.datasource.driver-class-name=org.apache.derby.jdbc.EmbeddedDriver
spring.jpa.database-platform=org.hibernate.dialect.DerbyTenSevenDialect
spring.jpa.hibernate.ddl-auto=update

These settings ensure that the database is created in memory each time the application starts.

Dependencies

The project relies on the following dependencies:

  • Spring Boot Starter Web
  • Spring Boot Starter Data JPA
  • Apache Derby

These dependencies are defined in the pom.xml file.

Contributing

Feel free to contribute to the project by opening issues or submitting pull requests.

Contact

For any inquiries or issues, please contact.

Additional Resources

For more information on the technologies used in this project, refer to the following resources:

About

RESTful APIs for managing topics and cources, built with Spring Boot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages