{"id":30176023,"url":"https://github.com/jfranciscosousa/react-router-starter","last_synced_at":"2025-08-12T02:17:12.249Z","repository":{"id":36997097,"uuid":"434701570","full_name":"jfranciscosousa/react-router-starter","owner":"jfranciscosousa","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-06T22:12:04.000Z","size":3193,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-07T00:11:14.567Z","etag":null,"topics":["prisma","react","react-router-v7","remix"],"latest_commit_sha":null,"homepage":"https://react-router-jfranciscosousa.vercel.app/","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/jfranciscosousa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-12-03T18:51:52.000Z","updated_at":"2025-08-06T22:12:08.000Z","dependencies_parsed_at":"2023-09-22T22:20:49.788Z","dependency_job_id":"f17c6616-3cf6-46ee-b3ab-e77a1d4f9938","html_url":"https://github.com/jfranciscosousa/react-router-starter","commit_stats":null,"previous_names":["jfranciscosousa/react-router-prisma-starter","jfranciscosousa/react-router-starter"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/jfranciscosousa/react-router-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfranciscosousa%2Freact-router-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfranciscosousa%2Freact-router-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfranciscosousa%2Freact-router-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfranciscosousa%2Freact-router-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfranciscosousa","download_url":"https://codeload.github.com/jfranciscosousa/react-router-starter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfranciscosousa%2Freact-router-starter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269987174,"owners_count":24508186,"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-08-12T02:00:09.011Z","response_time":80,"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":["prisma","react","react-router-v7","remix"],"created_at":"2025-08-12T02:17:10.393Z","updated_at":"2025-08-12T02:17:12.241Z","avatar_url":"https://github.com/jfranciscosousa.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Router 7 + Drizzle Starter\n\nMy `react-router` and `drizzle` starter. With `ssr` mode by default, simple user + password auth.\n\n## 🚀 Live Demo\n\n- [Deployed Application](https://react-router-jfranciscosousa.vercel.app/)\n- [React Router 7 Documentation](https://reactrouter.com/home)\n\n## 🚀 Quick Start\n\n### Prerequisites\n- **Node.js** ≥ 22.16.0\n- **PNPM** (recommended) or npm\n- **PostgreSQL** database\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone git@github.com:jfranciscosousa/react-router-starter.git\n   cd react-router-starter\n   ```\n\n2. **Install dependencies**\n   ```bash\n   pnpm install\n   ```\n\n3. **Set up environment**\n   ```bash\n   cp .env.example .env\n   cp .env.test.sample .env.test\n   # Edit .env with your database URL and secrets\n   ```\n\n4. **Initialize database**\n   ```bash\n   ./bin/setup-drizzle  # Sets up database with Drizzle\n   ```\n\n5. **Start development**\n   ```bash\n   ./bin/dev       # Starts development server at http://localhost:5173\n   ```\n\n## 🛠️ Development\n\n### Available Scripts\n\nThe project includes comprehensive bin scripts for streamlined development:\n\n#### Build Commands\n```bash\n./bin/build         # Build for production\n./bin/clean         # Clean build artifacts and cache\n```\n\n#### Development Commands\n```bash\n./bin/dev           # Start development server\n./bin/start         # Start production server\n```\n\n#### Code Quality\n```bash\n./bin/lint          # Run ESLint\n./bin/ts-check      # TypeScript type checking\n./bin/ts-watch      # TypeScript watch mode\n```\n\n#### Testing\n```bash\n./bin/test              # Run all tests (unit + e2e)\n./bin/test-vitest       # Unit tests only\n./bin/test-vitest-watch # Unit tests in watch mode\n./bin/test-e2e          # E2E tests with setup\n./bin/test-e2e-quick    # E2E tests without rebuild\n./bin/test-e2e-ui       # E2E tests with Playwright UI\n```\n\n#### Deployment\n```bash\n./bin/deploy        # Full deployment process\n./bin/validate-env  # Validate environment configuration\n./bin/ci           # Run full CI pipeline\n```\n\n#### Utilities\n```bash\n./bin/help         # Show all available commands\n./bin/dotenv       # Advanced .env file handling\n```\n\n### Environment Configuration\n\nThe project uses smart environment loading:\n- **Development**: Automatically loads `.env`\n- **Testing**: Test scripts automatically use `.env.test`\n- **Production**: Uses system environment variables\n\nEnvironment variables are loaded once per script execution to prevent conflicts when scripts call other scripts.\n\n### Database Operations\n\n```bash\n# Database setup and migrations\npnpm drizzle-kit push       # Push schema changes\npnpm drizzle-kit generate   # Generate migration files\npnpm drizzle-kit studio     # Open database browser\n\n# Using bin scripts (includes environment loading)\n./bin/setup-drizzle    # Full database initialization\n```\n\n## 🧪 Testing\n\n### End-to-End Testing\n\nComprehensive E2E testing with Playwright:\n\n```bash\n# First time setup\npnpm dlx playwright install\npnpm dlx playwright install-deps\n\n# Run tests\n./bin/test-e2e        # Full E2E suite with database setup\n./bin/test-e2e-ui     # Interactive mode with Playwright UI\n```\n\nTest features:\n- **Authentication flows** (signup, login, logout)\n- **Notes management** (create, delete, delete all)\n- **User profiles** and theme switching\n- **Database isolation** - Each test runs with clean database state\n\n### Unit Testing\n\nVitest-based unit testing:\n\n```bash\n./bin/test-vitest         # Run once\n./bin/test-vitest-watch   # Watch mode for development\n```\n\n## 🚀 Deployment\n\n### Vercel\n\nAny app that uses this repo as the template can be deployed\n\n## 🔧 Technologies\n\n- [React Router](https://reactrouter.com/) - Modern React framework\n- [Drizzle ORM](https://orm.drizzle.team/) - Type-safe database ORM\n- [shadcn/ui](https://ui.shadcn.com/) - Beautiful, accessible components\n- [Tailwind CSS](https://tailwindcss.com/) - Utility-first CSS framework\n\n## Caveats\n\nThe authentication is not production ready. I use this for mainly for MVPs. It's secure but it's lacking:\n- brute force protection\n- password recovery via email\n\nWe are already tracking user sessions and we support invalidating user sessions as well.\n\nConsider something like [Clerk](https://clerk.com/) instead if you don't want to implement those things yourself.\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfranciscosousa%2Freact-router-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfranciscosousa%2Freact-router-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfranciscosousa%2Freact-router-starter/lists"}