A production-ready React.js template designed for small business websites. Built with modern tools and optimized for SEO, mobile responsiveness, and easy customization.
- React 18 - Modern React with hooks
 - TypeScript - Type-safe development
 - Vite - Lightning-fast build tool
 - TailwindCSS 3 - Utility-first CSS framework
 - React Router - Client-side routing
 
- SEO Optimized - Pre-rendering with react-snap for search engines
 - Mobile Responsive - Custom 
useMobilehook for adaptive layouts - Centralized Configuration - Single config file for all business information
 - Professional Pages - Home, About, Contact, Privacy Policy, Terms of Service
 - Social Media Integration - Open Graph and Twitter Card support
 - Contact Forms - Ready-to-use contact forms with validation
 
- Vitest - Fast unit testing
 - Testing Library - React component testing
 - ESLint - Code quality enforcement
 - Prettier - Consistent code formatting
 
- Node.js 18.x or higher
 - npm, yarn, or pnpm
 
- 
Clone the repository
git clone https://github.com/natiassefa/react.js-template-basic.git my-business-site cd my-business-site - 
Install dependencies
npm install
 - 
Customize business information Edit
src/config/contact.tsxwith your business details:export const contactInfo: ContactInfo = { business: { name: 'Your Business Name', tagline: 'Your tagline here', description: 'Your business description', logo: '/logo.svg' }, contact: { email: 'hello@yourbusiness.com', phone: '+1 (555) 123-4567', // ... more fields } // ... social media, address, hours }
 - 
Start development server
npm run dev
Visit http://localhost:5173
 
npm run dev          # Start development server with hot reloadnpm run build        # Standard production build
npm run build:ssg    # SEO-optimized build with pre-rendering (recommended)npm run test         # Run unit tests
npm run test:ui      # Run tests with UI interface
npm run lint         # Check code quality with ESLint
npm run typecheck    # Check TypeScript typesnpm run serve        # Preview production build locallysrc/
├── components/
│   ├── App/           # Main app component
│   ├── Header/        # Responsive navigation header
│   ├── Footer/        # Footer with links and social media
│   └── SEO/           # SEO metadata component
├── pages/
│   ├── Home.tsx       # Landing page
│   ├── About.tsx      # About page
│   ├── Contact.tsx    # Contact page with form
│   ├── Privacy.tsx    # Privacy policy
│   └── Terms.tsx      # Terms of service
├── config/
│   └── contact.tsx    # Centralized business configuration
├── hooks/
│   └── useMobile.ts   # Responsive design hook
├── Routes.tsx         # React Router configuration
└── index.tsx          # App entry point
Edit src/config/contact.tsx to update:
- Business name, tagline, and description
 - Contact email, phone, and support email
 - Physical address and business hours
 - Social media links (Twitter, Facebook, LinkedIn, etc.)
 
Replace public/logo.svg with your business logo.
Add public/og-image.jpg (1200x630px) for social media previews.
The template uses TailwindCSS. Edit tailwind.config.js to customize:
- Brand colors
 - Fonts
 - Spacing
 - Breakpoints
 
- Create page component in 
src/pages/ - Add route in 
src/Routes.tsx - Update navigation in 
src/config/contact.tsx - Add route to pre-rendering in 
package.jsonunderreactSnap.include 
This template includes comprehensive SEO features:
Pages are pre-rendered to static HTML using react-snap, ensuring search engines can crawl all content.
Every page includes:
- Title tags with business name
 - Meta descriptions
 - Open Graph tags (Facebook)
 - Twitter Card tags
 - Canonical URLs
 - Structured business data
 
See SEO_IMPLEMENTATION.md for detailed SEO documentation.
The template includes a custom useMobile hook for adaptive layouts:
import { useMobile } from 'hooks'
export default function MyComponent() {
  const { isMobile, isTablet, isDesktop } = useMobile()
  return (
    <div className={isMobile ? 'mobile-layout' : 'desktop-layout'}>
      {/* Your content */}
    </div>
  )
}isMobile: < 768pxisTablet: 768px - 1024pxisDesktop: > 1024px
- 
Vercel (Recommended)
- Zero configuration
 - Automatic deployments from Git
 - Free SSL and CDN
 - Build command: 
npm run build:ssg - Output directory: 
dist 
 - 
- Drag-and-drop deployment
 - Automatic deployments from Git
 - Form handling built-in
 - Build command: 
npm run build:ssg - Output directory: 
dist 
 - 
- Fast global CDN
 - Free unlimited bandwidth
 - Build command: 
npm run build:ssg - Output directory: 
dist 
 
- Build command: 
npm run build:ssg - Output directory: 
dist - Node version: 18.x or higher
 
npm run testnpm run test:uiVisit http://localhost:51204/vitest/ to interact with tests.
- Chrome (latest)
 - Firefox (latest)
 - Safari (latest)
 - Edge (latest)
 
Contributions are welcome! Please feel free to submit a Pull Request.
For issues and questions:
- Create an issue on GitHub
 - Email: natnael.w.assefa@gmail.com
 
- SEO Implementation Guide - Comprehensive SEO documentation
 
This project is licensed under the MIT License - see the LICENSE file for details.
Nati Assefa
- GitHub: @natiassefa
 - Email: natnael.w.assefa@gmail.com
 
Built on top of reactjs-vite-tailwindcss-boilerplate by João Paulo Moraes.