Skip to content

Flutter app which gives the user the ability to consult rankings. By entering a query in the search bar, the app leverages ChatGPT for detailed information and DALL·E for visually compelling representations, generating personalized and engaging rankings.

Notifications You must be signed in to change notification settings

Mariovc/rankings_flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rankings

Introduction

Flutter app which gives the user the ability to consult rankings. By entering a query in the search bar, the app leverages ChatGPT for detailed information and DALL·E for visually compelling representations, generating personalized and engaging rankings.

This project showcases Clean Architecture in Flutter, utilizing the MVVM design pattern.

architecture

Screenshots

demo

Features

  • Clean Architecture
  • HTTP client to API REST (Dio)
  • Internationalization translations (Easy localization)
  • Routing (Go Router)
  • MVVM pattern with Cubit for state management
  • Dependency injection (Get it and Injectable).
  • Environment configuration (dev, prod)

Environment

The application has two environments and each one has its own configuration file:

  • dev: .env/dev.json
  • prod: .env/prod.json

Inside each one, you can find sensitive information that shouldn't be committed to this repository. Due to this, these configuration files cannot be uploaded to this repository. Please, add your own dev.json and prod.json inside .env folder with the following structure and replace the API key with your own OpenAI API key.

{
    "ENVIRONMENT": "prod",
    "API_KEY": "OPENAI_API_KEY",
    "BASE_URL": "api.openai.com"
}

Run and build

To run the application in each environment, you can use the following commands:

  • dev: flutter run --dart-define-from-file=.env/dev.json
  • prod: flutter run --dart-define-from-file=.env/prod.json

Also, you can configure your IDE to run the application in each environment.

OpenAI configuration

If you want to change the ChatGPT model, the maximum number of tokens per request, or any other OpenAI API parameters, you can modify these settings in lib\data\datasources\ranking\ranking_chatgpt_datasource_implementation.dart.

This can be useful, for instance, to reduce API costs, adjust the resolution of generated images, or tweak the "creativity" of ChatGPT responses by modifying the temperature parameter.

About

Flutter app which gives the user the ability to consult rankings. By entering a query in the search bar, the app leverages ChatGPT for detailed information and DALL·E for visually compelling representations, generating personalized and engaging rankings.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published