How alenma3apps/tastymeal works
Project type and purpose
• TastyMeal is a full-stack, cross‐platform recipe management application.
• It comprises three main modules:
• BackEnd-SpringBoot: a RESTful API and business-logic layer.
• FrontEnd-Desktop: an Electron/React desktop client.
• FrontEnd-Mobile: a React Native mobile client.
File structure
• Top‐level directories:
• BackEnd-SpringBoot (Maven/Spring Boot project)
• FrontEnd-Desktop (Electron + React + Webpack)
• FrontEnd-Mobile (Expo/React Native with Next.js-style routing)
• Backend follows a classic layered architecture:
– controllers (HTTP endpoints)
– services (business logic)
– repositories (JPA interfaces)
– models/DTOs
– security (JWT filter, config)
• Desktop and Mobile: component-based UI, “services” or “api” layers to call the backend, context/hooks on mobile, CSS/modules/styles on desktop.
• Configuration: application.properties, tailwind/webpack/babel configs, package.json, pom.xml.
Key insights from README
• Uses Spring Boot + MySQL for persistence.
• JWT-based auth with secure endpoints.
• React Native for iOS/Android, Electron for Windows/macOS/Linux.
• Features: user auth, recipe CRUD, rating/filtering, profile management.
Main components & their relationships
a. Components
1. Desktop Client (Electron + React)
2. Mobile Client (React Native + AuthContext)
3. API Gateway / Spring Boot Backend
4. MySQL Database
5. External services: (none in current scope)
b. Interactions
• Desktop & Mobile → REST calls (HTTPS) → Spring Boot controllers
• Controllers → Services → Repositories → MySQL
• Security layer (JwtAuthFilter, JwtService) sits in front of protected endpoints
• DataInitializer loads initial JSON data on startup
c. Architectural patterns
– Client–Server (REST)
– Layered backend (Controller → Service → Repository)
– JWT authentication filter chain (WebSecurityConfig)
– Component-based UIs with service wrappers on clients
d. Technologies to call out
• Spring Boot, Maven, JPA/Hibernate, JWT, MySQL
• Electron, Webpack, React, CSS modules (desktop)
• React Native, Context API, Tailwind (mobile)
Detailed elements to capture
• Client: mention key client modules (e.g., “AuthContext” on mobile, “services/” folder on desktop).
• Backend security: show JwtAuthFilter and SecurityConfig intercepting calls.
• Data flow: user login → /api/auth → JwtService → token issued → subsequent calls include Authorization header.
• DataInitializer loads recetas.json and eventos.json at startup.
• Repositories map to models (User, Recipe, Comment, Event, Report).