A modern, blazing-fast, and feature-rich developer portfolio with Firebase integration, stunning animations, and a powerful blog CMS.
Features β’ Tech Stack β’ Quick Start β’ Deployment β’ License
Project Link: www.mohdrazakhan.me
|
|
|
|
|
|
{
"react": "^19.0.0",
"vite": "^7.1.4",
"tailwindcss": "^3.4.17",
"framer-motion": "^12.23.12",
"firebase": "^12.4.0",
"react-router-dom": "^7.3.0",
"lucide-react": "^0.542.0"
}Core Technologies:
- βοΈ React 19 - Modern UI library with hooks
- β‘ Vite 7 - Next-generation frontend tooling
- π¨ Tailwind CSS 3 - Utility-first CSS framework
- π Framer Motion 12 - Production-ready animation library
- π₯ Firebase 12 - Backend as a service
- π§ React Router 7 - Client-side routing
- π― Lucide Icons - Beautiful consistent icons
Before you begin, ensure you have the following installed:
- Node.js
18.xor higher (Download) - npm
9.xor higher (comes with Node.js) - Git (Download)
- A Firebase project (Create one)
# 1οΈβ£ Clone the repository
git clone https://github.com/mohdrazakhan/portfolio.git
cd portfolio
# 2οΈβ£ Navigate to project directory
cd portfolio
# 3οΈβ£ Install dependencies
npm install
# 4οΈβ£ Set up environment variables
cp .env.example .env
# Edit .env with your Firebase credentials
# 5οΈβ£ Start development server
npm run devπ Your portfolio is now running at http://localhost:5173
Create a .env file in the root directory:
VITE_FIREBASE_API_KEY=your_api_key_here
VITE_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_project.appspot.com
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_idπ‘ Tip: Get these credentials from your Firebase Console β Project Settings β General
portfolio/
βββ π public/ # Static assets
β βββ favicon.ico
β βββ resume.pdf
β βββ _redirects # SPA routing for Netlify
β βββ images/
β βββ preview/
βββ π src/
β βββ π assets/ # Images & icons
β β βββ icons/
β β βββ images/
β βββ π components/ # React components
β β βββ About.jsx
β β βββ Contact.jsx
β β βββ Footer.jsx
β β βββ Home.jsx
β β βββ Navbar.jsx
β β βββ Projects.jsx
β β βββ BlogSection.jsx
β β βββ RecentActivity.jsx
β β βββ UI/
β β βββ Card.jsx
β βββ π context/ # React Context API
β β βββ AuthContext.jsx # Firebase authentication
β βββ π data/ # Static data & config
β β βββ projects.js
β β βββ skills.js
β β βββ socials.js
β β βββ activities.js
β βββ π firebase/ # Firebase configuration
β β βββ app.js
β βββ π hooks/ # Custom React hooks
β β βββ useTheme.js
β βββ π pages/ # Page components
β β βββ Admin.jsx # Admin dashboard
β β βββ Blog.jsx # Blog CMS
β β βββ BlogPost.jsx # Single post view
β β βββ OptiRiderDetail.jsx # Project detail
β β βββ Tools.jsx # Developer tools
β β βββ Resources.jsx
β βββ π styles/ # Global styles
β β βββ components.css
β β βββ globals.css
β βββ App.jsx # Main app component
β βββ main.jsx # Entry point
β βββ index.css # Base styles
βββ .env.example # Environment variables template
βββ .gitignore
βββ index.html # HTML template
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind configuration
βββ postcss.config.js # PostCSS configuration
βββ vite.config.js # Vite configuration
βββ vercel.json # Vercel deployment config
Edit the following files to personalize your portfolio:
| File | Purpose |
|---|---|
src/data/projects.js |
Your project showcase |
src/data/skills.js |
Technical skills & expertise |
src/data/socials.js |
Social media links |
src/data/activities.js |
Recent activities timeline |
- Theme colors:
tailwind.config.js - Global styles:
src/styles/globals.css - Component styles:
src/styles/components.css
- Replace
public/images/profile.pngwith your photo - Update
public/favicon.icowith your icon - Add your
public/resume.pdf
- Go to Firebase Console
- Click "Add project" and follow the wizard
- Enable Google Analytics (optional)
- In Firebase Console β Authentication β Get Started
- Click Email/Password β Enable β Save
- Add your admin user:
- Go to Users tab β Add user
- Enter your email and password
- In Firebase Console β Firestore Database β Create database
- Start in Production mode
- Choose a location closest to your users
- Add security rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /posts/{postId} {
allow read: if true;
allow write: if request.auth != null;
}
}
}- In Firebase Console β Storage β Get Started
- Start in Production mode
- Add security rules:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /projects/{fileName} {
allow read: if true;
allow write: if request.auth != null && request.resource.size < 5 * 1024 * 1024;
}
match /blog/{fileName} {
allow read: if true;
allow write: if request.auth != null && request.resource.size < 5 * 1024 * 1024;
}
}
}- Go to Project Settings (βοΈ icon)
- Scroll down to Your apps β Web app (</> icon)
- Register app and copy the
firebaseConfigobject - Add these values to your
.envfile
- Push your code to GitHub
- Go to Vercel Dashboard
- Click "Add New" β "Project"
- Import your GitHub repository
- Configure:
- Framework Preset: Vite
- Build Command:
npm run build - Output Directory:
dist
- Add environment variables (all
VITE_FIREBASE_*variables) - Click "Deploy"
# Install Vercel CLI
npm i -g vercel
# Login to Vercel
vercel login
# Deploy
vercel
# Follow the prompts and add environment variables- Push your code to GitHub
- Go to Netlify Dashboard
- Click "Add new site" β "Import an existing project"
- Connect to GitHub and select your repository
- Configure:
- Build command:
npm run build - Publish directory:
dist
- Build command:
- Add environment variables
- Click "Deploy site"
# Install Netlify CLI
npm install -g netlify-cli
# Login
netlify login
# Deploy
netlify deploy --prodAdd these in your deployment platform:
VITE_FIREBASE_API_KEY=your_value
VITE_FIREBASE_AUTH_DOMAIN=your_value
VITE_FIREBASE_PROJECT_ID=your_value
VITE_FIREBASE_STORAGE_BUCKET=your_value
VITE_FIREBASE_MESSAGING_SENDER_ID=your_value
VITE_FIREBASE_APP_ID=your_value
β οΈ Important: Set these for Production, Preview, and Development environments
# Build for production
npm run build
# Preview the build
npm run previewThe build output will be in the dist/ directory.
- Navigate to
/admin - Sign in with your Firebase credentials
- Manage content:
- Projects: Add, edit, delete projects with Firebase Storage images
- Blog: Write, edit, publish blog posts
- Activities: Update your recent activities
|
Formatting
|
Media
|
|
Publishing
|
UI/UX
|
Edit tailwind.config.js:
module.exports = {
theme: {
extend: {
colors: {
primary: '#6366f1', // Indigo
secondary: '#8b5cf6', // Purple
accent: '#ec4899', // Pink
}
}
}
}All animations use Framer Motion. Customize in component files:
const variants = {
hidden: { opacity: 0, y: 20 },
visible: { opacity: 1, y: 0 }
}| Metric | Score |
|---|---|
| β‘ Performance | 95+ |
| βΏ Accessibility | 100 |
| π― Best Practices | 100 |
| π± SEO | 100 |
Lighthouse scores on production build
- β Code splitting with Vite
- β Lazy loading images
- β Optimized bundle size (~275 KB gzipped)
- β Tree shaking
- β Modern browser targets
- β CSS purging with Tailwind
- β Preload critical assets
White page after deployment
Solution:
- Check browser console for errors
- Verify all environment variables are set
- Ensure
vercel.jsonhas correct rewrites - Check Firebase project is active
Firebase authentication errors
Solution:
- Verify Firebase credentials in
.env - Check Email/Password auth is enabled
- Ensure admin user is created
- Check Firestore security rules
Image upload not working
Solution:
- Check Firebase Storage is enabled
- Verify Storage security rules
- Ensure you're logged in as admin
- Check file size (max 5MB)
Build fails on Vercel/Netlify
Solution:
- Check build logs for specific errors
- Verify all dependencies in
package.json - Test build locally:
npm run build - Check Node.js version (18+)
| Command | Description |
|---|---|
npm run dev |
Start development server on port 5173 |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run lint |
Run ESLint (if configured) |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
feat: Add new feature
fix: Fix bug
docs: Update documentation
style: Format code
refactor: Refactor code
test: Add tests
chore: Update dependencies
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Mohd Raza Khan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Computer Science Engineering Student
Full Stack Developer | IoT Innovator | Open Source Enthusiast
- React - The library for web and native user interfaces
- Vite - Next generation frontend tooling
- Tailwind CSS - A utility-first CSS framework
- Framer Motion - Production-ready animation library
- Firebase - App development platform
- Lucide Icons - Beautiful & consistent icon toolkit
- Vercel - Platform for frontend developers
Give a βοΈ if this project helped you!
- Push to `main` on GitHub. - In repo Settings β Pages, set Source: βDeploy from a branchβ or use an Actions workflow for Vite. - A typical Actions flow builds and publishes the `dist/` folder to `gh-pages`.- Manual publish to
gh-pagesbranch
- Build locally, then publish the
dist/directory to agh-pagesbranch using your preferred tool.
Alternatively, deploy to Netlify or Vercel β both work great with Vite projects.
For SPA deep-links (e.g., /projects/optirider or /blog/:id) make sure rewrites are enabled:
- Vercel: see
vercel.jsonin the repo. - Netlify: see
public/_redirectswith/* /index.html 200.
The blog editor is visible only when you are logged in (email/password) via Firebase Auth. Posts are stored in Firestore and support draft/publish.
Create a .env file in the project root and add your Firebase credentials:
VITE_FIREBASE_API_KEY=...
VITE_FIREBASE_AUTH_DOMAIN=...
VITE_FIREBASE_PROJECT_ID=...
VITE_FIREBASE_STORAGE_BUCKET=...
VITE_FIREBASE_MESSAGING_SENDER_ID=...
VITE_FIREBASE_APP_ID=...
Restart the dev server after changing .env.
- Enable Authentication β Sign-in method β Email/Password.
- Create your admin user in Firebase Authentication Users.
- Create a Firestore database in production mode.
- Enable Firebase Storage for project image uploads.
Recommended Firestore security rules (adjust as needed):
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /posts/{postId} {
allow read: if resource.data.published == true;
allow read, write: if request.auth != null; // owner-only in UI
}
}
}Recommended Storage security rules:
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /projects/{fileName} {
allow read: if true;
allow write: if request.auth != null && request.resource.size < 5 * 1024 * 1024;
}
match /blog/{fileName} {
allow read: if true;
allow write: if request.auth != null && request.resource.size < 5 * 1024 * 1024;
}
}
}With these rules, public visitors can read only published posts. Authenticated you (admin) can create, update, delete posts and see drafts.
-
Projects Manager: Add, edit, delete projects with:
- Firebase Storage image upload (drag-and-drop or paste URL)
- Live image preview
- Team/contributor support
- Tech stack tags
- Project status (Completed, In Progress, Planning)
- Featured project toggle
- Live demo and repo links
- Automatic statistics dashboard
-
Blog Manager: Full-featured rich text editor with draft/publish states
-
Activities Manager: Recent updates and timeline
If you previously created posts locally (older version), the app will import them into Firestore automatically the first time an authenticated admin opens the Blog page (if Firestore is empty). A local flag prevents duplicate imports.
This project is licensed under the ISC license.
Made with β€οΈ using React, Vite, Tailwind CSS, and Framer Motion. β€οΈ Mohd Raza Khan β€οΈ




