{"id":22787158,"url":"https://github.com/sumanadithan/react-starter","last_synced_at":"2025-03-30T16:16:25.622Z","repository":{"id":264488043,"uuid":"849950486","full_name":"SumanAdithan/react-starter","owner":"SumanAdithan","description":"This repository provides a custom starter template for React applications using Vite, TypeScript, and Tailwind CSS with path alias support. It includes the necessary configuration for a seamless development experience and follows best practices for TypeScript, Vite, and Tailwind integration.","archived":false,"fork":false,"pushed_at":"2024-11-24T17:26:11.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T17:40:24.471Z","etag":null,"topics":["path-alias","react-typescript-starter","react-typescript-tailwindcss","react-vite-typescript"],"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/SumanAdithan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-08-30T15:20:11.000Z","updated_at":"2024-11-24T17:28:07.000Z","dependencies_parsed_at":"2024-11-24T17:39:27.615Z","dependency_job_id":null,"html_url":"https://github.com/SumanAdithan/react-starter","commit_stats":null,"previous_names":["sumanadithan/react"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumanAdithan%2Freact-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumanAdithan%2Freact-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumanAdithan%2Freact-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SumanAdithan%2Freact-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SumanAdithan","download_url":"https://codeload.github.com/SumanAdithan/react-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246342994,"owners_count":20761947,"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","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":["path-alias","react-typescript-starter","react-typescript-tailwindcss","react-vite-typescript"],"created_at":"2024-12-12T00:50:15.465Z","updated_at":"2025-03-30T16:16:25.602Z","avatar_url":"https://github.com/SumanAdithan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React + Vite + TypeScript + Tailwind CSS Starter\n\nThis repository provides a custom starter template for React applications using **Vite**, **TypeScript**, and **Tailwind CSS** with path alias support. It includes the necessary configuration for a seamless development experience and follows best practices for TypeScript, Vite, and Tailwind integration.\n\n---\n\n## 🚀 Features\n\n-   **React** with **SWC** for fast JSX transformation.\n-   **Vite** as the build tool for fast development and optimized production builds.\n-   **TypeScript** with strict configurations for better type safety.\n-   **Tailwind CSS** for utility-first styling.\n-   Path aliases set up for cleaner imports.\n\n---\n\n## ⚙️ Configuration Highlights\n\n## 📦 Additional Dependencies\n\nThese dependencies have been added to resolve TypeScript-related errors and improve the development experience:\n\n-   **ts-node** - To execute TypeScript code directly without compiling it first.\n-   **@types/node** - Provides TypeScript definitions for Node.js.\n-   **vite-plugin-tsconfig-paths** - Helps resolve path aliases defined in the **tsconfig.json** file during development.\n\nYou can install them by running:\n\n```\nyarn add ts-node @types/node vite-plugin-tsconfig-paths -D\n\n```\n\n### 1. Vite Configuration\n\nThe **`vite.config.ts`** file is set up with vite-plugin-tsconfig-paths to resolve TypeScript path aliases:\n\n```\nimport { defineConfig } from 'vite';\nimport react from '@vitejs/plugin-react-swc';\nimport { resolve } from 'path';\nimport tsconfigPaths from 'vite-plugin-tsconfig-paths';\n\n// https://vite.dev/config/\nexport default defineConfig({\n    resolve: {\n        alias: {\n            '@': resolve(__dirname, 'src'),\n            // '@components': resolve(__dirname, 'src/components'),\n        },\n    },\n    plugins: [react(), tsconfigPaths()],\n});\n```\n\n### 2. Path Aliases\n\nPath aliases are configured in **`tsconfig.json`** for cleaner imports:\n\n```\n{\n  \"compilerOptions\": {\n    \"baseUrl\": \"./src\",\n    \"paths\": {\n      \"@/\": [\"./\"]\n      // \"@components\": [\"components\"],\n    }\n  }\n}\n\n```\n\n### 3. TypeScript Configuration\n\nThe TypeScript configuration is split into multiple files for flexibility:\n\n-   **tsconfig.json** - Base configuration for TypeScript with shared settings across the app.\n-   **tsconfig.app.json** - Specific settings for the application code.\n-   **tsconfig.node.json** - Settings for server-side or Node.js-specific code.\n\n**`Base`** tsconfig.json\n\n```\n{\n  \"files\": [],\n  \"references\": [{ \"path\": \"./tsconfig.app.json\" }, { \"path\": \"./tsconfig.node.json\" }],\n  \"compilerOptions\": {\n    \"baseUrl\": \"./src\",\n    \"paths\": {\n      \"@/\": [\"./\"]\n    }\n  }\n}\n\n```\n\n**`Application`** tsconfig.app.json\n\n```\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.app.tsbuildinfo\",\n    \"target\": \"ES2020\",\n    \"useDefineForClassFields\": true,\n    \"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n    \"moduleResolution\": \"Bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"isolatedModules\": true,\n    \"moduleDetection\": \"force\",\n    \"noEmit\": true,\n    \"jsx\": \"react-jsx\",\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"src\"]\n}\n\n```\n\n**`Node`** tsconfig.node.json\n\n```\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"tsBuildInfoFile\": \"./node_modules/.tmp/tsconfig.node.tsbuildinfo\",\n    \"target\": \"ES2022\",\n    \"lib\": [\"ES2023\"],\n    \"module\": \"ESNext\",\n    \"skipLibCheck\": true,\n    \"moduleResolution\": \"Bundler\",\n    \"allowImportingTsExtensions\": true,\n    \"isolatedModules\": true,\n    \"moduleDetection\": \"force\",\n    \"noEmit\": true,\n    \"strict\": true,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"noFallthroughCasesInSwitch\": true,\n    \"noUncheckedSideEffectImports\": true\n  },\n  \"include\": [\"vite.config.ts\"]\n}\n\n```\n\n## 📦 Technologies Used\n\n-   **React** with **SWC** for fast JSX compilation\n-   **Vite** for fast bundling and development\n-   **TypeScript** for type safety\n-   **Tailwind** CSS for utility-first styling\n-   **ESLint** for code linting and quality assurance\n-   **PostCSS** for transforming Tailwind and other CSS plugins\n\n## 📝 License\n\nThis project is licensed under the MIT License. Feel free to use it as a reference or starting point for your projects.\n\n## 🙌 Contributions\n\nContributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request.\n\n## 📧 Contact\n\nFor any questions, feel free to reach out at sumanadithan34@gmail.com.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumanadithan%2Freact-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumanadithan%2Freact-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumanadithan%2Freact-starter/lists"}