How zeiadd1310/movieverse---movie-explorer-app- works
Purpose and Runtime
MovieVerse is a cross-platform Flutter/Dart movie explorer. It presents trending/searchable TMDB content, movie details and ratings, plus authenticated user watchlist/favorites flows. The Flutter app is the primary runtime; native launchers support Android, iOS, web, Linux, macOS, and Windows. Entry point: lib/main.dart.
Application Bootstrap and Navigation
Startup initializes shared application dependencies/providers and routes users through splash/authentication into the main experience. Router and app-flow utilities form the navigation/auth boundary, while the main layout hosts persistent feature navigation.
• lib/main.dart
• lib/core/utils/functions/app_router.dart
• lib/features/layout/main_layout.dart
Core Data and Service Boundary
Data access is organized around repository interfaces and implementations. Shared models, providers, failure types, and an API service centralize API-facing behavior rather than allowing views to call external services directly. TMDB is the movie-content REST dependency; Firebase configuration indicates Firebase-backed application services.
• lib/core/utils/functions/api_service.dart
• lib/core/data/providers.dart
• lib/firebase_options.dart
Authentication
The auth feature separates repository-backed identity operations from Cubit-driven presentation state and sign-in/sign-up/password-reset screens. Auth state controls access into the application flow.
• lib/features/auth/data/repos/auth_repo.dart
• lib/features/auth/data/repos/auth_repo_impl.dart
• lib/features/auth/presentation/cubits/auth_cubit.dart
Movie Discovery and Search
Home retrieves and presents movie/genre data, including trending content. Search is an independent vertical slice with its own movie model, repository contract/implementation, and Cubit state. Both follow the flow: view event → Cubit → repository → API service → state → rendered view.
• lib/features/home/data/repos/home_repo_impl.dart
• lib/features/home/presentation/cubits/home_cubit.dart
• lib/features/search/data/repos/search_repo_impl.dart
Details and Reviews
Selecting a movie enters the detail domain, which has dedicated detail and review repository layers and separate Cubits. This is the boundary for loading rich metadata and submitting or displaying ratings/reviews.
• lib/features/movie_details/data/repos/movie_details_repo_imp.dart
• lib/features/movie_details/data/repos/review_repo_impl.dart
• lib/features/movie_details/presentation/cubits/movie_details_cubit.dart
Personal Collections and Shared UI
Favorites and watchlist/watched screens provide user collection views; favorites has explicit Cubit state management. Reusable cards, headers, casts, ratings, bottom navigation, and form controls keep cross-feature rendering consistent. Local image assets support collection states.
• lib/features/favourites/presentation/cubits/favorites_cubit.dart
• lib/features/watchlist/presentation/views/watchlist_view.dart
• lib/widgets/movie_card.dart
Platform and Infrastructure
Flutter builds to native Android/iOS/desktop and web shells. Android includes Google services configuration, and root Firebase configuration supports deployment/service integration. Platform projects are generated host layers, not primary business logic.
• android/app/google-services.json
• firebase.json
• web/index.html
Main entry points: api_service.dart API service · main_layout.dart Main layout · main.dart Flutter entrypoint · app_router.dart Router & auth flow
Components 22
App Shell
- Flutter entrypoint · Initializes providers and application startup.
lib/main.dart - Router & auth flow · Routes splash and authentication into the app.
lib/core/utils/functions/app_router.dart - Main layout · Hosts persistent feature navigation.
lib/features/layout/main_layout.dart - Shared movie UI · Provides common movie cards and controls.
lib/widgets/movie_card.dart
Feature Domains
- Auth repository
lib/features/auth/data/repos/auth_repo.dart - Auth repository impl
lib/features/auth/data/repos/auth_repo_impl.dart - Auth Cubit · Controls authenticated access.
lib/features/auth/presentation/cubits/auth_cubit.dart - Home Cubit · Loads trending movies and genres.
lib/features/home/presentation/cubits/home_cubit.dart - Home repository
lib/features/home/data/repos/home_repo_impl.dart - Search repository · Search vertical-slice data access.
lib/features/search/data/repos/search_repo_impl.dart - Movie details Cubit · Loads selected movie metadata.
lib/features/movie_details/presentation/cubits/movie_details_cubit.dart - Details repository
lib/features/movie_details/data/repos/movie_details_repo_imp.dart - Review repository · Handles ratings and reviews.
lib/features/movie_details/data/repos/review_repo_impl.dart - Favorites Cubit · Manages user favorites.
lib/features/favourites/presentation/cubits/favorites_cubit.dart - Watchlist views · Displays watchlist and watched collections.
lib/features/watchlist/presentation/views/watchlist_view.dart
Data & Services
- Shared providers · Supplies shared application dependencies.
lib/core/data/providers.dart - API service · Centralizes API-facing behavior.
lib/core/utils/functions/api_service.dart - TMDB API · Movie and genre content source.
- Firebase services · Supports configured application services.
lib/firebase_options.dart
Platform Hosts
- Native & web hosts · Build targets for mobile, desktop, and web.
web/index.html - Android Google services
android/app/google-services.json - Firebase deployment
firebase.json
Connections 24
- Flutter entrypoint → Shared providers: initializes
- Flutter entrypoint → Router & auth flow: starts
- Router & auth flow → Auth Cubit: checks auth state
- Router & auth flow → Main layout: enters app
- Main layout → Home Cubit: hosts
- Main layout → Favorites Cubit: hosts
- Main layout → Watchlist views: hosts
- Auth Cubit → Auth repository: uses
- Auth repository impl → Auth repository: implements
- Auth Cubit → Auth repository impl: auth operations
- Auth repository impl → Firebase services: identity services
- Home Cubit → Home repository: loads content
- Home repository → API service: requests
- Search repository → API service: searches through
- Movie details Cubit → Details repository: loads details
- Details repository → API service: requests
- Review repository → API service: submits and loads
- API service → TMDB API: REST calls
- Shared providers → API service: provides
- Home Cubit → Shared movie UI: renders with
- Movie details Cubit → Review repository: reviews
- Flutter entrypoint → Native & web hosts: builds for
- Android Google services → Firebase services: configures
- Firebase deployment → Firebase services: deploys integration