{"id":24850188,"url":"https://github.com/forge-42/base-stack","last_synced_at":"2025-04-12T22:37:24.422Z","repository":{"id":275006927,"uuid":"782006917","full_name":"forge-42/base-stack","owner":"forge-42","description":"The best way to start your react-router v7 project","archived":false,"fork":false,"pushed_at":"2025-04-09T10:33:18.000Z","size":1172,"stargazers_count":251,"open_issues_count":4,"forks_count":30,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-12T06:35:44.490Z","etag":null,"topics":["biomejs","hono","i18next","lefthook","react","react-compiler","react-router","react-router-stack","react-router-v7","react19","remix","remix-run","remix-stack","remix-stacks","remix-starter","tailwindcss","typescript","vite","vitest","vitest-browser-mode"],"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/forge-42.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}},"created_at":"2024-04-04T13:10:03.000Z","updated_at":"2025-04-11T22:46:12.000Z","dependencies_parsed_at":"2025-02-28T17:11:35.394Z","dependency_job_id":"93cca18d-29ec-42d3-9fea-7428faf6b86b","html_url":"https://github.com/forge-42/base-stack","commit_stats":null,"previous_names":["forge-42/base-stack"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge-42%2Fbase-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge-42%2Fbase-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge-42%2Fbase-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge-42%2Fbase-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forge-42","download_url":"https://codeload.github.com/forge-42/base-stack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643007,"owners_count":21138353,"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":["biomejs","hono","i18next","lefthook","react","react-compiler","react-router","react-router-stack","react-router-v7","react19","remix","remix-run","remix-stack","remix-stacks","remix-starter","tailwindcss","typescript","vite","vitest","vitest-browser-mode"],"created_at":"2025-01-31T13:17:21.105Z","updated_at":"2025-04-12T22:37:24.404Z","avatar_url":"https://github.com/forge-42.png","language":"TypeScript","readme":"\n\n\u003cp align=\"middle\"\u003e\n\u003cimg  width=\"900px\" height=\"500px\" src=\"./public/base-stack.png\" /\u003e\n\u003c/p\u003e\n\n# Welcome to Forge 42 base-stack\n\nThis is a base-stack for Forge 42 projects. This stack is a starting point for all Forge 42 stacks with more\nadvanced features. This is an ESM Vite stack with Remix.run / React Router v7.\n\nIt includes a basic setup for a project with react-router v7 framework mode and:\n- React 19 \u0026 react-compiler\n- TypeScript\n- TailwindCSS\n- Vite\n- Vitest (unit tests)\n- Scripting\n- Biome (linter \u0026 formatter)\n- i18n support (client and server)\n- Icons spritesheet generator\n- lefthook hooks\n- CI checks for quality control\n- react-router-devtools\n- Hono server\n- .env var handling for server and client\n- SEO robots.txt, sitemap-index and sitemap built in.\n\n## Internationalization\n\nThis stack uses i18next for internationalization. It supports both client and server side translations.\nFeatures included out of the box:\n- Support for multiple languages\n- Typesafe resources\n- client side translations are fetched only when needed\n- language switcher\n- language detector (uses the request to detect the language, falls back to your fallback language)\n\n## Hono server\n\nThis stack uses Hono for the server. More information about Hono can be found [here](https://honojs.dev/).\nAnother important thing to note is that we use a dependency called `react-router-hono-server` which is a wrapper for Hono that allows us to use Hono in our React Router application.\n\nThe server comes preconfigured with:\n- i18next middleware\n- caching middleware for assets\n- easily extendable global application context\n- .env injection into context\n\nIn order to add your own middleware, extend the context, or anything along those lines, all you have to do is edit the server\ninside the `entry.server.tsx` file.\n\n## .env handling\n\nThis stack parses your `.env` file and injects it into the server context. For the client side, in the `root.tsx` file, we use the `useLoaderData` hook to get the `clientEnv` from the server and set it as a global variable on the `window` called `env`.\nIf you need to access the env variables in both environments, you can create a polyEnv helper like this:\n```ts\n// app/utils/env.ts\n// This will return the process.env on the server and window.env on the client\nexport const polyEnv = typeof process !== \"undefined\" ? process.env : window.env;\n```\nThe server will fail at runtime if you don't set your `.env` file properly.\n\n## Getting started\n\n1. Fork the repository\n\n2. Install the dependencies:\n```bash\npnpm install\n```\n3. Read through the README.md files in the project to understand our decisions.\n\n4. Run the cleanup script:\n```bash\npnpm cleanup\n```\n\nThis will remove everything in the project related to the base-stack like README.md etc.\nThis is the first thing you should run after initializing the project.\nAfter it is run it will remove itself from the package.json.\n\n5. Start the development server:\n```bash\npnpm run dev\n```\n6. Happy coding!\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforge-42%2Fbase-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforge-42%2Fbase-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforge-42%2Fbase-stack/lists"}