Skip to content

ishansasika/react-vite-tailwind-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

React Vite Tailwind Template

A modern, production-ready React template built with Vite, TypeScript, and Tailwind CSS. Features a beautiful, responsive UI with multiple pages and components ready to use.

πŸ”— Live Demo

✨ Features

  • ⚑ Vite - Lightning-fast development with Hot Module Replacement
  • βš›οΈ React 19 - Latest React with TypeScript support
  • 🎨 Tailwind CSS - Utility-first CSS framework for rapid UI development
  • πŸ“˜ TypeScript - Type safety and enhanced developer experience
  • πŸ›£οΈ React Router - Client-side routing with multiple pages
  • πŸŒ“ Dark Mode Support - Built-in dark mode styling
  • πŸ“± Responsive Design - Mobile-first responsive components
  • βœ… ESLint - Code quality and consistency checks

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Start the development server:
npm run dev

The application will be available at http://localhost:5173

πŸ“œ Available Scripts

Development

npm run dev          # Start Vite development server
npm run type-check   # Run TypeScript compiler without emitting files
npm run lint         # Run ESLint on TypeScript files

Production

npm run build        # Type check and create production build
npm run preview      # Preview production build locally

πŸ“ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ header/        # Navigation header with mobile menu
β”‚   β”‚   └── footer/        # Footer with links and social icons
β”‚   └── pages/
β”‚       β”œβ”€β”€ home/          # Landing page with hero and features
β”‚       β”œβ”€β”€ about/         # About page with team section
β”‚       β”œβ”€β”€ services/      # Services showcase page
β”‚       └── contact/       # Contact page with form
β”œβ”€β”€ App.tsx                # Main app component with routing
β”œβ”€β”€ App.css                # Global styles
β”œβ”€β”€ index.css              # Tailwind directives
└── main.tsx               # Application entry point

🎨 Pages Included

Home Page

  • Hero section with gradient text
  • Feature cards with icons
  • Statistics section
  • Call-to-action sections

About Page

  • Company mission and values
  • Technology stack showcase
  • Team member profiles with images

Services Page

  • Service cards with detailed features
  • Multiple service categories
  • Interactive hover effects

Contact Page

  • Contact form with validation
  • Contact information cards
  • Social media links
  • Responsive two-column layout

🎨 Customization

Colors

The template uses a blue-purple gradient theme. To customize colors, update the Tailwind classes in components or modify tailwind.config.js.

Components

All components follow a barrel export pattern with TypeScript:

  • Component file: ComponentName.tsx
  • Index file: index.ts

Adding New Pages

  1. Create a new folder in src/app/pages/your-page/
  2. Create YourPage.tsx and index.ts
  3. Import and add the route in src/App.tsx

πŸ› οΈ Tech Stack

  • React 19 - UI library
  • TypeScript 5.7 - Type-safe JavaScript
  • Vite 6 - Build tool and dev server
  • Tailwind CSS 3.4 - Utility-first CSS framework
  • React Router 7 - Client-side routing
  • ESLint 9 - Code linting

πŸš€ Deployment

Firebase Hosting (Automatic with GitHub Actions)

This template is configured for automatic deployment to Firebase Hosting via GitHub Actions.

Initial Setup

  1. Create a Firebase project at Firebase Console

  2. Install Firebase CLI:

    npm install -g firebase-tools
  3. Login to Firebase:

    firebase login
  4. Generate a service account key:

    • Go to Firebase Console β†’ Project Settings β†’ Service Accounts
    • Click "Generate New Private Key"
    • Save the JSON file securely
  5. Add Firebase secret to GitHub:

    • Go to your GitHub repo β†’ Settings β†’ Secrets and variables β†’ Actions
    • Click "New repository secret"
    • Name: FIREBASE_SERVICE_ACCOUNT
    • Value: Paste the entire contents of the service account JSON file
    • Click "Add secret"
  6. Push to GitHub:

    git add .
    git commit -m "Setup Firebase deployment"
    git push origin main

Your app will automatically build and deploy to Firebase whenever you push to the main branch!

Manual Deployment

You can also deploy manually:

# Build your app
npm run build

# Deploy to Firebase
firebase deploy

Firebase Configuration:

πŸ“š Documentation

πŸ“ License

This project is open source and available under the MIT License.

About

React Vite Template - A modern, production-ready React template built with Vite, TypeScript, and Tailwind CSS. Features a beautiful, responsive UI with multiple pages and components ready to use.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors