Skip to content

DevNinjawork998/personal-website-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Personal Portfolio Website

A modern, responsive personal portfolio website built with React and TypeScript, featuring contact form integration, Firebase backend, and Google Analytics tracking.

๐Ÿš€ Tech Stack

Core

  • React (v18.2) with TypeScript - UI framework
  • Create React App - Build tooling
  • Chakra UI - Component library & styling

Services & Integration

  • Firebase - Backend services
    • Firestore - Database for projects
    • Hosting - Deployment platform
    • Analytics - User tracking
  • EmailJS - Contact form email delivery
  • Framer Motion - Animations
  • Formik + Yup - Form handling & validation

Testing & CI/CD

  • Jest & React Testing Library - Unit & integration tests
  • GitHub Actions - Automated deployment
  • MSW - API mocking for tests

๐ŸŽฏ Features

  • โœจ Modern, responsive design with glassmorphism effects
  • ๐Ÿ“ง Contact form with EmailJS integration & fallback mechanisms
  • ๐Ÿ—‚๏ธ Dynamic projects section powered by Firestore
  • ๐Ÿ“Š Google Analytics integration
  • ๐Ÿ”’ Environment-based configuration
  • โœ… Comprehensive test coverage
  • ๐Ÿš€ Automated CI/CD pipeline

๐Ÿ› ๏ธ Quick Start

Prerequisites

  • Node.js (v20+)
  • npm or yarn
  • Firebase account
  • EmailJS account (for contact form)

Installation

# Clone the repository
git clone <your-repo-url>

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your credentials

# Start development server
npm start

Visit http://localhost:3000 to view the app.

๐Ÿ“œ Available Scripts

Command Description
npm start Start development server at localhost:3000
npm test Run tests in watch mode
npm run test:ci Run tests with coverage for CI
npm run build Build production bundle
npm run format Format code with Prettier

๐Ÿ”ง Configuration

Environment Variables

This project requires environment variables for external services. See detailed setup in:

Required variables:

  • EmailJS configuration (3 variables)
  • Firebase configuration (7 variables)

Firebase Setup

  1. Create a Firebase project at Firebase Console
  2. Enable Firestore Database
  3. Create a projects collection
  4. Add Firebase config to your .env file

EmailJS Setup

  1. Create account at EmailJS.com
  2. Set up email service (Gmail, Outlook, etc.)
  3. Create email template
  4. Add credentials to .env file

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ components/          # React components
โ”‚   โ”œโ”€โ”€ Header.tsx
โ”‚   โ”œโ”€โ”€ LandingSection.tsx
โ”‚   โ”œโ”€โ”€ ProjectsSection.tsx
โ”‚   โ”œโ”€โ”€ ContactMeSection.tsx
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ services/           # External integrations
โ”‚   โ”œโ”€โ”€ emailService.ts    # EmailJS integration
โ”‚   โ””โ”€โ”€ projectsService.ts # Firebase Firestore
โ”œโ”€โ”€ context/            # React context providers
โ”‚   โ””โ”€โ”€ alertContext.tsx
โ”œโ”€โ”€ hooks/              # Custom React hooks
โ”œโ”€โ”€ config/             # Configuration files
โ”‚   โ””โ”€โ”€ firebase.ts        # Firebase setup
โ””โ”€โ”€ __tests__/          # Test files

๐Ÿงช Testing

# Run tests in watch mode
npm test

# Run tests with coverage
npm run test:coverage

# Run tests for CI (non-interactive)
npm run test:ci

๐Ÿš€ Deployment

Manual Deployment

# Build the project
npm run build

# Deploy to Firebase
firebase deploy

Automated Deployment (GitHub Actions)

The project includes GitHub Actions workflows for automated deployment:

  • Push to master/main โ†’ Automatically builds and deploys
  • Pull requests โ†’ Preview deployment

Setup required:

  1. Add GitHub secrets (see SETUP_CHECKLIST.md)
    • 10 environment variable secrets (EmailJS + Firebase config)
    • 1 Firebase service account secret: FIREBASE_SERVICE_ACCOUNT_[YOUR_PROJECT_ID]
  2. Push to trigger deployment

See .github/workflows/deploy.yml for workflow details.

๐Ÿ“ง Contact Form Features

The contact form includes:

  • โœ… Real-time validation
  • ๐Ÿ“ง EmailJS integration for sending emails
  • ๐Ÿ”„ Smart fallback mechanisms:
    1. Opens email client if EmailJS fails
    2. Copies to clipboard as final fallback
  • ๐Ÿ“ฑ Responsive design
  • โณ Loading states and notifications

๐Ÿ—‚๏ธ Projects Section

Projects are stored in Firebase Firestore and can be:

  • โœ๏ธ Edited without code changes
  • ๐Ÿ“Š Ordered by priority
  • ๐Ÿ–ผ๏ธ Include images and links
  • ๐Ÿท๏ธ Tagged with technologies

Firestore collection: projects

Document structure:

{
  title: string;
  description: string;
  imageSrc: string;
  url: string;
  tech: string[];
  order: number;
}

๐Ÿ” Security Notes

  • Firebase API keys are public by design (security via Firestore rules)
  • EmailJS public keys are safe for client-side use
  • Never commit .env files
  • GitHub secrets are encrypted and injected at build time
  • Service account keys should never be in frontend code

๐Ÿ“š Additional Resources

๐Ÿ“– Learn More

๐ŸŽจ UI Features

  • Glassmorphism design effects
  • Smooth scroll animations
  • Responsive navigation
  • Dark theme optimized
  • Accessible components (Chakra UI)

๐Ÿ”ฎ Future Enhancements

  • Blog section with CMS
  • Project filtering by technology
  • Dark/light mode toggle
  • Multi-language support
  • Enhanced analytics dashboard
  • PDF resume download

๐Ÿ“„ License

This project is for personal use and portfolio demonstration.


Built with โค๏ธ using React, TypeScript, and Firebase

About

This is repo that host my experience and my portfolio as a Software Engineer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •