PI Chatbot Mobile is a cross-platform mobile application built with Flutter that enables users to interact with an intelligent chatbot for restaurant ordering. Users can browse menus, place orders, and manage their interactions through a conversational interface. The application provides a seamless experience across iOS, Android, and web platforms, integrated with Supabase for real-time data synchronization and user authentication.
This repository contains the frontend component of the PI Chatbot project, developed as part of the Interdisciplinary Integrating Project (PII) by Computer Science students at Instituto Mauá de Tecnologia (IMT). The frontend communicates with a backend chatbot API service and Supabase database to deliver a complete ordering and chat experience. This is one part of a larger system that includes backend services, AI/chatbot engines, and database infrastructure.
- Flutter 3.0+ - Cross-platform mobile framework
- Dart - Programming language
- FlutterFlow - Low-code platform for Flutter development
- Supabase - Backend-as-a-Service for authentication and database
- PostgreSQL - Database (via Supabase)
- HTTP - REST API communication
- Provider - State management solution
- GoRouter - Navigation and deep linking
- Google Fonts - Typography library
- Font Awesome Flutter - Icon library
- Flutter Animate - Animation framework
- Auto Size Text - Responsive text scaling
- Shared Preferences - Local key-value storage
- Hive - Lightweight local database
- SQLite - Local relational database
- Cached Network Image - Image caching
- Custom Bot API - External chatbot service endpoint
- Sign in with Apple - Authentication provider
- App Links - Deep linking support
- Intl - Internationalization support
- TimeAgo - Relative time formatting
- Page Transition - Page navigation animations
- WebView Flutter - Web content display
- URL Launcher - External URL handling
lib/
├── backend/ # Backend integration layer
│ ├── api_requests/ # HTTP API communication
│ │ ├── api_manager.dart # API request management
│ │ ├── api_calls.dart # Specific API endpoint definitions
│ │ └── get_streamed_response.dart # Streaming response handling
│ └── supabase/ # Supabase integration
│ ├── supabase.dart # Supabase client initialization
│ └── database/ # Database layer
│ ├── database.dart # Database exports
│ ├── table.dart # Base table class
│ ├── row.dart # Base row class
│ └── tables/ # Data models
│ ├── mensagens.dart # Chat messages table
│ ├── pedidos.dart # Orders table
│ ├── cardapio_pratos.dart # Menu dishes table
│ └── cardapio_bebidas.dart # Menu drinks table
├── flutter_flow/ # FlutterFlow utilities and components
│ ├── flutter_flow_theme.dart # Theme management (light/dark mode)
│ ├── flutter_flow_widgets.dart # Reusable UI components
│ ├── flutter_flow_util.dart # Utility functions
│ ├── flutter_flow_model.dart # Base model class
│ ├── custom_functions.dart # Custom business logic
│ ├── form_field_controller.dart # Form handling
│ ├── lat_lng.dart # Location data structures
│ ├── place.dart # Place information
│ ├── uploaded_file.dart # File upload handling
│ └── nav/ # Navigation helpers
├── pages/ # Page components
│ ├── chat_page/ # Chat interface
│ │ ├── chat_page_widget.dart
│ │ └── chat_page_model.dart
│ └── home_page/ # Home page
│ ├── home_page_widget.dart
│ └── home_page_model.dart
├── main.dart # Application entry point
└── index.dart # Export barrel file
assets/ # Static resources
├── images/ # Images and icons
├── fonts/ # Custom fonts
├── videos/ # Video assets
├── audios/ # Audio files
├── pdfs/ # PDF documents
├── rive_animations/ # Rive animation files
└── jsons/ # JSON data files
The application manages the following key entities through Supabase:
- Mensagens (Messages) - Stores chat conversation history with fields for message text, sender email, timestamp, and bot indicator
- Pedidos (Orders) - Maintains order records including dish selection, drink selection, total price, and status
- Cardápio Pratos (Menu - Dishes) - Restaurant menu items for main courses
- Cardápio Bebidas (Menu - Drinks) - Available beverages
The application communicates with an external chatbot API service (https://chatbot-161v.onrender.com/mensagem) to process user messages and generate bot responses. Responses are parsed for XML-formatted content extraction.
User authentication is managed through Supabase Auth with email-based validation specific to the Poliedro education domain (@p4ed.com). The app supports Sign in with Apple as an additional authentication method.
- Interactive Chat Interface - Real-time messaging with bot responses
- Menu Browsing - View available dishes and drinks with details
- Order Management - Place orders through the chat interface with tracking
- Message History - Persistent storage of conversation history
- Cross-Platform Support - Optimized experience on iOS, Android, and web
- Dark Mode Support - Theme switching between light and dark modes
- Local Caching - Improved performance through image and data caching
- Deep Linking - Direct navigation to specific pages via links
- Offline Storage - Local data persistence with SQLite and Hive
lib/backend/- Backend service integrations (Supabase, APIs)lib/flutter_flow/- FlutterFlow framework components and utilitieslib/pages/- UI screens and their associated modelsandroid/- Android-specific native code and configurationios/- iOS-specific native code and configurationweb/- Web platform configuration and bootstrapassets/- Static resources including images, fonts, and animations
pubspec.yaml- Flutter project dependencies and configurationanalysis_options.yaml- Dart analyzer configurationandroid/build.gradle- Android build configurationios/Podfile- iOS dependency management
- Flutter SDK (version 3.0 or higher)
- Dart SDK (included with Flutter)
- Git
- iOS: Xcode (for iOS development)
- Android: Android Studio or Android SDK command-line tools
-
Clone the repository
git clone <repository-url> cd frontend-chatbot
-
Install Flutter dependencies
flutter pub get
-
Generate code from build runner (if needed)
flutter pub run build_runner build
-
Run the application
# For Android flutter run -d android # For iOS flutter run -d ios # For web flutter run -d web # For all connected devices flutter run
iOS:
cd ios
pod install
cd ..
flutter run -d iosAndroid: No additional setup required beyond Flutter configuration.
Web:
flutter run -d web --release# Development mode with hot reload
flutter run
# Profile mode (performance analysis)
flutter run --profile
# Release mode (optimized production build)
flutter run --releaseAndroid:
flutter build apk --release
# or for App Bundle
flutter build appbundle --releaseiOS:
flutter build ios --releaseWeb:
flutter build web --release# Run Dart analyzer
dart analyze
# Format code
dart format lib/Based on repository analysis, this project demonstrates:
- Frontend Architecture Design - Modular structure separating concerns (backend, UI, models)
- API Integration - RESTful communication with external chatbot service
- Database Integration - Supabase schema design and ORM-like abstractions
- State Management - Provider-based architecture for reactive UI updates
- Cross-Platform Development - Supporting iOS, Android, and web from single codebase
- Custom Functions - Specialized business logic (email validation, XML parsing, formatting)
- UI/UX Implementation - FlutterFlow-based component development with theme support
- Authentication Flow - Secure user authentication and authorization
- Performance Optimization - Image caching and lazy loading strategies
- Enhanced AI Capabilities - Implement advanced NLP for more context-aware responses
- Payment Integration - Add in-app payment processing
- Push Notifications - Real-time order status updates
- Multi-Language Support - Expand beyond Portuguese interface
- Advanced Analytics - User behavior tracking and insights
- Image Recognition - Photo-based menu item identification
- Voice Commands - Hands-free interaction through speech recognition
- Order History Analytics - User preferences and recommendation engine
- Real-Time Collaboration - Group ordering features
- Performance Optimization - Reduce bundle size and improve startup time
PI Chatbot Mobile was developed by a team of Computer Science students from Instituto Mauá de Tecnologia (IMT) as part of the Interdisciplinary Integrating Project (PII) for the 3rd semester. The project represents collaborative effort combining mobile development, backend integration, and user experience design principles.

