Skip to content

DimitriTedom/SnowDev-ReactJs-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ React + TypeScript + Vite Frontend Template by SnowDev

React TypeScript Vite TailwindCSS License

A modern, production-ready React frontend template with all the tools you need to build amazing client-side applications.

Hero Section

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ πŸ› οΈ Features β€’ 🐳 Docker


�️ Template Preview

Get a glimpse of what you'll be working with:

Hero Section & Technology Showcase

Hero Section Beautiful welcome page showcasing all included technologies and dependencies

Quick Start Guide & Development Tools

Quick Start & Development Tools Comprehensive development tools section with helper scripts and workflow guidance

Development Workflow Overview

Development Workflow Visual representation of the complete development process from setup to deployment


οΏ½πŸ“‹ Table of Contents

🎯 Overview

This template is a comprehensive starter kit for building modern React frontend applications. Created by @DimitriTedom (SnowDev) for the developer community at Worketyamo-Students, it integrates the best practices and most popular tools in the React ecosystem for client-side development.

Perfect for:

  • 🏒 Enterprise frontend applications
  • πŸ“± SaaS dashboards and interfaces
  • πŸ›οΈ E-commerce frontend experiences
  • πŸ“Š Data visualization and admin panels
  • 🎨 Portfolio and marketing websites
  • 🌐 Progressive Web Apps (PWAs)

✨ Features

πŸ—οΈ Core Features

  • ⚑ Lightning Fast: Powered by Vite for instant hot reload
  • 🎯 Type Safe: Full TypeScript support with strict configuration
  • 🎨 Modern UI: Pre-built components with ShadCN/UI
  • πŸ“± Responsive: Mobile-first design with TailwindCSS
  • πŸ”„ State Management: Zustand for simple and powerful state management
  • 🎭 Icon Library: Comprehensive icon set with React Icons

πŸ› οΈ Developer Experience

  • πŸ”§ Pre-configured: ESLint, Prettier, and TypeScript ready
  • 🐳 Docker Ready: Multi-stage Dockerfile with optimization
  • πŸ“ Environment Templates: Comprehensive .env.template
  • 🎨 Custom Tailwind Layers: Organized CSS with base, components, and utilities
  • πŸ”’ Security: Best practices for secure applications

πŸš€ Production Ready

  • πŸ“¦ Optimized Builds: Tree-shaking and code splitting
  • πŸ” SEO Friendly: Meta tags and proper HTML structure
  • β™Ώ Accessible: WCAG compliant components
  • 🌐 i18n Ready: Internationalization support structure

🎨 Visual Design

  • πŸ–ΌοΈ Beautiful Welcome Page: Showcases all technologies with interactive elements
  • πŸ“± Responsive Layout: Mobile-first design that works on all devices
  • πŸŒ™ Dark Mode Ready: CSS variables for easy theme switching
  • ✨ Smooth Animations: Custom keyframe animations for better UX
  • 🎯 Developer Guidance: Visual workflow and tool explanations

πŸ› οΈ Tech Stack

Category Technology Version Purpose
Framework React 18.3.1 UI Library
Language TypeScript 5.5.3 Type Safety
Build Tool Vite 5.4.8 Fast Development & Build
Styling TailwindCSS 3.4.13 Utility-first CSS
UI Components ShadCN/UI Latest Pre-built Components
State Management Zustand 5.0.0-rc.2 Global State
Icons React Icons 5.3.0 Icon Library
Linting ESLint 9.11.1 Code Quality
Container Docker - Containerization

πŸš€ Quick Start

Prerequisites

  • Node.js 18+
  • npm or yarn or pnpm
  • Git

1. Clone & Setup

# Clone the repository
git clone https://github.com/DimitriTedom/SnowDev-ReactJs-Template.git

# Navigate to project directory
cd My-React-APP_Template-SnowDev

# Install dependencies
npm install

2. Environment Configuration

