{"id":28382925,"url":"https://github.com/hossein-i/nextjs-rtk-starter","last_synced_at":"2025-06-25T07:31:05.608Z","repository":{"id":293017837,"uuid":"982544148","full_name":"Hossein-i/nextjs-rtk-starter","owner":"Hossein-i","description":"A modern and scalable starter template for Next.js, following best practices with clean architecture based on Feature-Sliced Design (FSD). This setup is ready to go with TypeScript, Redux Toolkit (RTK), RTK Query, ESLint, Prettier, Commitlint, and Husky.","archived":false,"fork":false,"pushed_at":"2025-05-18T09:19:09.000Z","size":53,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-30T04:59:03.863Z","etag":null,"topics":["commitizen","commitlint","eslint","feature-sliced-design","husky","lint-staged","nextjs","nextjs-template","prettier","redux-toolkit","rtk-query","tailwindcss","template","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/Hossein-i.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}},"created_at":"2025-05-13T03:45:20.000Z","updated_at":"2025-05-18T09:19:12.000Z","dependencies_parsed_at":"2025-05-13T09:52:04.738Z","dependency_job_id":null,"html_url":"https://github.com/Hossein-i/nextjs-rtk-starter","commit_stats":null,"previous_names":["hossein-i/nextjs-rtk-starter"],"tags_count":0,"template":true,"template_full_name":"Hossein-i/nextjs-starter-template","purl":"pkg:github/Hossein-i/nextjs-rtk-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hossein-i%2Fnextjs-rtk-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hossein-i%2Fnextjs-rtk-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hossein-i%2Fnextjs-rtk-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hossein-i%2Fnextjs-rtk-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hossein-i","download_url":"https://codeload.github.com/Hossein-i/nextjs-rtk-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hossein-i%2Fnextjs-rtk-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261826910,"owners_count":23215664,"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":["commitizen","commitlint","eslint","feature-sliced-design","husky","lint-staged","nextjs","nextjs-template","prettier","redux-toolkit","rtk-query","tailwindcss","template","typescript"],"created_at":"2025-05-30T04:43:48.149Z","updated_at":"2025-06-25T07:31:05.602Z","avatar_url":"https://github.com/Hossein-i.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Next.js RTK Starter\n\nA modern and scalable starter template for **Next.js**, following best practices with clean architecture based on **Feature-Sliced Design (FSD)**. This setup is ready to go with **TypeScript**, **Redux Toolkit (RTK)**, **RTK Query**, **ESLint**, **Prettier**, **Commitlint**, and **Husky**.\n\n## 🚀 Features\n\n- **Next.js** – The production-ready React framework.\n- **TypeScript** – Static typing for JavaScript.\n- **Redux Toolkit (RTK)** – Efficient and scalable state management.\n- **RTK Query** – Built-in data fetching and caching.\n- **Feature-Sliced Design (FSD)** – Modular architecture for large applications.\n- **Prettier** – Code formatter for consistent style.\n- **ESLint** – Code linter to ensure code quality.\n- **Commitlint** – Enforce conventional commit messages.\n- **Husky** – Git hooks for pre-commit and commit-msg checks.\n\n## 📦 Getting Started\n\n### Prerequisites\n\n- Node.js (v18 or higher)\n- npm or yarn\n\n### Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/Hossein-i/nextjs-rtk-starter.git\n   ```\n\n2. Navigate to the project directory:\n\n   ```bash\n   cd nextjs-rtk-starter\n   ```\n\n3. Install dependencies:\n\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n### Running the Development Server\n\nStart the dev server:\n\n```bash\nnpm run dev\n# or\nyarn dev\n```\n\nThen open [http://localhost:3000](http://localhost:3000) in your browser.\n\n## 🧱 Project Structure (FSD)\n\nThis project uses the **Feature-Sliced Design** architecture to enhance scalability and maintainability:\n\n```bash\nsrc/\n├── app/           # Next.js app router (layouts, pages)\n├── entities/      # Business entities like user, product\n│   ├── api/       # Entity-related API logic\n│   ├── model/     # Types, stores, services\n│   └── ui/        # Entity-specific UI components\n├── features/      # Independent, reusable features\n│   ├── api/       # Feature-specific API calls\n│   ├── config/    # Feature-level configuration\n│   ├── lib/       # Internal libraries for the feature\n│   ├── model/     # Logic, stores, types\n│   └── ui/        # UI for feature interactions\n├── shared/        # Cross-cutting code (global utils, UI, config)\n│   ├── api/       # API client setup and base query\n│   ├── config/    # App-wide config and env vars\n│   ├── i18n/      # Internationalization setup\n│   ├── lib/       # Utilities and helper functions\n│   ├── styles/    # Global styles and themes\n│   └── ui/        # Design system components\n├── views/         # Top-level views composed of widgets/features\n└── widgets/       # UI blocks that encapsulate full use cases\n```\n\n## ⚙️ State Management \u0026 Data Fetching\n\nThis template comes with:\n\n- **Redux Toolkit** for managing global app state.\n- **RTK Query** for fetching, caching, and managing server state with minimal boilerplate.\n\n\u003e Store setup and slices can be found in `shared/api` and `features/model`.\n\n## 🧹 Code Quality Tools\n\n### Prettier\n\nEnsures consistent code formatting:\n\n```bash\nnpm run format\n# or\nyarn format\n```\n\n### ESLint\n\nChecks code for style and quality issues:\n\n```bash\nnpm run lint\n# or\nyarn lint\n```\n\n### Commitlint\n\nEnforces [Conventional Commits](https://www.conventionalcommits.org/) for all commit messages:\n\n```bash\nnpm run commit\n# or\nyarn commit\n```\n\n## 🔒 Git Hooks (Husky)\n\nHusky ensures quality checks before code is committed:\n\n- **Pre-commit**: Runs ESLint and Prettier\n- **Commit-msg**: Validates commit message format\n\n## 🤝 Contributing\n\nWe welcome contributions! To get started:\n\n1. Fork the repo.\n2. Create a new branch: `git checkout -b feature/YourFeatureName`.\n3. Commit your changes: `git commit -m 'feat: Add awesome feature'`.\n4. Push the branch: `git push origin feature/YourFeatureName`.\n5. Open a Pull Request.\n\n## 📄 License\n\nThis project is licensed under the MIT License – see the [LICENSE](LICENSE) file for details.\n\n## 🙌 Acknowledgments\n\n- [Next.js Docs](https://nextjs.org/docs)\n- [Feature-Sliced Design](https://feature-sliced.design/)\n- [Redux Toolkit](https://redux-toolkit.js.org/)\n- [RTK Query](https://redux-toolkit.js.org/rtk-query/overview)\n- [Conventional Commits](https://www.conventionalcommits.org/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhossein-i%2Fnextjs-rtk-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhossein-i%2Fnextjs-rtk-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhossein-i%2Fnextjs-rtk-starter/lists"}