Skip to content

TRY-growth/FE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Try 🍀

A Flutter application designed to assist in preparing for English speaking tests (TOEFL) using the OpenAI GPT API.

This repository focuses on the front-end implementation. For the Spring Boot server and AI prompt engineering, please refer to the back-end repository.

📁 Project Structure

lib/
├── main.dart                      # The entry point of the application
├── src/
│   ├── repository/                # Handles data management and interaction with data sources
│   │   ├── task1_repository.dart    
│   │   ├── task2_repository.dart   
│   │   ├── task3_repository.dart    
│   │   ├── task4_repository.dart     
│   │   ├── news_repository.dart     
│   │   └── home_repository.dart    
│   ├── model/                     # Defines the data structures
│   │   ├── task1_model.dart      
│   │   ├── task2_model.dart         
│   │   ├── task3_model.dart       
│   │   ├── task4_model.dart         
│   │   ├── news_model.dart        
│   │   └── report_model.dart       
│   └── view/                      # Contains the UI components
│       ├── base_view.dart           
│       ├── auth/                  # Contains authentication views and view models
│       │   ├── login_view.dart           
│       │   └── login_view_model.dart 
│       ├── home/
│       │   ├── home_view.dart          
│       │   ├── home_view_model.dart    
│       │   ├── rotation_3d.dart        
│       │   └── learning_history_view.dart 
│       ├── test/
│       │   ├── common/            # Shared widgets for test and news
│       │   │   ├── microphone_test_widget.dart    
│       │   │   ├── reading_material_widget.dart  
│       │   │   ├── loading_view.dart            
│       │   │   ├── feedback_view.dart           
│       │   │   ├── question_widget.dart       
│       │   │   └── listening_material_widget.dart 
│       │   ├── test_view.dart        
│       │   ├── task1/
│       │   │   ├── task1_view.dart          
│       │   │   └── task1_view_model.dart 
│       │   ├── task2/
│       │   │   ├── task2_view.dart        
│       │   │   └── task2_view_model.dart    
│       │   ├── task3/
│       │   │   ├── task3_view.dart        
│       │   │   └── task3_view_model.dart   
│       │   ├── task4/
│       │   │   ├── task4_view.dart         
│       │   │   └── task4_view_model.dart    
│       ├── news/
│       │   ├── news_view.dart            
│       │   ├── news_view_model.dart      
│       │   ├── drop_cap_text.dart      
│       │   ├── news_detail_view.dart     
│       │   └── news_learning_view.dart  

🚀 Build and Run Instructions

Prerequisites

Installation and Execution

  1. Clone the repository:
git clone <repository-url>
cd try_app
  1. Install dependencies:
flutter pub get
  1. Set up the .env file:

Create a .env file in the project root with the following content:

BASE_URL=your_server_cloud_url
DEEPGRAM_API_KEY=your_deepgram_api_key

You can get your API key from Deepgram.

  1. Run the app:
flutter run

🧪 Running Tests

To execute the test suite, use the following command:

flutter test

📊 Asset Information

🛠️ Referenced Open Source Projects

Key Dependencies

  • provider: State management library to manage application state.
  • http: HTTP client for making API requests.
  • flutter_dotenv: Manage environment variables in a .env file.
  • dynamic_color: Provides dynamic theming capabilities.
  • intl: Supports internationalization and localization, particularly for date and number formatting.
  • fluid_bottom_nav_bar: Customizable bottom navigation bar.
  • diff_match_patch: Library for text diffing, useful for comparing text differences.
  • permission_handler: Handles permissions, such as microphone access.
  • sound_stream: Used for audio streaming, particularly for capturing microphone input for Deepgram STT.
  • web_socket_channel: Provides WebSocket support, used for real-time communication with Deepgram API.
  • rxdart: A reactive programming library for managing asynchronous data streams.
  • audioplayers: Used for audio playback within the app.

Development Dependencies

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.