Cinemapedia is organized around three distinct layers that communicate through well-defined contracts. Each layer has a single responsibility and depends only on the layer below it — never above.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/juuaaann456/DMI-Practica06/llms.txt
Use this file to discover all available pages before exploring further.
Layer structure
Dependency flow
The dependency arrows point inward toward the domain:- Presentation depends on domain contracts (repositories, entities)
- Infrastructure implements those domain contracts
- Domain depends on nothing external
The domain layer contains no Flutter or HTTP imports — it is pure Dart. This makes it independently testable and portable.
Data flow for a movie list request
Provider triggers a load
A Riverpod
NotifierProvider calls loadNextPage(), incrementing the page counter and calling the repository method.Repository delegates to datasource
MovieRepositoryImpl forwards the call to the injected MoviesDatasource, applying no extra transformation in this case.Datasource fetches from the API
MoviedbDataSource makes an HTTP GET request via Dio to TheMovieDB API and deserializes the JSON response into MovieDbResponse.Mapper converts to domain entity
MovieMapper.movieDBToEntity() transforms each MovieMovieDB model into a Movie entity, constructing full image URLs in the process.Explore each layer
Domain layer
Entities, abstract datasource contracts, and repository interfaces that define the application’s business rules.
Infrastructure layer
Concrete HTTP datasource, API response models, mappers, and the repository implementation.
Presentation layer
Screens, widgets, and Riverpod providers that manage UI state and trigger data loads.