{"id":28393024,"url":"https://github.com/raminr77/react-sample","last_synced_at":"2025-06-26T07:30:52.909Z","repository":{"id":64021063,"uuid":"483784700","full_name":"raminr77/react-sample","owner":"raminr77","description":"A simple and clean React + TypeScript + Vite starter project, configured with essential tools and structured with best practices gained from 7+ years of frontend development experience.","archived":false,"fork":false,"pushed_at":"2025-04-30T12:22:50.000Z","size":2543,"stargazers_count":37,"open_issues_count":0,"forks_count":92,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T02:11:38.690Z","etag":null,"topics":["init-react-project","react","sample-react-app"],"latest_commit_sha":null,"homepage":"https://react-sample.ir","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/raminr77.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":"2022-04-20T19:19:58.000Z","updated_at":"2025-05-24T04:30:51.000Z","dependencies_parsed_at":"2025-04-27T23:20:16.984Z","dependency_job_id":"a9ff6a61-6a62-4614-aeb6-8ca3f28732cd","html_url":"https://github.com/raminr77/react-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/raminr77/react-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raminr77%2Freact-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raminr77%2Freact-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raminr77%2Freact-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raminr77%2Freact-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raminr77","download_url":"https://codeload.github.com/raminr77/react-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raminr77%2Freact-sample/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262022039,"owners_count":23246239,"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":["init-react-project","react","sample-react-app"],"created_at":"2025-05-31T15:10:28.536Z","updated_at":"2025-06-26T07:30:52.901Z","avatar_url":"https://github.com/raminr77.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Sample\n\n[![GitHub stars](https://img.shields.io/github/stars/raminr77/react_sample?style=social)](https://github.com/raminr77/react_sample/)\n[![GitHub_forks](https://img.shields.io/github/forks/raminr77/react_sample?style=social)](https://github.com/raminr77/react_sample/)\n\n# 🚀 React Sample Project\n\nA simple and clean React + TypeScript + Vite starter project, configured with essential tools and structured with best practices gained from 7+ years of frontend development experience.\n\u003cbr/\u003e\nThis is a sample of the ReactJs project for starting easily and fast.\n\u003cbr /\u003e\n\n## 📁 Project Structure\n\n```\nscripts/                 # For Custom Scripts (Icon Generator, etc.)\npublic/                  # Application files (PWA, Icons, Splash Screens, etc.)\nsrc/\n ├── pages/              # Application pages (auth, landing, main, etc.)\n ├── layout/             # Layout components and containers\n ├── shared/             # Shared logic: helpers, constants, services, types, store\n ├── styles/             # Global styles (SCSS \u0026 Tailwind)\n └── __test__/           # Unit tests\n```\n\nThe project includes complete configurations for **ESLint**, **Prettier**, **Stylelint**, **Husky** (pre-commit hooks), and **CI/CD via GitHub Actions**.\n\nIn this project we're using `RTK Query` for API request system and `Redux Toolkit` for API cache system and state management.  \n\n---\n\n## ⚙️ Getting Started Locally\n\n### 1. Install Dependencies\n\n```bash\nnpm install\n```\n\n### 2. Create the `.env` File\n\nCreate your local environment file by copying the example file:\n\n```bash\ncp .env.example .env\n```\n\nThen make sure to configure your **Firebase settings** required for push notifications inside `.env`.\n\nIf you're just testing the app and don't have Firebase set up, you can use dummy values for now.\n\n---\n\n## 🐳 Running with Docker\n\n### Build and Run\n\n```bash\ndocker build -t react-sample-app .\ndocker run -d -p 3000:80 react-sample-app\n```\n\nVisit: [http://localhost:3000](http://localhost:3000)\n\n---\n\n## 📦 Using Docker Compose\n\n```bash\ndocker-compose up --build\n```\n\nTo stop and remove containers:\n\n```bash\ndocker-compose down\n```\n\n---\n\n## ✅ Testing\n\nUnit tests can be added and placed under the `src/__test__` folder. You can use any preferred framework like Vitest or Jest.\n\n---\n\n## 📄 License\n\nThis project is open-source and licensed under the [MIT License](LICENSE).\n\n## 💡 Tips \u0026 Features\n\n### ✨ Animations\n\nYou can use the [AnimateCSS](https://animate.style/) framework for applying animations by adding the class `animate__animated` and the desired animation class with the `animate__` prefix:\n\n```html\n\u003ch1 class=\"animate__animated animate__bounce\"\u003eAn animated element\u003c/h1\u003e\n```\n\n🔧 **But there's more!** This project includes a custom helper function for generating animation class names easily:\n\n```ts\nanimator({ name: 'fadeIn', speed: 'faster' });\n```\n\nThis will generate appropriate class names automatically.\n\n---\n\n### 📁 Import Aliases\n\nYou can import modules from the `src` folder using the `@/` alias:\n\n```ts\nimport { APP_ROUTES } from '@/shared/constants';\n```\n\n---\n\n## 🧪 Available NPM Commands\n\nHere’s a list of useful scripts for development and maintenance:\n\n| Command           | Description                                  |\n|------------------|----------------------------------------------|\n| `dev`            | Run the project locally using Vite           |\n| `test`           | Run unit tests with Vitest                   |\n| `prepare`        | Prepare Git hooks using Husky                |\n| `lint`           | Run ESLint and fix issues automatically      |\n| `format`         | Format the code using Prettier               |\n| `build`          | Build TypeScript and the app bundle          |\n| `check-lint`     | Check lint issues without fixing             |\n| `check-format`   | Check code formatting                        |\n| `preview`        | Preview production build at port 8080        |\n| `check-types`    | Type-check the project without emitting files|\n| `pretty`         | Format all JS/TS/CSS/SCSS source files       |\n| `lint:style`     | Run Stylelint for style file validation      |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framinr77%2Freact-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framinr77%2Freact-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framinr77%2Freact-sample/lists"}