refactor: migrate backend to pnpm monorepo with Hono module architecture
- Replace Bun with pnpm 9 + Turborepo + tsx; apps/api renamed to apps/backend - Split backend into http/, modules/, lib/ layers mirroring tai-specguard - Add use-case + Result pattern, Problem Details RFC 7807, basePath /api/v1 - Mount Better Auth at /api/v1/auth, keep session-auth whitelist - Split Prisma schema into prisma/models/*, generate into generated/ - Rework packages/shared into lib/ + schemas/ with pagination DTOs - Implement health, groups, students, payments, waitlist modules - Add vitest suite with prisma mocks (21 tests), biome lint - Point web client to /api/v1/auth and /api/v1/groups/from-organization
This commit is contained in:
@@ -22,9 +22,10 @@
|
||||
"react-dom": "^19.0.0",
|
||||
"react-hook-form": "^7.54.0",
|
||||
"tailwind-merge": "^3.6.0",
|
||||
"zod": "^3.24.0"
|
||||
"zod": "3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gruperly/config": "workspace:*",
|
||||
"@tailwindcss/vite": "^4.3.3",
|
||||
"@types/react": "^19.0.0",
|
||||
"@types/react-dom": "^19.0.0",
|
||||
|
||||
@@ -4,6 +4,7 @@ import { passkeyClient } from '@better-auth/passkey/client'
|
||||
|
||||
export const authClient = createAuthClient({
|
||||
baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:4000',
|
||||
basePath: '/api/v1/auth',
|
||||
plugins: [organizationClient(), passkeyClient()],
|
||||
})
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ function OrganizationList({ onRefresh }: { onRefresh: () => void }) {
|
||||
const handleSyncGroup = async (org: OrganizationRow) => {
|
||||
setSyncing(org.id)
|
||||
try {
|
||||
const res = await fetch(`${API_URL}/api/groups/from-organization`, {
|
||||
const res = await fetch(`${API_URL}/api/v1/groups/from-organization`, {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
credentials: 'include',
|
||||
|
||||
Reference in New Issue
Block a user