As a personal challenge, I have set out to develop a Spring Boot backend application within 24 hours. The goal of the application is to manage information about magical potions in the Wizarding World.
To achieve this, I will be implementing various Spring technologies such as Spring Data, Spring Data Queries, Spring database connection, and Spring JPA repositories . Additionally, I will be creating RESTful API endpoints for managing the potions.
My goal is to demonstrate my proficiency in Spring and backend development while working efficiently under time constraints. π―
Here are the features that make up the core of the Harry Potter and the Enchanted Elixir π§ββοΈπ§ͺ project:
- Student Entity: The
Student
class is an Entity and can be persisted by its Long IDs. - Student Repository: There is a
JpaRepository
interface dedicated toStudent
entities that can persistStudent
objects. - Room Entity: The
Room
class is an Entity and can be persisted by its Long IDs. - Room Repository: There is a
JpaRepository
interface dedicated toRoom
entities that can persistRoom
objects. - Room Endpoints: Endpoints for creating, finding, deleting, updating, finding available rooms, or finding rooms for owners create the same response as with the PostgreSQL database.
- Ingredient Entity: The
Ingredient
class is an Entity and can be persisted by its Long IDs. - Ingredient Repository: There is a
JpaRepository
interface dedicated toIngredient
entities that can persistIngredient
objects. - Recipe Entity: The
Recipe
class is an Entity and can be persisted by its Long IDs. - Recipe Repository: There is a
JpaRepository
interface dedicated toRecipe
entities that can persistRecipe
objects. - Potions: Potions are persisted in the database, and all existing potions are listed at
/potions
. - Brew Potion: At
/potions
, a Student can brew a Potion by sending a POST request. The list of Ingredients is checked if it matches any Potion. If the brew is a discovery, the Recipe is persisted with the list of Ingredients, the Student, and with a name generated from the Student's name (e.g. "John Doe's discovery #2"). The response contains the persisted Potion. - Student Potions: At
/potions/{student-id}
, all known Potions of a Student are listed. - Generate Potion: By sending a POST request to
/potions/brew
, a new Potion is generated containing the Student and the status of brewing. - Update Potion: By sending a PUT request to
/potions/{potion-id}/add
, the Potion with thepotion-id
gets updated with the new Ingredient. The response contains the updated Potion object.
With these features, the Harry Potter and the Enchanted Elixir π§ββοΈπ§ͺ project provides an efficient way to manage information about magical potions in the Wizarding World.
Thank you for taking the time to drop by and check out this Backend API Project
If you've liked or found this project helpful, please consider giving it a star π and supporting me on my journey to improve my programming skills and chase my aspirations. I'd love to hear your feedback on this project, so feel free to leave your thoughts and suggestions.
Every contribution counts and is deeply appreciated as I pursue a path of lifelong learning and aim to create meaningful content for the magical and muggle community alike.
Thank you again for your support! π