A modern, responsive portfolio website built with cutting-edge web technologies. This project showcases professional work, projects, and skills with an elegant, high-performance design, with your own free personal AI assistant.
-
🔐 Pollen API Integration: Added support for Pollen API with secure credential management
- GitHub Actions secret:
VITE_POLLEN_API_KEY_SECONDARY - Environment-based configuration for secure deployments
- See Pollen API Configuration section for setup
- GitHub Actions secret:
-
📊 Enhanced Analytics Setup: Refactored Google Analytics configuration
- See Configuration for Forkers section
-
🛠️ Improved Development Workflow: Better environment management
- Updated
.env.examplewith all required API keys - Clear documentation for local and production setups
- GitHub environment variables for CI/CD pipelines
- Updated
This portfolio website is a demonstration of full-stack web development capabilities, featuring:
-
Personal AI Assistant : Your own personal AI assistant, that answers question on your behalf
-
📊 Google Analytics Integration: Real-time visitor insights with detailed analytics dashboard showing page visits, user engagement, and geographic distribution by country
-
Modern UI/UX: Clean, minimalist design with smooth animations and transitions
-
Responsive Design: Fully responsive across all devices and screen sizes
-
Performance Optimized: Fast load times and optimized bundle sizes
-
Type-Safe: Built with TypeScript for robust, maintainable code
-
Styling: Tailwind CSS for utility-first, scalable styling with Shadcn UI components
- Frontend Framework: React with Vite for blazing-fast development
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Shadcn UI
- Build Tool: Vite
- Package Manager: Bun
This portfolio includes integrated Google Analytics that provides real-time visitor tracking and comprehensive insights:
- Active Users: Track concurrent visitors on the portfolio
- User Growth: Monitor growth trends over 90-day periods
- Geographic Distribution: See visitor distribution across 60+ countries
- Just 3 lines of code to add Google Analytics — completely free and takes under 5 minutes.
- Simply create a GA property, copy your Measurement ID, and paste the snippet into your site’s section.
Example (Google Analytics 4):
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script>
Important: If you fork this repository, you need to replace the Google Analytics measurement ID with your own:
-
Get Your Measurement ID:
- Go to Google Analytics
- Create a new GA4 property or use an existing one
- Copy your Measurement ID (format:
G-XXXXXXXXXX)
-
Add to Environment Variables:
- Copy
.env.exampleto.env.local:cp .env.example .env.local
- Edit
.env.localand replace the placeholder:VITE_GTAG_ID=G-YOUR_MEASUREMENT_ID_HERE
- Copy
-
Deploy:
- The analytics script will be automatically injected during build
- No hardcoded IDs in the repository
- Each fork can use its own analytics setup
Note: The
.env.localfile is in.gitignore- never commit your analytics ID to version control!
founders).
The analytics dashboard helps understand how visitors interact with the portfolio and which content resonates most with the audience worldwide.
- Node.js (v16 or higher) - Install with nvm
- npm or Bun
-
Clone the repository
git clone <YOUR_GIT_URL> cd rafi
-
Navigate to project directory
cd rafi -
Install dependencies
npm install # or bun install -
Start the development server
npm run dev # or bun run devThe development server will start with hot module reloading (HMR) for instant feedback on changes.
npm run dev- Start development server with HMRnpm run build- Build for productionnpm run preview- Preview production build locallynpm run lint- Run ESLint
rafi/
├── src/ # Source files
│ ├── components/ # React components
│ ├── pages/ # Page components
│ └── App.tsx # Main application component
├── public/ # Static assets
├── index.html # HTML entry point
├── tailwind.config.ts # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite configuration
There are several ways to modify and extend this project:
Clone the repository and use your preferred code editor:
git clone <YOUR_GIT_URL>
cd rafi
npm install
npm run devMake changes in your IDE and they will automatically reload in the browser thanks to Vite's HMR.
- Navigate to any file in the repository
- Click the pencil (edit) icon
- Make your changes
- Commit directly to the main branch
Develop directly in the browser:
- Go to the main repository page
- Click "Code" (green button)
- Select "Codespaces" tab
- Click "New codespace"
- Edit files and commit changes
The project is deployed to GitHub Pages automatically on every commit to the main branch.
npm run buildThis creates an optimized production build in the dist directory.
To connect a custom domain:
- Update your domain's DNS records to point to GitHub Pages
- Add the domain in repository settings
- Enable HTTPS in repository settings
See GitHub Pages Documentation for detailed instructions.
Optimizations included:
- Tree-shaking for minimal bundle size
- Code splitting with Vite
- Lazy loading of components
- Optimized images and assets
- CSS purging with Tailwind
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Antigravity: Advanced deployment and infrastructure automation
- Claude: AI-powered development assistance and code generation
- Lovable: UI/UX design and rapid prototyping
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - feel free to use this project as a template or reference.
Visit the live portfolio: https://rafipatel.github.io/rafi/
For issues, questions, or suggestions, please open an issue on GitHub.
RAFA is an AI-powered assistant system that uses Pollinations.ai as its primary provider (Amazon Nova Micro model) and Groq's lightning-fast LLM inference as a fallback to answer questions about the portfolio owner's profile and expertise.
RAFA operates with a dual-provider robustness:
- Primary Provider: Pollinations.ai using the
nova-fast(Amazon Nova Micro) model. - Fallback Provider: Groq API using the
llama-3.3-70b-versatilemodel. - Frontend: This portfolio website (React + Vite) is deployed on GitHub Pages as a static site.
- Dynamic Feedback: The UI dynamically displays which model and provider is currently powering the conversation.
Groq provides:
- Ultra-fast LLM inference (token generation in milliseconds)
- Free tier for development and testing
- Seamless integration with popular LLM models
- Perfect for building responsive AI applications
- Profile Context: RAFA is trained/fine-tuned with information about your skills, experience, and projects
- Query Processing: When asked questions about your profile, RAFA uses Groq to generate contextual responses
- Real-time Responses: Groq's speed enables instant, conversational replies
When this portfolio evolves to include interactive features:
User Query on Portfolio
|
v
RAFA AI System (Groq Backend)
|
v
Instant Response
- LLM Provider: Groq (free tier)
- Inference Speed: ~10x faster than traditional cloud LLMs
- Use Case: Profile Q&A, skill-based recommendations, experience highlights
- Deployment: Serverless or containerized backend (separate from GitHub Pages)
This portfolio is currently a frontend-only static site on GitHub Pages. RAFA integration would require:
- Backend API service (Node.js, Python, etc.)
- Groq API key for authentication
- API endpoint for portfolio to call RAFA
- Database for storing refined profile context
The RAFA backend is deployed on Render (free tier) as a FastAPI application.
Repository: rafipatel/groq-proxy
Hosted On: Render (Free Plan)
**Backend Service URL++: Set via environment variable VITE_RAFA_API_URL
| Endpoint | Method | Purpose |
|---|---|---|
/chat |
POST | Send messages to RAFA, get AI responses |
/get-key |
GET | Retrieve Groq API key (for authenticated clients) |
/docs |
GET | Interactive API documentation (Swagger UI) |
/redoc |
GET | ReDoc API documentation |
Environment Variables (stored securely on Render):
GROQ_API_KEY=<your-groq-api-key>For local development, copy .env.example to .env.local and fill in your values:
cp .env.example .env.local
# Edit .env.local and add your API keys
VITE_POLLEN_API_KEY_SECONDARY=your_pollinations_api_key
VITE_GROQ_API_KEY=your_groq_api_keyNote: The Pollinations API key is used as the primary driver for text completions, with Groq acting as a high-performance fallback if the primary service is unavailable or rate-limited.
Note: .env.local is in .gitignore and should never be committed to version control.
Groq API Key:
- Obtained from Groq Console
- Uses
llama-3.3-70b-versatilemodel (free tier available) - Requires signing up at console.groq.com
Portfolio (Frontend - GitHub Pages)
|
|---[ Try Primary: Pollinations AI (nova-fast) ]
| |
| |--- Success: Display Response (Pollinations AI)
| |
| |--- Failure: Log Error & Trigger Fallback
| |
| v
|---[ Fallback: Groq LLM API (llama-3.3-70b-versatile) ]
|
|--- Success: Display Response (Groq)
|--- Failure: Display User-facing Error
-
Clone groq-proxy repo:
git clone https://github.com/rafipatel/groq-proxy.git
-
Set up Render account:
- Go to render.com
- Connect your GitHub account
- Create a new Web Service from your groq-proxy fork
-
Configure environment variables on Render:
- Set
GROQ_API_KEYto your key from Groq console
- Set
-
Deploy:
- Render automatically deploys from git push
- Free tier includes auto-deploys from main branch
-
Get your API URL:
- Store your backend API endpoint URL in a
.env.localfile (see.env.example)
- Store your backend API endpoint URL in a
- Use the environment variable
VITE_RAFA_API_URLin your frontend code - Call
/chatand/get-keyendpoints from the portfolio- Use this to call
/chatand/get-keyendpoints from the portfolio
- Use this to call
curl -X POST $VITE_RAFA_API_URL/chat \260
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "Tell me about Rafi's skills"}
]
}'-
API Key Protection: Never expose
GROQ_API_KEYin frontend code -
CORS Configuration: Backend CORS allows
*origins (configure in production) -
Rate Limiting: Implement rate limiting for production use
-
Authentication: Consider adding API key validation for frontend requests
This portfolio includes support for Pollen API integration for advanced features.
-
Get Your Pollen API Key:
- Sign up at Pollen API
- Generate an API key from your dashboard
- Your key will be in the format
sk_...
-
Store as Environment Variables:
- Go to repository Settings > Environments
- Click on the github-pages environment (or create it)
- Under Environment variables, add both:
VITE_POLLEN_API_KEY_SECONDARYVITE_GTAG_ID(for Analytics)
-
Local Development:
- Copy
.env.exampleto.env.local - Add your Pollen API key:
VITE_POLLEN_API_KEY_SECONDARY=sk_your_key_here
- Copy
- Never commit secrets: The
.env.localfile is in.gitignoreand should never be committed - Use GitHub Secrets for CI/CD: Store sensitive keys as GitHub Actions secrets, not in code
- Rotate keys regularly: Periodically update your Pollen API keys for security
- Scope permissions: Use API keys with minimal required permissions
Built with ❤️ by Raafi Riyaz