[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82107":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":15,"starSnapshotCount":15,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},82107,"labas-bahasa","rogasper\u002Flabas-bahasa","rogasper","Labas (Latihan Bahasa) merupakan platform latihan bahasa untuk persiapan IELTS, TOEFL, JLPT, dll","https:\u002F\u002Flabas.rogasper.com",null,"TypeScript",80,14,22,0,1,8,46,3,54.13,"GNU Affero General Public License v3.0",false,"main",true,[26,27],"open-source","typescript","2026-06-12 04:01:37","\u003Cp align=\"center\">\n  \u003Cimg src=\".\u002Fapps\u002Fweb\u002Fpublic\u002Flogo.png\" alt=\"Labas\" width=\"200\" \u002F>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">Labas\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>AI-powered multi-language test practice platform\u003C\u002Fstrong>\u003Cbr \u002F>\n  Generate authentic exam questions, run mock tests, and track your progress — all in one place.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"#getting-started\">Getting Started\u003C\u002Fa> ·\n  \u003Ca href=\"#features\">Features\u003C\u002Fa> ·\n  \u003Ca href=\"#supported-exams\">Exams\u003C\u002Fa> ·\n  \u003Ca href=\"#project-structure\">Structure\u003C\u002Fa> ·\n  \u003Ca href=\"#support\">Support\u003C\u002Fa> ·\n  \u003Ca href=\"#license\">License\u003C\u002Fa>\n\u003C\u002Fp>\n\n---\n\n## What is Labas?\n\n**Labas** is an open-source platform for practicing foreign-language proficiency exams. Users can generate reading (and writing) questions with AI, save them into question packages, take timed mock tests, and review results with explanations in **Bahasa Indonesia** (foreign script such as kanji, hanzi, hangul, or Arabic may appear when relevant).\n\nThe project is a **Turborepo monorepo** managed with **Bun**. The web app talks to a **Hono + tRPC** backend backed by **PostgreSQL**, **Redis** (job queue), and **Better Auth**.\n\n## Features\n\n- **AI question generation** — Quick mode (single-pass) and Agentic mode (multi-step pipeline with passage validation and quality checks)\n- **8 exam types** — IELTS, TOEFL, JLPT, HSK, Goethe, TOPIK, TOAFL, DELE\n- **20+ question formats** — Multiple choice, true\u002Ffalse\u002Fnot given, fill-in-blank, kanji reading, matching, and more\n- **Question bank & packages** — Organize generated questions into shareable or private packages\n- **Mock tests & attempts** — Timed practice sessions with scoring and review\n- **Analytics & leaderboard** — Track performance over time\n- **User-managed AI keys** — Bring your own OpenAI-compatible API key via Settings (never hardcoded in server env)\n- **Credit system** — Token-based usage tracking for AI generation\n- **Admin panel** — User management, moderation, jobs, credits, and featured content\n- **PWA** — Installable progressive web app\n- **Accessible UI** — Shared shadcn\u002Fui components with skip links, proper ARIA, and focus management\n\n## Supported Exams\n\n| Exam | Language | Notes |\n|------|----------|-------|\n| IELTS Academic | English | Reading & Writing sections |\n| TOEFL iBT | English | Reading & Writing sections |\n| JLPT | Japanese | Kanji annotations supported (`漢字(かんじ)`) |\n| HSK | Chinese | |\n| Goethe-Zertifikat | German | |\n| TOPIK | Korean | Particles, honorifics, speech levels |\n| TOAFL | Arabic | RTL text support |\n| DELE | Spanish | Verb conjugation focus |\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|------------|\n| Runtime & package manager | [Bun](https:\u002F\u002Fbun.sh) 1.3+ |\n| Frontend | React 19, Vite, [TanStack Router](https:\u002F\u002Ftanstack.com\u002Frouter) |\n| Backend | [Hono](https:\u002F\u002Fhono.dev), [tRPC](https:\u002F\u002Ftrpc.io) |\n| Database | PostgreSQL + [Drizzle ORM](https:\u002F\u002Form.drizzle.team) |\n| Queue | Redis + BullMQ (AI generation jobs) |\n| Auth | [Better Auth](https:\u002F\u002Fwww.better-auth.com) (email\u002Fpassword) |\n| UI | [shadcn\u002Fui](https:\u002F\u002Fui.shadcn.com) in `packages\u002Fui` |\n| AI | OpenAI-compatible API (`packages\u002Fai`) |\n| Build | Turborepo + tsdown |\n\n## Prerequisites\n\n- **[Bun](https:\u002F\u002Fbun.sh)** `1.3.11` or later (see `packageManager` in root `package.json`)\n- **PostgreSQL** 15+\n- **Redis** 7+ (required for background AI generation jobs)\n- **SMTP server** (required for email verification and password reset)\n\n> Use `bun` for all install and script commands. Do not use `pnpm`, `npm`, or `yarn` unless a global tool explicitly requires it.\n\n## Getting Started\n\n### 1. Clone and install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002F\u003Cyour-org>\u002Flabas.git\ncd labas\nbun install\n```\n\n### 2. Start PostgreSQL and Redis\n\nThe repo includes a Docker Compose file for local development:\n\n```bash\nbun run db:start\n```\n\nThis starts PostgreSQL on port `5432` and Redis on port `6379`. See [`packages\u002Fdb\u002Fdocker-compose.yml`](.\u002Fpackages\u002Fdb\u002Fdocker-compose.yml) for defaults.\n\nAlternatively, point `DATABASE_URL` and `REDIS_URL` at your own instances.\n\n### 3. Configure environment\n\nCopy the example env files:\n\n```bash\ncp apps\u002Fserver\u002F.env.example apps\u002Fserver\u002F.env\ncp apps\u002Fweb\u002F.env.example apps\u002Fweb\u002F.env\n```\n\nEdit **`apps\u002Fserver\u002F.env`**:\n\n```env\n# PostgreSQL (matches docker-compose defaults)\nDATABASE_URL=postgresql:\u002F\u002Fpostgres:password@localhost:5432\u002Flabas\n\n# Redis (defaults to redis:\u002F\u002Flocalhost:6379 if omitted)\nREDIS_URL=redis:\u002F\u002Flocalhost:6379\n\n# Auth — generate random strings ≥ 32 characters\nBETTER_AUTH_SECRET=your-random-secret-at-least-32-chars\nBETTER_AUTH_URL=http:\u002F\u002Flocalhost:3000\nCORS_ORIGIN=http:\u002F\u002Flocalhost:3001\n\n# Encrypts user AI API keys at rest — ≥ 32 characters\nAPI_KEY_ENCRYPTION_KEY=your-encryption-key-at-least-32-chars\n\n# SMTP (required for sign-up verification & password reset)\nSMTP_HOST=smtp.example.com\nSMTP_PORT=587\nSMTP_USER=your-smtp-user\nSMTP_PASS=your-smtp-password\nSMTP_FROM=noreply@example.com\n\n# Optional: platform-wide AI fallback (users normally set keys in Settings UI)\n# PLATFORM_AI_API_KEY=\n# PLATFORM_AI_BASE_URL=\n# PLATFORM_AI_MODEL=\n```\n\nEdit **`apps\u002Fweb\u002F.env`**:\n\n```env\nVITE_SERVER_URL=http:\u002F\u002Flocalhost:3000\n```\n\n### 4. Push database schema\n\n```bash\nbun run db:push\n```\n\nOptionally seed reference data (exam types, sections):\n\n```bash\nbun run db:seed\n```\n\n### 5. Run the dev servers\n\n```bash\nbun run dev\n```\n\n| Service | URL |\n|---------|-----|\n| Web app | [http:\u002F\u002Flocalhost:3001](http:\u002F\u002Flocalhost:3001) |\n| API server | [http:\u002F\u002Flocalhost:3000](http:\u002F\u002Flocalhost:3000) |\n\nSign up, verify your email, then open **Settings** to add your OpenAI-compatible API key before generating questions.\n\n## AI Configuration\n\nAI provider keys are **not** stored in server `.env` by default. Each user configures their own key in the **Settings** page. The server encrypts keys with `API_KEY_ENCRYPTION_KEY`.\n\nGeneration supports any **OpenAI-compatible** endpoint (OpenAI, OpenRouter, local LM Studio, etc.).\n\nTwo generation modes are available:\n\n| Mode | Description |\n|------|-------------|\n| **Quick** | Single LLM call with schema validation and repair |\n| **Agentic** | Multi-step pipeline: plan → shared passage → parallel question shards → validation |\n\nAI logic lives in [`packages\u002Fai\u002F`](.\u002Fpackages\u002Fai\u002F).\n\n## Project Structure\n\n```\nlabas\u002F\n├── apps\u002F\n│   ├── web\u002F              # Frontend (React + TanStack Router) — port 3001\n│   └── server\u002F           # Backend entry (Hono + tRPC) — port 3000\n├── packages\u002F\n│   ├── ai\u002F               # Prompts, schemas, quick & agentic pipelines\n│   ├── api\u002F              # tRPC routers, queue workers, business logic\n│   ├── auth\u002F             # Better Auth configuration\n│   ├── config\u002F           # Shared TypeScript configs\n│   ├── db\u002F               # Drizzle schema, migrations, docker-compose\n│   ├── env\u002F              # Environment validation (Zod)\n│   └── ui\u002F               # Shared shadcn\u002Fui components & design tokens\n├── AGENTS.md             # Contributor guide for AI agents & developers\n└── turbo.json\n```\n\nInternal imports use the `@labas\u002F*` workspace namespace. Apps should not import from each other directly — share code through `packages\u002F*`.\n\n## Available Scripts\n\nRun from the **repository root**:\n\n| Command | Description |\n|---------|-------------|\n| `bun run dev` | Start web + server in development |\n| `bun run dev:web` | Start web app only |\n| `bun run dev:server` | Start server only |\n| `bun run build` | Build all packages |\n| `bun run check-types` | TypeScript check across the monorepo |\n| `bun test` | Run all tests via Turborepo |\n| `bun run db:push` | Push Drizzle schema to PostgreSQL |\n| `bun run db:generate` | Generate migration files |\n| `bun run db:migrate` | Run migrations |\n| `bun run db:seed` | Seed reference data (exam types, sections) |\n| `bun run db:studio` | Open Drizzle Studio |\n| `bun run db:start` | Start PostgreSQL + Redis (Docker Compose) |\n| `bun run db:stop` | Stop Docker Compose services |\n\n## Deployment\n\nProduction deploys use **two Coolify applications** from this repo (web + API server), plus **PostgreSQL** and **Redis**. The server does not serve the frontend build; the web app calls the API via `VITE_SERVER_URL`.\n\nSee **[`deploy\u002FCOOLIFY.md`](.\u002Fdeploy\u002FCOOLIFY.md)** for step-by-step Coolify setup, environment variables, Nixpacks configs (`deploy\u002Fserver.nixpacks.toml`, `deploy\u002Fweb.nixpacks.toml`), and a first-deploy checklist.\n\n## Development\n\n### Type checking\n\n```bash\nbun run check-types\n```\n\n### Testing\n\n```bash\nbun test\n```\n\nTests use **Bun's built-in test runner**. Unit tests live in `src\u002F__tests__\u002F` within each package. Integration tests in `packages\u002Fapi` use PGlite (in-memory PostgreSQL).\n\n### Adding shadcn\u002Fui components\n\nFrom the project root:\n\n```bash\nnpx shadcn@latest add accordion dialog -c packages\u002Fui\n```\n\nImport shared components:\n\n```tsx\nimport { Button } from \"@labas\u002Fui\u002Fcomponents\u002Fbutton\";\n```\n\nDesign tokens and global styles: [`packages\u002Fui\u002Fsrc\u002Fstyles\u002Fglobals.css`](.\u002Fpackages\u002Fui\u002Fsrc\u002Fstyles\u002Fglobals.css).\n\n### PWA assets\n\n```bash\ncd apps\u002Fweb && bun run generate-pwa-assets\n```\n\n## Contributing\n\nContributions are welcome! Before opening a PR:\n\n1. Read [`AGENTS.md`](.\u002FAGENTS.md) for architecture, conventions, and common pitfalls.\n2. Run `bun run check-types` and `bun test`.\n3. Keep changes focused and match existing code style.\n\nFor AI-related changes, see the **AI Generation Context** section in `AGENTS.md` — adding a new question format touches schemas, prompts, attempt normalization, and frontend constants.\n\n## Support\n\nIf you find Labas helpful and want to support its ongoing development, consider buying the creator a coffee! Your support helps cover API and hosting costs. ☕\n\n- **[Saweria](https:\u002F\u002Fsaweria.co\u002Frogasper)** (Indonesian supporters)\n- **[Ko-fi](https:\u002F\u002Fko-fi.com\u002Frogasper)** (International)\n\n## License\n\nThis project is licensed under the **[GNU Affero General Public License v3.0 (AGPL-3.0)](.\u002FLICENSE)**.\n\nIf you run a modified version as a network service, you must make the corresponding source code available to users of that service.\n\n---\n\n\u003Cp align=\"center\">\n  Built with Bun, React, Hono, and tRPC.\n\u003C\u002Fp>\n","Labas 是一个基于AI的多语言考试练习平台，专为准备IELTS、TOEFL、JLPT等语言考试而设计。该项目使用TypeScript编写，具备AI生成题目、模拟测试、进度跟踪等功能，并支持包括英语、日语、汉语在内的多种语言考试。其技术栈包括Bun作为运行时和包管理器，React构建前端界面，Hono与tRPC组合提供后端服务，PostgreSQL用于数据存储，Redis处理作业队列，同时采用Better Auth进行用户认证。Labas适用于需要提高外语水平并通过相关国际认证考试的学习者，特别是那些希望通过实战演练来增强应试技巧的人群。此外，它还提供了一个可安装的PWA版本以及易于访问的用户界面设计，使得学习过程更加便捷高效。",2,"2026-06-11 04:07:46","CREATED_QUERY"]