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>
45 lines
512 B
Plaintext
45 lines
512 B
Plaintext
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
|
|
# dependencies
|
|
/node_modules
|
|
/.pnp
|
|
.pnp.*
|
|
.yarn/*
|
|
!.yarn/patches
|
|
!.yarn/plugins
|
|
!.yarn/releases
|
|
!.yarn/versions
|
|
|
|
# testing
|
|
/coverage
|
|
|
|
# next.js
|
|
/.next/
|
|
/out/
|
|
|
|
# production
|
|
/build
|
|
|
|
# misc
|
|
.DS_Store
|
|
*.pem
|
|
|
|
# debug
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
.pnpm-debug.log*
|
|
|
|
# env files (can opt-in for committing if needed)
|
|
.env*
|
|
|
|
# vercel
|
|
.vercel
|
|
|
|
# typescript
|
|
*.tsbuildinfo
|
|
next-env.d.ts
|
|
|
|
/src/generated/prisma
|
|
.gstack/
|