This is a Spring Boot backend and Svelte/SvelteKit frontend project with a PostgreSQL database for digitizing, storing, and retrieving/viewing family recipes.
The repository contains two main parts:
src/— Java Spring Boot backend that serves REST APIs, persistence, authentication, and business logic.recipearchive-frontend/— SvelteKit frontend application that consumes the backend APIs and delivers the user experience.
- Java 21 SDK
- Maven 3.8+ or the included Maven wrapper (
./mvnw) - Node.js 18+ / npm
- PostgreSQL database
- Clone the repository.
- Create a PostgreSQL database for the application.
- Configure the database connection in
src/main/resources/application-dev.ymlorsrc/main/resources/application.properties. - Start the backend and frontend services for development.
From the project root:
./mvnw clean package
./mvnw spring-boot:runThe backend starts on http://localhost:8080 by default.
- Build:
./mvnw clean package - Run:
./mvnw spring-boot:run - Test:
./mvnw test
From the frontend folder:
cd recipearchive-frontend
npm install
npm run devThe frontend development server typically runs on http://localhost:5173 and should be configured to point to the backend API.
The backend uses YAML configuration files under src/main/resources/:
application-dev.yml— development settingsapplication-prod.yml— production settingsapplication.properties/application.yaml— shared Spring Boot configuration
Flyway migration scripts are located in src/main/resources/db/migration/.
The database uses PostgreSQL and has the following tables and table columns.
- Recipe ID: big_serial (primary key)
- User ID: big_int (foreign key)
- Title: varchar(200)
- Description: text
- Ingredients: text
- Instructions: text
- Allergies: text
- Prep Time: int
- Cooking Time: int
- Servings: int
- Created At: timestamp
- Updated At: timestamp
- User ID: big_serial (primary key)
- First Name: varchar(50)
- Last Name: varchar(50)
- Username: varchar(50)
- Email: varchar(100)
- Password: varchar(255)
- Created At: timestamp
- Updated At: timestamp
These are the available endpoints served by the Spring Boot server along with the controller names that handle the logic for each endpoint.
| Name | Method | Path | Controller |
|---|---|---|---|
| Login | POST | /auth/login | AuthController |
| Get all recipes | GET | /recipes | RecipeController |
| Get one recipe | GET | /recipes/{id} | RecipeController |
| Get a user's recipes | GET | /recipes/user/{userId} | RecipeController |
| Create a recipe | POST | /recipes | RecipeController |
| Delete a recipe | DELETE | /recipes/{id} | RecipeController |
| Update a recipe | PUT | /recipes/{id} | RecipeController |
| Get all users | GET | /users | UserController |
| Get a user | GET | /users/{id} | UserController |
| Register a user | POST | /users | UserController |
| Update a user | PUT | /users/{id} | UserController |
| Delete a user | DELETE | /users/{id} | UserController |
- Use the frontend app to authenticate and manage recipes through the backend APIs.
- Flyway applies database schema migrations automatically when the backend starts.
- The project uses YAML configuration by default, with separate files for development and production profiles.
The frontend source is located in recipearchive-frontend/ and includes the SvelteKit application, route files, and UI components.
This project includes the LICENSE file in the repository root directory.
