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.
- 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
| 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 |
| Logo Screen | Splash Screen |
|---|---|
![]() |
![]() |
| Home Screen | Chatbot Screen |
|---|---|
![]() |
![]() |
| Developer Screen |
|---|
![]() |
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:
- Only answer questions using Safia Bibi's provided background information (skills, experience, projects, education, contact details).
- Politely decline anything unrelated (general knowledge, coding help, unrelated advice) and redirect the user back to Safia-related topics.
- 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.
- 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
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
- Clone the repository:
git clone https://github.com/safiadeveloper/<repo-name>.git cd <repo-name>
- Install dependencies:
flutter pub get
- 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';
- Run the app:
flutter run
Never commit a real API key to a public repository. Before pushing to GitHub:
- Replace the real key in
gemini_service.dartwith the placeholderYOUR_GROQ_API_KEY_HERE, or - Move it out of source control entirely (e.g. pass it in with
--dart-define=GROQ_API_KEY=xxxand read it viaString.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.
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.
Safia Bibi Senior Software & Mobile Application Developer
- 📧 Email: safia34740@gmail.com
- 📱 Phone: +92 317 6526332
- 🌐 Portfolio: safiabibiportfolio.site
- 💼 LinkedIn: linkedin.com/in/safia-developer
- 🐙 GitHub: github.com/safiadeveloper
- Website: https://bizwebsolutions.us/
This project is licensed under the MIT License — see the LICENSE file for details.




