How evolv-projects/pep-gp-webdevproject-recipe works
This is a recipe-management web application: users register or log in, then browse, search, and manage recipes; admins additionally manage ingredients. The Java/Javalin backend exposes REST routes and delegates business operations to services and JDBC DAOs backed by H2. The README documents the browser workflows and API contract; source excerpts show representative controller, service, DAO, and connection behavior. Some controller and wiring details are unsampled, so unverified relationships are omitted.
Main entry points: RecipeService.java Recipe operations · IngredientService.java Ingredient operations · AuthenticationController.java Authentication routes · ChefService.java Chef accounts
Components 22
Browser interface
- Login and registration
src/main/resources/public/frontend/login/login-page.js - Recipe workspace
src/main/resources/public/frontend/recipe/recipe-page.js - Ingredient admin
src/main/resources/public/frontend/ingredients/ingredient-page.js
REST API
- Authentication routes
src/main/java/com/revature/controller/AuthenticationController.java - Recipe routes
src/main/java/com/revature/controller/RecipeController.java - Ingredient routes
src/main/java/com/revature/controller/IngredientController.java - Admin authorization
src/main/java/com/revature/util/AdminMiddleware.java - Route setup
src/main/java/com/revature/util/JavalinAppUtil.java
Domain services
- Authentication and sessions
src/main/java/com/revature/service/AuthenticationService.java - Chef accounts
src/main/java/com/revature/service/ChefService.java - Recipe operations
src/main/java/com/revature/service/RecipeService.java - Ingredient operations
src/main/java/com/revature/service/IngredientService.java - Chef account
src/main/java/com/revature/model/Chef.java - Recipe
src/main/java/com/revature/model/Recipe.java - Ingredient
src/main/java/com/revature/model/Ingredient.java - Recipe ingredient
src/main/java/com/revature/model/RecipeIngredient.java - Pagination options and results
src/main/java/com/revature/util/Page.java
Persistence
- Chef persistence
src/main/java/com/revature/dao/ChefDAO.java - Recipe persistence
src/main/java/com/revature/dao/RecipeDAO.java - Ingredient persistence
src/main/java/com/revature/dao/IngredientDAO.java - H2 database
src/main/java/com/revature/util/ConnectionUtil.java
Other components
- User
Connections 27
- User → Login and registration: registers or logs in
README.md - User → Recipe workspace: manages recipes
README.md - User → Ingredient admin: administers ingredients
README.md - Login and registration → Authentication routes: sends auth requests
README.md - Recipe workspace → Recipe routes: calls recipe API
README.md - Ingredient admin → Ingredient routes: calls ingredient API
README.md - Route setup → Authentication routes: registers routes
src/main/java/com/revature/util/JavalinAppUtil.java - Route setup → Recipe routes: registers routes
src/main/java/com/revature/util/JavalinAppUtil.java - Route setup → Ingredient routes: registers routes
src/main/java/com/revature/util/JavalinAppUtil.java - Authentication routes → Authentication and sessions: delegates auth
src/main/java/com/revature/controller/AuthenticationController.java - Authentication routes → Chef accounts: uses accounts
src/main/java/com/revature/controller/AuthenticationController.java - Recipe routes → Recipe operations: delegates recipes
src/main/java/com/revature/controller/RecipeController.java - Ingredient routes → Ingredient operations: delegates ingredients
src/main/java/com/revature/controller/IngredientController.java - Authentication and sessions → Chef accounts: checks and saves chefs
src/main/java/com/revature/service/AuthenticationService.java - Chef accounts → Chef persistence: persists accounts
src/main/java/com/revature/service/ChefService.java - Recipe operations → Recipe persistence: persists recipes
src/main/java/com/revature/service/RecipeService.java - Ingredient operations → Ingredient persistence: persists ingredients
src/main/java/com/revature/service/IngredientService.java - Chef persistence → H2 database: queries and writes
src/main/java/com/revature/dao/ChefDAO.java - Recipe persistence → H2 database: queries and writes
src/main/java/com/revature/dao/RecipeDAO.java - Ingredient persistence → H2 database: queries and writes
src/main/java/com/revature/dao/IngredientDAO.java - Chef accounts → Chef account: manages
src/main/java/com/revature/service/ChefService.java - Recipe operations → Recipe: manages
src/main/java/com/revature/service/RecipeService.java - Ingredient operations → Ingredient: manages
src/main/java/com/revature/service/IngredientService.java - Recipe persistence → Recipe ingredient: maps recipe data
src/main/java/com/revature/dao/RecipeDAO.java - Recipe operations → Pagination options and results: builds paged results
src/main/java/com/revature/service/RecipeService.java - Ingredient operations → Pagination options and results: builds paged results
src/main/java/com/revature/service/IngredientService.java - Admin authorization → Authentication and sessions: validates sessions
src/main/java/com/revature/util/AdminMiddleware.java