Skip to content

Database setup#19

Merged
Megan235 merged 7 commits into
devfrom
DatabaseSetup
May 17, 2026
Merged

Database setup#19
Megan235 merged 7 commits into
devfrom
DatabaseSetup

Conversation

@GabrielaBerimbau
Copy link
Copy Markdown
Contributor

Database Alignment & Package Restructure

Aligns the entire backend package structure with the currently implemented database schema and prepares the project for feature implementation.

Changes made:

  • Database tables created and data seeded for each table.

Renames (entity table mismatches)

  • RecipeVault.java to Vault.java (maps to vaults table)
  • PreferenceProfile.java to UserPreferences.java (maps to user_preferences table)
  • InventoryItemResponse.java to PantryIngredientResponse.java

Removed (no matching DB tables)

  • PantryRepository.java
  • InventoryItemRepository.java

New package - recipe/ (separated from vault)

  • Recipe.java, RecipeIngredient.java, RecipeStep.java
  • RecipeRepository.java, RecipeIngredientRepository.java, RecipeStepRepository.java
  • RecipeService.java, RecipeController.java
  • DTOs: RecipeRequest.java, RecipeResponse.java, RecipeIngredientRequest.java, RecipeStepRequest.java

New package - config/

  • SecurityConfig.java - Spring Security, JWT filter registration, BCrypt bean
  • JwtUtil.java - token generation and validation
  • JwtAuthFilter.java - intercepts every request and validates the token
  • GlobalExceptionHandler.java - consistent JSON error responses

Missing entities added

  • Role.java, UserProfile.java (auth)
  • VaultFolder.java, VaultFolderRecipe.java (vault)
  • RecipeIngredient.java, RecipeStep.java (recipe)

Missing repositories and DTOs added across all packages

  • UserProfileRepository.java, PantryIngredientRepository.java
  • VaultFolderRepository.java, VaultFolderRecipeRepository.java
  • VaultFolderRequest.java, VaultFolderResponse.java

Frontend
Added recipe_screen.dart, recipe_provider.dart, vault_provider.dart

Tests
Added recipe/RecipeControllerTest.java and recipe/RecipeServiceTest.java
Renamed VaultPreferenceTest.java to VaultServiceTest.java

@GabrielaBerimbau GabrielaBerimbau requested a review from Megan235 May 17, 2026 00:15
@GabrielaBerimbau GabrielaBerimbau self-assigned this May 17, 2026
@github-actions github-actions Bot added the frontend Work to be completed on the frontend label May 17, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud
Copy link
Copy Markdown

@Megan235 Megan235 merged commit 6cad88e into dev May 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend database frontend Work to be completed on the frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants