{"id":31769523,"url":"https://github.com/mohsen104/boilerplate-react","last_synced_at":"2025-10-10T02:49:48.020Z","repository":{"id":318465520,"uuid":"1054992139","full_name":"mohsen104/boilerplate-react","owner":"mohsen104","description":"Boilerplate React","archived":false,"fork":false,"pushed_at":"2025-10-07T09:58:06.000Z","size":3502,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T11:44:42.728Z","etag":null,"topics":["biome","biomejs","boilerplate","boilerplate-front-end","boilerplate-react","boilerplate-template","eslint","husky","prettier","react","reactjs","tailwind","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohsen104.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-11T15:59:27.000Z","updated_at":"2025-10-07T10:19:05.000Z","dependencies_parsed_at":"2025-10-07T11:44:48.005Z","dependency_job_id":null,"html_url":"https://github.com/mohsen104/boilerplate-react","commit_stats":null,"previous_names":["mohsen104/boilerplate-react"],"tags_count":null,"template":true,"template_full_name":null,"purl":"pkg:github/mohsen104/boilerplate-react","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen104%2Fboilerplate-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen104%2Fboilerplate-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen104%2Fboilerplate-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen104%2Fboilerplate-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohsen104","download_url":"https://codeload.github.com/mohsen104/boilerplate-react/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohsen104%2Fboilerplate-react/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002551,"owners_count":26083403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["biome","biomejs","boilerplate","boilerplate-front-end","boilerplate-react","boilerplate-template","eslint","husky","prettier","react","reactjs","tailwind","tailwindcss"],"created_at":"2025-10-10T02:49:44.423Z","updated_at":"2025-10-10T02:49:48.014Z","avatar_url":"https://github.com/mohsen104.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Boilerplate 🚀\n\n![poster](./public/poster.png)\n\nA modern, scalable, and production-ready React boilerplate with built-in authentication, state management, and developer tools.\n\n## 📁 Project Structure\n\n```\nsrc/\n├── components/          # Reusable UI components\n│   ├── icons/          # Icon components\n│   ├── layouts/        # Layout components (AuthLayout, RootLayout)\n│   ├── shared/         # Shared components across features\n│   └── ui/             # Base UI components (Button, Input, Modal, etc.)\n├── features/           # Feature-based modules\n│   ├── auth/           # Authentication feature\n│   │   ├── components/ # Auth-specific components\n│   │   ├── hooks/      # Auth custom hooks\n│   │   ├── services/   # Auth API services\n│   │   ├── slices/     # Auth state slices\n│   │   └── types/      # Auth type definitions\n│   ├── home/           # Home feature module\n│   └── products/       # Products feature module\n├── pages/              # Page components\n│   ├── HomePage.tsx\n│   ├── LoginPage.tsx\n│   └── ProductListPage.tsx\n├── hooks/              # Global custom hooks\n├── context/            # React Context providers\n├── providers/          # App providers (AppProviders, QueryProvider, etc.)\n├── routes/             # Routing configuration\n├── services/           # API services\n├── store/              # Redux store configuration\n├── types/              # Global TypeScript type definitions\n├── utils/              # Utility functions\n├── lib/                # Third-party library configurations\n├── styles/             # Global styles and themes\n├── config/             # App configuration files\n├── mocks/              # Mock data and API handlers\n└── assets/             # Static assets (images, fonts, etc.)\n```\n\n## 🛠 Tech Stack\n\n### Core Technologies\n\n- **Frontend Framework**: React 19 with TypeScript\n- **Build Tool**: Vite with SWC\n- **Styling**: Tailwind CSS 4\n- **Routing**: React Router\n- **Package Manager**: Bun\n\n### State Management \u0026 Data Fetching\n\n- **Client State**: Redux Toolkit (feature-based slices)\n- **Server State**: React Query (TanStack Query)\n- **Context API**: For auth and theme management\n\n### Development \u0026 Quality\n\n- **Language**: TypeScript (strict mode)\n- **Linting**: ESLint + Biome (formatting \u0026 linting)\n- **Git Hooks**: Husky + lint-staged\n- **Mocking**: MSW (Mock Service Worker)\n\n### Deployment \u0026 Containerization\n\n- **Containerization**: Docker \u0026 Docker Compose\n- **Environment Management**: Dotenv\n\n## ✨ Features\n\n### 🔐 Authentication System\n\n- JWT-based authentication\n- Protected routes with `ProtectedRoute` component\n- Role-based access control with `AccessControl`\n- Auth context with `useAuth` hook\n- Automatic token refresh\n- Login/Logout functionality\n\n### 🏗 Project Architecture\n\n- Feature-based folder structure\n- Modular and scalable design\n- Separation of concerns\n- Reusable component library\n- Custom hooks for business logic\n\n### 🎨 Developer Experience\n\n- Hot module replacement (HMR) with Vite\n- TypeScript for type safety\n- Path aliases configured\n- Pre-commit hooks with Husky\n- Consistent code formatting with Biome\n- Mock API with MSW\n\n### 📦 Production Ready\n\n- Docker containerization\n- Environment variables management\n- Optimized build output\n- SEO-friendly (robots.txt)\n- Asset optimization\n\n### 🔧 Development Tools\n\n- Biome for blazing-fast formatting and linting\n- SWC for fast compilation\n- Bun for fast package management\n- TypeScript strict configuration\n- Pre-configured path aliases\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js 18+ (version specified in .nvmrc)\n- Bun package manager\n- Docker (optional)\n\n### Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/mohsen104/boilerplate-react\n   cd react-ts-boilerplate\n   ```\n\n2. **Install dependencies**\n\n   ```bash\n   bun install\n   ```\n\n3. **Set up environment variables**\n\n   ```bash\n   cp .env.example .env\n   ```\n\n4. **Start development server**\n   ```bash\n   bun run dev\n   ```\n\n### Docker Development\n\n```bash\n# Start with Docker Compose\ndocker-compose up -d\n\n# Stop containers\ndocker-compose down\n\n# View logs\ndocker-compose logs -f\n```\n\n## 📜 Available Scripts\n\n- `bun run dev` - Start development server with HMR\n- `bun run preview` - Preview production build locally\n- `bun run build` - Build for production (includes TypeScript compilation)\n- `bun run lint` - Run Biome linting and auto-fix issues\n- `bun run format` - Format code with Biome\n- `bun run check` - Comprehensive Biome check (lint + format)\n- `bun run msw:init` - Initialize MSW service worker\n\n## 🏷 TypeScript Configuration\n\n- Strict type checking enabled\n- Path aliases for clean imports\n- Environment variables typing\n- API response types with generics\n- Custom hooks with proper return types\n\n## 🎯 Core Concepts\n\n### Feature-Based Architecture\n\nEach feature is self-contained with:\n\n- Components (UI components)\n- Hooks (custom React hooks)\n- Services (API calls and business logic)\n- Slices (Redux state management)\n- Types (TypeScript definitions)\n\n### Routing \u0026 Navigation\n\n- Protected routes with authentication\n- Layout-based routing system\n- Lazy loading with React.Suspense\n- Route-based code splitting\n\n## 🔧 Configuration Details\n\n### Vite Configuration\n\n- TypeScript support with SWC\n- Path aliases mapping\n- Environment variables exposure\n- Asset optimization\n\n## 🤝 Contributing Guidelines\n\n1. Follow the feature-based architecture\n2. Use TypeScript for all new code\n3. Follow Biome formatting rules\n4. Write meaningful commit messages\n5. Add proper TypeScript types\n6. Update documentation when needed\n7. Use meaningful component and file names\n\n---\n\n**Built with ❤️ using modern web technologies**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohsen104%2Fboilerplate-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohsen104%2Fboilerplate-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohsen104%2Fboilerplate-react/lists"}