# Copy environment template
cp .env.template .env

# Edit your environment variables
nano .env  # or your preferred editor

3. Start Development

# Start development server
npm run dev

# Open http://localhost:5173

4. Start Building! πŸŽ‰

You're ready to start building your amazing application!

Quick Start & Development Tools

πŸ“ Project Structure

My-React-APP_Template-SnowDev/
β”œβ”€β”€ πŸ“ public/                  # Static assets
β”‚   └── vite.svg               # Vite logo
β”œβ”€β”€ πŸ“ src/                    # Source code
β”‚   β”œβ”€β”€ πŸ“ components/         # Reusable components
β”‚   β”‚   └── πŸ“ ui/            # ShadCN UI components
β”‚   β”‚       └── button.tsx     # Button component
β”‚   β”œβ”€β”€ πŸ“ lib/               # Utility functions
β”‚   β”‚   └── utils.ts          # Helper utilities
β”‚   β”œβ”€β”€ App.tsx               # Main application component
β”‚   β”œβ”€β”€ index.css             # Global styles & Tailwind
β”‚   β”œβ”€β”€ main.tsx              # Application entry point
β”‚   └── vite-env.d.ts         # Vite type definitions
β”œβ”€β”€ πŸ“„ .env.template          # Environment variables template
β”œβ”€β”€ πŸ“„ components.json        # ShadCN configuration
β”œβ”€β”€ πŸ“„ Dockerfile            # Docker configuration
β”œβ”€β”€ πŸ“„ eslint.config.js       # ESLint configuration
β”œβ”€β”€ πŸ“„ index.html             # HTML entry point
β”œβ”€β”€ πŸ“„ LICENSE                # MIT License
β”œβ”€β”€ πŸ“„ nginx.conf             # Nginx configuration
β”œβ”€β”€ πŸ“„ package.json           # Dependencies & scripts
β”œβ”€β”€ πŸ“„ postcss.config.js      # PostCSS configuration
β”œβ”€β”€ πŸ“„ README.md              # Documentation
β”œβ”€β”€ πŸ“„ tailwind.config.js     # TailwindCSS configuration
β”œβ”€β”€ πŸ“„ tsconfig.json          # TypeScript configuration
β”œβ”€β”€ πŸ“„ tsconfig.app.json      # TypeScript app configuration
β”œβ”€β”€ πŸ“„ tsconfig.node.json     # TypeScript node configuration
└── πŸ“„ vite.config.ts         # Vite configuration

πŸ”§ Configuration

TailwindCSS Layers

Our CSS is organized into three layers:

🎨 @layer base

  • CSS reset and normalization
  • Theme variables (light/dark mode)
  • Global styles and typography

🧩 @layer components

  • Reusable component classes
  • Card, button, form components
  • Layout helpers (flex-center, grid-responsive)

πŸ› οΈ @layer utilities

  • Custom utility classes
  • Animations and effects
  • Debug utilities (remove in production)

ShadCN/UI Configuration

{
  "style": "default",
  "rsc": false,
  "tsx": true,
  "tailwind": {
    "config": "tailwind.config.js",
    "css": "src/index.css"
  },
  "aliases": {
    "components": "@/components",
    "utils": "@/lib/utils"
  }
}

🐳 Docker Support

Development Container

# Build development image
docker build --target development -t my-react-app:dev .

# Run development container
docker run -p 5173:5173 -v $(pwd):/app my-react-app:dev

Production Container

# Build production image
docker build --target production -t my-react-app:prod .

# Run production container
docker run -p 80:80 my-react-app:prod

Multi-stage Dockerfile Features

  • πŸ—οΈ Builder stage: Optimized Node.js build
  • πŸš€ Production stage: Lightweight Nginx server
  • πŸ”’ Security: Non-root user, minimal attack surface
  • ⚑ Performance: Gzip compression, caching headers
  • πŸ₯ Health checks: Built-in container health monitoring

