A simple RESTful API that lets you add, update and look up roller skate events happening all over the UK. With the increasing popularity of roller skating and growing community groups, this service was created to help centralise event information so anyone can quickly find out what’s on, grab the details they need and reduce the number of “Does anyone know…?” type questions I often see in group chats.
Phase 1 focuses on bringing together skate event details for three core event types:
- Family - events specifically designed for adults and children
- Party - party-style events which have a scheduled DJ playing
- Workshop - learning sessions with instructors
An abstract SkateEvent superclass holds common fields (such as eventName, startDateTime, endDateTime etc.) inherited by all concrete subclasses; Family, Party and Workshop. Each subclass adds fields that are unique to that event type. A joined inheritance strategy has been adopted as it brings the benefit of data consistency, allows for polymorphic queries and allows for the addition of more skate event types in future releases.
- Java
- Spring Boot
- Maven
- MySQL
To get a local copy up and running follow these simple example steps.
Before you begin, make sure you have the following installed:
- Clone the repository:
git clone https://github.com/codebygrace/skate-event-api.git- Navigate to the project directory:
cd skate-event-apiA database dump file named events_dump_20250830.sql is located in the database directory.
Follow the steps below to import it into the database used by the API.
- In the
skate-event-apidirectory execute the following command to import the database:
mysql -u [username] -p < database/events_dump_20250830.sqlNote: If your MySQL user doesn't have a password set, omit the -p flag. Replace [username] with your MySQL username.
- Create a new file at
skate-event-api/src/main/resources/local.propertiesand paste in the following:
spring.datasource.url=jdbc:mysql://localhost:3306/skateevents
# Replace "root" with your database user, if applicable
spring.datasource.username=root
# Specify your database user's password, if applicable. If your database user doesn't have a password set, delete the line below
spring.datasource.password=YOUR_MYSQL_PASSWORD- Replace the username and password values with your MySQL credentials. IMPORTANT: Ensure there are no spaces before or after the password.
- To start the API, run the following command from the root project directory:
mvn spring-boot:run| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/skate-events | Retrieve a list of (optionally filtered) skate events. Events can be filtered by event type, start date time and city |
| GET | /api/v1/skate-events/{id} | Retrieve a specific skate event by its ID |
| POST | /api/v1/skate-events | Create a new skate event |
| PUT | /api/v1/skate-events/{id} | Update an existing skate event by ID |
| DELETE | /api/v1/skate-events/{id} | Delete a skate event by ID |
Click the button below to view request examples and run tests in Postman
Alternatively, use the skateevent.http file along with a VS Code extension such as REST Client by Huachao Mao to quickly and efficiently test API endpoints.
The skateevent.http file can be found locally at src/test/resources/skateventapi.http
🔗 Skate Events API Project Overview
To view full Swagger API documentation:
- Start the application
mvn spring-boot:run- Navigate to http://localhost:8080/swagger-ui/index.html
- In the
skate-event-apidirectory execute the following command to generate the Javadoc:
mvn javadoc:javadoc- Once build is complete, navigate to
target/reports/apidocswhich contains the generated HTML documentation
cd target/reports/apidocs- Open the
index.htmlfile in a web browser to view the documentation
To run unit tests, run the following command from the root project directory:
mvn clean testThe skateeventapi package is organised in a package-by-feature manner which enhances modularity.
└── 📁skate-event-api
└── 📁database
├── events_dump_20250830.sql
└── 📁docs
├── skate-event-erd.png
└── 📁src
└── 📁main
└── 📁java
└── 📁com
└── 📁codebygrace
└── 📁skateeventapi
└── 📁common
└── 📁exception
├── GlobalExceptionHandler.java
├── Result.java
└── 📁config
├── OpenAPIConfiguration.java
└── 📁skateevents
├── Family.java
├── Party.java
├── SkateEvent.java
├── SkateEventController.java
├── SkateEventNotFoundException.java
├── SkateEventRepository.java
├── SkateEventService.java
├── SkateEventType.java
├── Workshop.java
├── App.java
└── 📁resources
└── 📁static
└── 📁templates
├── application.properties
└── 📁test
└── 📁java
└── 📁com
└── 📁codebygrace
└── 📁skateeventapi
└── 📁skateevents
├── SkateEventControllerTest.java
├── SkateEventServiceTest.java
└── 📁resources
├── skateventapi.http
└── 📁target
├── HELP.md
├── mvnw
├── mvnw.cmd
├── pom.xml
└── README.md
- Add dynamic filtering to allow for more parameters
- Add a PATCH method to support partial event updates
- Prevent duplicate events from being created
- Add Authentication
- Integrate with Google Calendar API to create and manage events
A few resources that I found particularly helpful
