{"id":49885963,"url":"https://github.com/quochuydev/tolgee-poc","last_synced_at":"2026-05-15T18:16:13.146Z","repository":{"id":356033913,"uuid":"1230686187","full_name":"quochuydev/tolgee-poc","owner":"quochuydev","description":"Tolgee i18n + TanStack Start admin dashboard POC — React 19, Tailwind v4, EN/DE, self-hosted Tolgee via Docker","archived":false,"fork":false,"pushed_at":"2026-05-06T11:10:09.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-06T11:29:31.803Z","etag":null,"topics":["admin-dashboard","docker","i18n","internationalization","localization","lucide-react","proof-of-concept","react","react-19","recharts","tailwind-v4","tailwindcss","tanstack","tanstack-router","tanstack-start","tolgee","tolgee-i18n","typescript","vite"],"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/quochuydev.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-06T08:17:58.000Z","updated_at":"2026-05-06T11:10:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/quochuydev/tolgee-poc","commit_stats":null,"previous_names":["quochuydev/tolgee-poc"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/quochuydev/tolgee-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quochuydev%2Ftolgee-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quochuydev%2Ftolgee-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quochuydev%2Ftolgee-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quochuydev%2Ftolgee-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quochuydev","download_url":"https://codeload.github.com/quochuydev/tolgee-poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quochuydev%2Ftolgee-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33074580,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["admin-dashboard","docker","i18n","internationalization","localization","lucide-react","proof-of-concept","react","react-19","recharts","tailwind-v4","tailwindcss","tanstack","tanstack-router","tanstack-start","tolgee","tolgee-i18n","typescript","vite"],"created_at":"2026-05-15T18:16:12.285Z","updated_at":"2026-05-15T18:16:13.139Z","avatar_url":"https://github.com/quochuydev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tolgee-poc\n\nA small TanStack Start app that demonstrates [Tolgee](https://tolgee.io/) i18n with English + German.\n\n\u003e **Branch workflow:** `main` (dev) and `staging` use **two separate Tolgee projects**. Managers edit copy on `staging`; developers ship code on `main`. See [`docs/WORKFLOW.md`](docs/WORKFLOW.md) for the full guide.\n\n## Setup\n\n### 1. Start the Tolgee server\n\n```bash\ndocker compose up -d        # http://localhost:8200\ndocker exec tolgee cat /data/initial.pwd   # initial admin password\n```\n\nLog in at \u003chttp://localhost:8200\u003e as `admin`, set a new password.\n\n### 2. Create the project in Tolgee\n\n- **Projects → Add a project** — name `tolgee-poc`, base language **English** (`en`).\n- **Languages → Add language** — `German` (`de`).\n- **Project settings** — copy the **Project ID** (small integer).\n- **API keys → Create new** — give it `admin` scope (or at least `translations.*`, `keys.*`, `languages.view`). Copy the `tgpak_…`.\n\n### 3. Configure the app\n\n```bash\ncd app\nnpm install\n```\n\nEdit `app/.tolgeerc.json` — set `projectId` to yours.\n\nCreate `app/.env`:\n\n```dotenv\nVITE_APP_TOLGEE_API_URL=http://localhost:8200\nVITE_APP_TOLGEE_API_KEY=tgpak_xxxxxxxxxxxx\n```\n\n### 4. Push the bundled translations to Tolgee\n\n```bash\nTOLGEE_API_KEY=tgpak_xxxxxxxxxxxx npm run i18n:push\n```\n\nUploads ~47 keys from `app/src/i18n/{en,de}/*.json`.\n\n\u003e Always use the CLI, not the web Import. Tolgee's web import infers language from the filename, but our JSONs use folder-per-language (`en/dashboard.json`) — the CLI takes language from `.tolgeerc.json` and avoids that ambiguity.\n\n### 5. Run the app\n\n```bash\nnpm run dev                 # http://localhost:3000\n```\n\nLog in with anything. Switch EN ↔ DE in the header. **Hold `Alt` and click any text** to edit translations in place — changes save to the Tolgee server.\n\n## Daily workflow\n\n| Task                     | Command                             |\n| ------------------------ | ----------------------------------- |\n| Push local JSON → Tolgee | `TOLGEE_API_KEY= npm run i18n:push` |\n| Pull Tolgee → local JSON | `TOLGEE_API_KEY= npm run i18n:pull` |\n| Run app                  | `npm run dev`                       |\n\nSet `TOLGEE_API_KEY` in your shell profile to skip the prefix.\n\n## Translation files\n\n```\napp/src/i18n/\n├── en/{app,nav,header,language,common,login,dashboard,users}.json\n└── de/(same)\n```\n\nEach file owns one top-level namespace, e.g. `dashboard.json`:\n\n```json\n{ \"dashboard\": { \"title\": \"...\", \"card\": { \"users\": \"...\" } } }\n```\n\nThe Vite loader in `app/src/lib/tolgee.ts` discovers files via `import.meta.glob`, so adding a new namespace is just two new JSON files (one per language) — no registry changes.\n\n## Using translations in code\n\n```tsx\nimport { useTranslate } from \"@tolgee/react\";\n\nconst { t } = useTranslate();\nreturn \u003ch1\u003e{t(\"dashboard.title\")}\u003c/h1\u003e;\n```\n\nEvery user-facing string must come from `t()` — see `.claude/rules/layout-styling.md`.\n\n## Adding a new namespace\n\n1. Create `app/src/i18n/en/\u003cname\u003e.json` and `app/src/i18n/de/\u003cname\u003e.json`.\n2. Use `t('\u003cname\u003e.someKey')` in components.\n3. `npm run i18n:push`.\n\n## Without an API key\n\nIf `app/.env` has no `VITE_APP_TOLGEE_API_KEY`, the app still works — it uses the bundled static JSON. DevTools / in-context editing simply turn off.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquochuydev%2Ftolgee-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquochuydev%2Ftolgee-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquochuydev%2Ftolgee-poc/lists"}