Skip to content

chiragdhunna/gpt_jr

Repository files navigation

GPT Jr

GPT-Jr

This Flutter application combines the power of conversational AI and image generation, offering a seamless and interactive user experience. Users can interact with the app through voice commands, which are converted to text using the Flutter Speech to Text plugin. The app then utilizes the ChatGPT API to provide natural language responses, making it an ideal tool for information retrieval and conversation. Additionally, users can instruct the application to create images using the DALL·E API, adding a visually engaging dimension to the app.

Demo

demo.mp4

🧐 Features

Here are some of the project's best features:

  • 🎤 Voice Interaction: Use the microphone to ask questions or provide instructions, and the app will convert your speech to text for processing.
  • 🧠 Conversational AI: ChatGPT API powers the app's natural language understanding, enabling it to provide informative and contextually relevant responses.
  • 🖼️ Image Generation: Request the app to generate images based on user input using the DALL·E API, creating visual representations of concepts and ideas.
  • 💡 Seamless User Experience: The app combines voice recognition, language understanding, and image generation into a single, user-friendly interface.

💻 Built with

Technologies used in the project:

Frontend Stack

Backend & APIs

🚀 CI/CD Automation CI/CD Status

This project features a fully automated CI/CD pipeline powered by GitHub Actions and Fastlane, enabling seamless APK builds and distribution.

🔧 How It Works

  • On every push to the main branch:
    • ✅ The app is built using flutter build apk --release
    • ✅ The release APK is distributed to testers via Firebase App Distribution
    • ✅ A new GitHub Release is created automatically
    • ✅ The signed app-release.apk is attached to the GitHub Release

📦 Tools Used

  • Fastlane: Handles release builds and Firebase deployment via a custom lane.
  • GitHub Actions:
    • Automates the entire build + release process
    • Creates GitHub Releases with attached artifacts
  • Firebase App Distribution: Distributes APKs to internal testers instantly after every successful build.

📁 GitHub Workflow Snapshot

The workflow is defined in .github/workflows/build_and_release.yml

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - Checkout code
      - Set up Flutter & Java
      - Decode signing keystore
      - Build the release APK
      - Upload APK to Firebase
      - Create GitHub Release with APK attached

🧪 Firebase & GitHub Release Workflow in Action

After pushing code to the main branch:

  1. Fastlane builds and signs the APK.
  2. The signed APK is uploaded to Firebase App Distribution, making it instantly available to your tester group.
  3. The same APK is attached to a new GitHub Release, tagged with the current workflow run number for version tracking.

This ensures every production-ready APK is archived and distributed without any manual steps.


📂 Release Artifact Location

  • Firebase Testers: Receive the latest build via email or Firebase App Tester app.
  • GitHub Releases: Navigate to the Releases tab to download the latest signed APK (app-release.apk).

🔐 Secrets Used

These secrets are defined under your GitHub repository’s Settings > Secrets and variables:

  • KEYSTORE_BASE64: Base64-encoded keystore file for signing
  • KEYSTORE_PASSWORD, KEY_ALIAS, KEY_PASSWORD: Credentials for release signing
  • FIREBASE_CLI_TOKEN: Firebase CI auth token
  • FASTLANE_FIREBASE_APP_ID: Firebase App Distribution App ID
  • GITHUB_TOKEN: Built-in token used for creating releases and uploading artifacts

Getting Started

Prerequisites:

Before you begin, ensure you have the following software installed:

Installation:

  1. Clone the repository:

    git clone https://github.com/yourusername/gpt-jr.git
  2. Navigate to the project directory:

    cd gpt-jr
  3. Set up your ChatGPT and DALL·E API credentials in the secrets.dart file:

    class Secrets {
      static const openAIAPIKey = 'YOUR_OPENAI_API_KEY';
    }
  4. Install the necessary dependencies:

    flutter pub get
  5. Run the app on your preferred Flutter-compatible device or simulator:

    flutter run

Configuration

In the secrets.dart file, you can configure the API key for ChatGPT and DALL·E. Make sure to replace the placeholder YOUR_OPENAI_API_KEY with your actual API key.

Contributing

We welcome contributions from the community! If you have ideas for improvements or new features, please open an issue or submit a pull request. See our Contributing Guidelines for more details.

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published