πŸ“œ Available Scripts

Script Command Description
Development npm run dev Start development server with HMR
Build npm run build Build for production
Preview npm run preview Preview production build locally
Lint npm run lint Run ESLint for code quality
Type Check npm run type-check Run TypeScript compiler check

Custom Scripts (Add to package.json)

{
  "scripts": {
    "docker:build": "docker build -t my-react-app .",
    "docker:run": "docker run -p 80:80 my-react-app",
    "docker:dev": "docker build --target development -t my-react-app:dev . && docker run -p 5173:5173 my-react-app:dev"
  }
}

🎨 Styling & Components

Pre-built Component Classes

/* Layout */
.container        /* Responsive container */
.flex-center      /* Flex center alignment */
.flex-between     /* Flex space-between */
.grid-responsive  /* Responsive grid layout */

/* Components */
.card            /* Card container */
.btn             /* Base button */
.btn-primary     /* Primary button variant */
.form-input      /* Form input styling */

/* Utilities */
.text-gradient   /* Gradient text effect */
.glass           /* Glassmorphism effect */
.animate-in      /* Slide-in animation */

ShadCN Components Available

  • Button with variants
  • Card components
  • Form elements
  • Layout components
  • Navigation elements

Adding New Components

# Add ShadCN components
npx shadcn-ui@latest add dialog
npx shadcn-ui@latest add dropdown-menu
npx shadcn-ui@latest add form

πŸ”’ Environment Variables

Client-side Variables (VITE_ prefix)

VITE_APP_NAME="My React App"
VITE_API_URL="http://localhost:3001/api"
VITE_DEBUG_MODE="false"

Server-side Variables

JWT_SECRET="your-secret-key"
API_SECRET="your-api-secret"

Security Best Practices

  • βœ… Never expose secrets to client-side
  • βœ… Use VITE_ prefix only for public variables
  • βœ… Validate environment variables on startup
  • βœ… Use different .env files for different environments

πŸ§ͺ Testing

Setup Testing Framework

# Install testing dependencies
npm install -D vitest @testing-library/react @testing-library/jest-dom

# Add to package.json
{
  "scripts": {
    "test": "vitest",
    "test:ui": "vitest --ui",
    "test:coverage": "vitest --coverage"
  }
}

Example Test Structure

src/
β”œβ”€β”€ __tests__/           # Test files
β”œβ”€β”€ components/
β”‚   └── __tests__/      # Component tests
└── utils/
    └── __tests__/      # Utility tests

πŸš€ Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Netlify

# Build command: npm run build
# Publish directory: dist

Docker Production

# Build and run
docker build -t my-react-app .
docker run -p 80:80 my-react-app

Environment-specific Builds

# Staging
VITE_NODE_ENV=staging npm run build

# Production  
VITE_NODE_ENV=production npm run build

Development Workflow

🀝 Contributing

We welcome contributions! Please follow these guidelines:

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: npm test
  5. Commit changes: git commit -m 'Add amazing feature'
  6. Push to branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Code Standards

  • βœ… Follow TypeScript best practices
  • βœ… Use meaningful commit messages
  • βœ… Add tests for new features
  • βœ… Update documentation
  • βœ… Follow existing code style

Issue Templates

  • πŸ› Bug Report: Describe the issue with reproduction steps
  • πŸ’‘ Feature Request: Propose new features or improvements
  • πŸ“š Documentation: Improve or fix documentation

πŸ‘₯ Community & Support

πŸ™ Acknowledgments

Special thanks to:

  • Worketyamo-Students community for inspiration
  • React Team for the amazing framework
  • Vite Team for the lightning-fast build tool
  • TailwindCSS Team for the utility-first CSS framework
  • ShadCN for the beautiful component library

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ by DimitriTedom (SnowDev)

For the amazing developers at Worketyamo-Students πŸŽ“

⭐ Star this repo if you found it helpful!

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published