How swent-epfl/public works
This repository is an EPFL software-engineering course repository, not a single deployed product. Its Android exercises include a Rick and Morty character-list app in MVVM, persistence, and dependency-injection variants. The sampled repository code shows the data workflow: request characters from the API, cache successful results locally, and read the cache after network I/O failure. UI-to-data wiring and database construction vary across exercise versions and were not established by the sampled source, so those connections are omitted.
Main entry points: CharacterRepository.kt Character repository · RickAndMortyApiService.kt Character API service · CharacterDao.kt Character DAO · Character.kt Character model
Components 8
Character data access
- Character repository
exercises/Testing-II/DI/app/src/main/java/com/swent/mvvm/model/repository/CharacterRepository.kt - Character model
exercises/Testing-II/DI/app/src/main/java/com/swent/mvvm/model/data/Character.kt
Remote API
- API response models
exercises/Testing-II/DI/app/src/main/java/com/swent/mvvm/model/api/CharactersResponse.kt - Character API service
exercises/Testing-II/DI/app/src/main/java/com/swent/mvvm/model/api/RickAndMortyApiService.kt
Local cache
- Character DAO
exercises/Testing-II/DI/app/src/main/java/com/swent/mvvm/model/persistence/CharacterDao.kt - Character entity
exercises/Testing-II/DI/app/src/main/java/com/swent/mvvm/model/persistence/CharacterEntity.kt - Characters database
exercises/Testing-II/DI/app/src/main/java/com/swent/mvvm/model/persistence/CharactersDatabase.kt
Other components
- Rick and Morty API
Connections 7
- Character repository → Character API service: requests characters
- Character API service → Rick and Morty API: GET characters
- Character API service → API response models: decodes response
- Character repository → Character DAO: caches and reads
- Character repository → Character model: maps characters
- Character repository → Character entity: maps cache rows
- Character DAO → Characters database: queries and inserts