Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ai_Chatbot_App

Safia AI — Personal Assistant Chatbot

A Flutter-based personal assistant chatbot for Safia Bibi's portfolio. Safia AI has a natural, conversational feel (powered by Groq's LLM API) but is scoped strictly to answering questions about Safia's professional background, skills, projects, and contact details.

✨ Features

  • Animated splash screen with branded intro
  • Home hub — choose between chatting with the assistant or viewing the developer profile
  • Conversational AI chat — natural, human-like responses via Groq's API, restricted by system prompt to only discuss Safia Bibi
  • Developer profile screen — contact details, portfolio, GitHub, and LinkedIn as tappable cards
  • Markdown-aware chat bubbles with a typing indicator animation

📱 Screens

Screen Purpose
Splash Screen Branded intro animation on launch
Home Selection Entry point — "Ask AI Assistant" or "Developer Profile"
Chat Screen Conversational interface, scoped to Safia's info
Developer Screen Contact info, portfolio, GitHub, LinkedIn links

📸 Screenshots

Logo Screen Splash Screen
Home Screen Chatbot Screen
Developer Screen

🧠 How it works

The assistant is powered by Groq's chat completions API (an OpenAI-compatible endpoint) using a general-purpose language model. A system prompt instructs the model to:

  1. Only answer questions using Safia Bibi's provided background information (skills, experience, projects, education, contact details).
  2. Politely decline anything unrelated (general knowledge, coding help, unrelated advice) and redirect the user back to Safia-related topics.
  3. Reply concisely, in English, in a natural conversational tone.

This gives the assistant real language understanding — so it handles typos, rephrasing, and casual conversation naturally — while staying on-topic for a portfolio app.

🛠️ Tech Stack

  • Framework: Flutter (Dart)
  • AI backend: Groq API (OpenAI-compatible chat completions)
  • State management: StatefulWidget / setState
  • Fonts: Google Fonts (Poppins, Inter)
  • Markdown rendering: flutter_markdown
  • External links: url_launcher
  • HTTP: http package

📂 Project Structure

lib/
├── main.dart                      # App entry point, theme
├── models/
│   └── message.dart               # Chat message data model
├── services/
│   └── gemini_service.dart        # Groq API integration + system prompt
├── screens/
│   ├── splash_screen.dart         # Animated intro screen
│   ├── home_selection_screen.dart # Hub — Chat vs Developer Profile
│   ├── chat_screen.dart           # Chat UI + logic
│   └── developer_screen.dart      # Developer contact/profile page
└── widgets/
    ├── message_bubble.dart        # Chat bubble (markdown-aware)
    └── typing_indicator.dart      # Animated "typing" dots

🚀 Getting Started

  1. Clone the repository:
    git clone https://github.com/safiadeveloper/<repo-name>.git
    cd <repo-name>
  2. Install dependencies:
    flutter pub get
  3. Add your own free Groq API key in lib/services/gemini_service.dart (get one at https://console.groq.com/keys):
    static const String apiKey = 'YOUR_GROQ_API_KEY_HERE';
  4. Run the app:
    flutter run

🔐 API Key Security

Never commit a real API key to a public repository. Before pushing to GitHub:

  • Replace the real key in gemini_service.dart with the placeholder YOUR_GROQ_API_KEY_HERE, or
  • Move it out of source control entirely (e.g. pass it in with --dart-define=GROQ_API_KEY=xxx and read it via String.fromEnvironment), and add that file/script to .gitignore.

If a real key was ever pushed publicly, regenerate it immediately at console.groq.com/keys — public keys get scraped and abused quickly.

✏️ Customizing Safia's Info

Open lib/services/gemini_service.dart and edit the _systemPrompt string — update the "ABOUT SAFIA BIBI" section with any new details. No other file needs to change.

👩‍💻 Developer

Safia Bibi Senior Software & Mobile Application Developer

📄 License

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

About

Conversational AI portfolio chatbot app developed using Flutter, Groq API, and cross-platform mobile UI. Designed to showcase developer background, projects, and skills through responsive, scoped LLM interactions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages