|
| 1 | +# GlobalOnboard · LingoHack25 ✨ |
| 2 | + |
| 3 | + |
| 4 | + **One onboarding checklist. Any language. Fully Configurable** |
| 5 | + HR writes once in English, and GlobalOnboard turns it into a polished, localized employee experience by combining **Lingo CLI**, **Lingo JavaScript SDK**, and **Lingo CI**. |
| 6 | + |
| 7 | + |
| 8 | +## 🧠 The MAIN Pillars of GlobalOnboard |
| 9 | + |
| 10 | +- **Real personas:** HR Workspace (authoring) + Employee Experience (preview) wired together in real time. |
| 11 | +- **Full Lingo toolchain:** Static JSON via CLI, runtime personalization via SDK, and CI automation so translations stay fresh. |
| 12 | +- **Enterprise-ready touches:** Translation QA mode, localization health warnings, onboarding pack export, and translation spinners that prove we’re production aware. |
| 13 | + |
| 14 | +### 🏅 Lingo Product Scorecard |
| 15 | + |
| 16 | +| Lingo product | How GlobalOnboard uses it | Why it matters | |
| 17 | + | --- | --- | --- | |
| 18 | + | **Lingo CLI** | Generates `data/ui.{locale}.json` and `data/onboarding_template.{locale}.json` from English sources via `npx lingo.dev@latest run`. | Demonstrates the official static localization workflow. | |
| 19 | + | **Lingo JavaScript SDK** | Translates the welcome note and every custom task at runtime with caching, spinners, and graceful fallbacks. | Shows dynamic personalization for each employee preview. | |
| 20 | + | **Lingo CI** | `.github/workflows/i18n.yml` runs `npx lingo.dev@latest ci --pull-request` whenever English JSON or `i18n.json` changes. | Proves translation automation and GitHub integration end-to-end. | |
| 21 | + |
| 22 | +--- |
| 23 | + |
| 24 | +## 🔑 Feature Highlights |
| 25 | + |
| 26 | +| Area | What it unlocks | Lingo capability | |
| 27 | +| --- | --- | --- | |
| 28 | +| HR Workspace | Edit company, role, welcome note, and a fully dynamic checklist (add/delete/modify tasks). | Authoring surface for English source | |
| 29 | +| Employee Experience | Switch between `en`, `es`, `fr`, `hi` previews with live updates + translation loading overlay. | CLI JSON + SDK runtime translations | |
| 30 | +| Preview Modes | `Employee view` or `Translation QA` (side-by-side EN vs target locale) with Machine → Edited → Approved overrides. | Human-in-the-loop QA | |
| 31 | +| Localization Health | Warns when translated copy is >1.5× English length, per task + summary. | QA signal | |
| 32 | +| Onboarding Pack Export | One click generates a `.doc` bundle for the current locale (company, role, tasks, welcome note). | HR enablement | |
| 33 | +| Lingo CI Workflow | GitHub Action auto-runs `lingo.dev ci` whenever English JSON changes. | Translation automation | |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## 🧩 Architecture At-a-Glance |
| 38 | + |
| 39 | +```text |
| 40 | +HR inputs ──▶ English JSON templates ──▶ Lingo CLI generates data/ui.{locale}.json |
| 41 | + │ │ |
| 42 | + │ └─▶ Lingo CI keeps translations up to date |
| 43 | + │ |
| 44 | + ├─▶ React state + localStorage overrides |
| 45 | + │ |
| 46 | + └─▶ Lingo JS SDK |
| 47 | + ├─ Welcome note runtime translation |
| 48 | + └─ Custom task translations (per locale) + caching |
| 49 | +``` |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +## 🧪 Getting Started (Local Dev) |
| 54 | + |
| 55 | +```bash |
| 56 | +git clone https://github.com/lingodotdev/lingo.dev.git |
| 57 | +cd lingo.dev/community/global-onboard |
| 58 | +npm install |
| 59 | + |
| 60 | +# Provide your API key so CLI + SDK can translate |
| 61 | +export LINGO_DOT_DEV_API_KEY="your-key" |
| 62 | +# Optional alias used by some shells/CLIs |
| 63 | +export LINGODOTDEV_API_KEY="$LINGO_DOT_DEV_API_KEY" |
| 64 | + |
| 65 | +npm run dev |
| 66 | +``` |
| 67 | + |
| 68 | +Visit **<http://localhost:3000>** — left panel is HR Workspace, right panel is the localized Employee preview. |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## 🌐 Localization Workflow Cheat Sheet |
| 73 | + |
| 74 | +### 1. Static JSON (Lingo CLI) |
| 75 | +- Source files: `data/ui.en.json`, `data/onboarding_template.en.json` |
| 76 | +- Configure targets in `i18n.json` |
| 77 | +- Generate translations: |
| 78 | + ```bash |
| 79 | + export LINGO_DOT_DEV_API_KEY="your-key" |
| 80 | + npx lingo.dev@latest run |
| 81 | + ``` |
| 82 | +- CI automation: `.github/workflows/i18n.yml` runs `npx lingo.dev@latest ci --pull-request` on every push to `main` touching English JSON or `i18n.json`. |
| 83 | + |
| 84 | +### 2. Runtime Personalization (Lingo JS SDK) |
| 85 | +- Welcome note + any **custom tasks** run through `lib/lingo-client.ts`. |
| 86 | +- We cache translations per locale, show a loading spinner overlay, and gracefully fall back to English if the SDK errors. |
| 87 | + |
| 88 | +### 3. Translation QA Mode |
| 89 | +- Side-by-side English vs target locale. |
| 90 | +- Inline editing with Machine → Edited → Approved chips. |
| 91 | +- Reset/Unlock controls to manage overrides. |
| 92 | +- Length-based warnings + summary so HR spots risky strings fast. |
| 93 | +- Overrides feed every other view (single preview + export). |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## 📦 Onboarding Pack Export |
| 98 | + |
| 99 | +1. Choose a locale via the Employee panel dropdown. |
| 100 | +2. Ensure QA overrides are final (Approved if needed). |
| 101 | +3. Click **Download Onboarding Pack** → generates `onboarding-pack-<locale>.doc` with: |
| 102 | + - Locale code |
| 103 | + - Localized company + role |
| 104 | + - Welcome note (SDK translation if non-English) |
| 105 | + - Full task list using effective text (overrides or machine) |
| 106 | + |
| 107 | +Perfect for HRIS uploads, emails, or sharing with managers. |
| 108 | + |
| 109 | +--- |
| 110 | + |
| 111 | +## 🛠 Tech Stack |
| 112 | + |
| 113 | +- **Next.js 16** (App Router, TypeScript) |
| 114 | +- **Tailwind CSS 4** (custom gradient + glassmorphism theme) |
| 115 | +- **Lingo.dev CLI, JS SDK, CI** |
| 116 | +- **next-themes** + custom design tokens for dark-first UI |
| 117 | +- **GitHub Actions** for automated localization runs |
| 118 | + |
| 119 | +--- |
| 120 | + |
| 121 | +## 📁 Project Structure |
| 122 | + |
| 123 | +```text |
| 124 | +app/ |
| 125 | + layout.tsx # Root metadata + ThemeProvider |
| 126 | + page.tsx # HR + Employee panels, QA, overrides, spinner |
| 127 | + globals.css # Tailwind layers + design tokens |
| 128 | +components/ |
| 129 | + mode-toggle.tsx # Shadcn-style theme toggle (hidden by default) |
| 130 | +data/ |
| 131 | + ui.*.json # Static UI translations (CLI managed) |
| 132 | + onboarding_template.*.json |
| 133 | +lib/ |
| 134 | + i18n.ts # Typed loaders for JSON bundles |
| 135 | + lingo-client.ts # SDK setup + runtime translation helpers |
| 136 | +.github/workflows/ |
| 137 | + i18n.yml # CI job running `lingo.dev ci` |
| 138 | +i18n.json # Bucket + locale configuration |
| 139 | +``` |
| 140 | + |
| 141 | +--- |
| 142 | + |
| 143 | +## 🧾 Useful Scripts |
| 144 | + |
| 145 | +- `npm run dev` – Next.js dev server |
| 146 | +- `npm run build` – Production build |
| 147 | +- `npm run lint` – ESLint via `eslint-config-next` |
| 148 | + |
| 149 | +--- |
| 150 | + |
| 151 | +## ✅ Hackathon Compliance & Notes |
| 152 | + |
| 153 | +- All code, UI, and assets created fresh during **LingoHack25**. |
| 154 | +- API keys are required only for translation features; none are checked into the repo. |
| 155 | +- Want more locales? Add them to `SUPPORTED_LOCALES` + `i18n.json`, re-run the CLI, and you’re done. |
| 156 | + |
| 157 | +--- |
| 158 | + |
| 159 | +### 💬 Questions for Judges? |
| 160 | +Open an issue or ping me — I'd love to show how GlobalOnboard can become the multilingual onboarding cockpit for any global company. |
0 commit comments