Commit Graph
3 Commits
Author SHA1 Message Date
jackyu66gitandClaude Opus 4.6 00db3f6c96 feat: custom JWT auth + i18n with Chinese default
Replace Clerk with self-contained JWT auth (bcryptjs + jose), remove all
external auth dependencies. Add full i18n system with Chinese as default
language and English toggle — React Context + JSON dictionaries, no
external i18n library.

Auth:
- Add passwordHash to User model, generate JWT secret
- Create /api/auth/register, login, logout, me endpoints
- Rewrite proxy.ts middleware for custom session validation
- Add AuthProvider + useAuth hook, sign-in/sign-up pages
- Wire auth into layout and all API routes

i18n:
- React Context I18nProvider with localStorage + cookie persistence
- dictionaries/zh.ts (default) and dictionaries/en.ts
- LanguageSwitcher component, server-side createServerT() utility
- CJK font stack via [lang="zh"] CSS selector
- HTML lang attribute synced on language change
- All pages, components, TabBar, StageBadge translated
- Engine fallback strings (reflection-analyzer, summary-generator)
- API routes pass locale from cookie to engines

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 22:47:14 +08:00
jackyu66gitandClaude Opus 4.6 4e83ce95cd Switch LLM provider to DeepSeek v4 Pro
- Create shared openai client (src/lib/openai.ts) pointing to api.deepseek.com
- Replace all gpt-4o-mini model references with deepseek-v4-pro
- Refactor 3 API routes to use shared client instead of inline OpenAI() calls
- Add OPENAI_BASE_URL env var for endpoint configuration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 12:45:25 +08:00
jackyu66gitandClaude Opus 4.6 cef29d40bd Initial commit: Inner OS v1
Full-stack inner development operating system built on Next.js 16 + Prisma 7 + PostgreSQL + OpenAI + Clerk.
Generates personalized daily mental training tasks, collects reflection, updates user state, and provides internal reward feedback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 12:11:27 +08:00