How albertemb/filmadvisor works
Project Type and Purpose
• This is a full-stack web application (“FilmAdvisor”) built with:
• A TypeScript/React-style frontend (Vaadin Hilla)
• A Java/Spring Boot backend
• AWS DynamoDB and PostgreSQL as data stores
• External services (Streaming Availability API, IMDb)
• Purpose: Let users browse, filter, discover, and track movies across streaming platforms.
File Structure
• Top-level split:
• src/main/frontend → client-side UI
• src/main/java → server-side Spring Boot application
• docs/ → design docs, data import scripts, UML
• pom.xml, mvnw → Maven build
• tsconfig.json, vite.config.ts, package.json → frontend build
• Backend layout:
• amb.config → DynamoDB config
• amb.movie, amb.user, amb.userMovieStatus → domain entities, endpoints, repositories (impl + interface)
• Frontend layout:
• components, views, context, model, data, themes, types
• Vaadin Hilla connects TS code to secure Java endpoints automatically.
• Config files:
• application.properties (Spring Boot)
• DynamoDBConfig.java
• vite.config.ts, tsconfig.json (frontend bundling)
Extract Additional Insights from README
• Tech stack details (Java 21, Spring Boot 3.4.3, Vaadin 24.6.6, DynamoDB, PostgreSQL)
• Features (filters, random discovery, tracking status)
• Deployment instructions (mvnw, packaging)
a. Main Components
• User’s Browser / Frontend
• Vaadin Hilla UI Layer (React/TS components)
• Hilla Endpoints (auto-generated TypeScript ↔ Java bridges)
• Spring Boot Application Layer (Controllers/Services)
• Repositories & Data Access
• Datastores: AWS DynamoDB (movie metadata) & PostgreSQL (user profiles)
• External Services: Streaming Availability API, IMDb API
• Dev/Test Tools (import scripts, sample data, test suite)
b. Relationships & Data Flow
1. User interacts with Browser → Vaadin UI Components (FilterPanel, MovieCard, etc.)
2. UI calls Hilla Endpoints (e.g., MovieEndpoint, UserEndpoint)
3. Endpoints invoke Service/Repository layer in Spring Boot
4. Repositories read/write to DynamoDB or PostgreSQL
5. For streaming info or ratings, backend makes HTTP calls to external APIs
6. Responses bubble back through the same chain to the UI
c. Architectural Patterns & Design Principles
• Layered architecture (UI → API → Service/Repo → DB)
• Dependency injection via Spring Boot
• Repository pattern for DB access
• Context & state management in frontend (FilterContext)
• IaC/config layering (application.properties, DynamoDBConfig)
d. Key Technologies & Frameworks
• Frontend: Vaadin Hilla, React-style TS components, Vite
• Backend: Spring Boot, Java 21, Hilla secure endpoints
• DBs: AWS DynamoDB SDK, Spring Data (PostgreSQL)
• External HTTP clients (Streaming API, IMDb)