FlutterDartLaravelSQLiteREST APIDockerGitLab CI/CD

Game Backlog

A Flutter and Laravel application for tracking games, with local SQLite storage, a REST API, and automatic game information lookup.

Game Backlog application overview

The Problem

For this assignment, I built an application for keeping track of games I want to play and already own. A key part of the project was supporting both local storage and a backend API. I wanted to keep the storage code separate so switching between the two would not require rewriting the screens.

  • Keep a backlog and wishlist in one place.
  • Track which games are owned and their play status.
  • Retrieve game information automatically to reduce manual input.
  • Support local storage and a backend API through the same interface.

The Solution

I built a Flutter application with two data source implementations, one using local SQLite storage and another calling a Laravel REST API. Both follow the same interface, so the rest of the application can use either implementation. When using the backend, background jobs retrieve additional game information, including artwork.

  • Add, edit, and remove games from a personal collection.
  • Track play status and ownership.
  • Automatically retrieve additional game information through the backend.
  • Use local SQLite storage or the Laravel API through a shared interface.

Architecture

How It Works

The Flutter application accesses game data through a repository layer and a shared data source interface. The local implementation reads and writes to SQLite, while the remote implementation sends requests to the Laravel REST API. Laravel handles CRUD operations, stores the data, and runs background jobs to retrieve additional game information. This keeps the screens separate from the details of how the data is stored.

FlutterRepository PatternSQLiteLaravel REST APIBackground JobsDocker
game_data_source.dart
abstract class GameDataSource {
    Future<List<Game>> retrieveGames();
    Future<Game?> getGame(int id);
    Future<Game> insertGame(Game game);
    Future<Game> updateGame(Game game);
    Future<void> removeGame(int id);
    Future<void> deleteAllGames();
}

Screenshots

Game Backlog overview showing tracked games
Creating a new game with play and ownership status
Game detail page with automatically retrieved game information
Editing an existing game's details

Technical Decisions

A Shared Data Source Interface

Both storage implementations follow the same interface for retrieving, adding, updating, and deleting games. This lets the application use either SQLite or the REST API without putting storage-specific code in the screens.

Separating UI And Data Access

Presentation, business logic, and data access are kept in separate layers. Widgets handle the interface, while repositories and data sources handle retrieving and storing games.

Retrieving Game Information In The Background

The Laravel backend uses background jobs to look up additional information for newly added games. This keeps the lookup separate from the initial request to save a game.

Automating Tests And Deployment

The project includes automated tests, a GitLab CI/CD pipeline, and Docker services. These provide a repeatable way to check changes and deploy the backend.

Supporting Two Data Sources

The main challenge was making local storage and API requests work through the same interface. Both implementations needed to return the expected game data and support the same operations, even though they retrieve and store it differently. Defining that interface helped me keep those differences out of the UI.

What I Learned

Building A Flutter Application

I worked with Flutter to build screens for viewing, adding, and editing games, and connected those screens to local storage and a custom backend.

Working With Interchangeable Implementations

Implementing the same interface for SQLite and the API gave me a practical understanding of how abstractions can reduce the impact of changing a data source.

Connecting Mobile And Backend Development

The project involved both sides of the application, from Flutter forms and data handling to Laravel endpoints, database storage, and background jobs.

Deploying The Backend

I used Docker, environment configuration, and GitLab CI/CD to run and deploy the backend outside my local development environment.

Damien Hensen

A Bit About Me

Outside of software development, I enjoy gaming, anime, and working on personal projects that help me learn something new.

Whether it's building applications, automating workflows, or experimenting with new technologies, I enjoy creating things and understanding how they work.

Let's connect.