Phase 1 scaffold: auth for all apps
- Backend: Fastify with two listeners (public + internal), routes, services, DB migration + seed - client_app: Flutter with BLoC, all auth screens (welcome, display name, register, OTP, force-register) - mitra_app: Flutter with BLoC, OTP-only login - control_center: React + Vite, email/password login, mitra/user management, anonymity settings - Docs: phase1 plan, API contract, client app mockup - CLAUDE.md and shared memory for all subprojects Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
23
backend/src/app.internal.js
Normal file
23
backend/src/app.internal.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import Fastify from 'fastify'
|
||||
import sensible from '@fastify/sensible'
|
||||
import { mitraManagementRoutes } from './routes/internal/mitra.routes.js'
|
||||
import { ccUserRoutes } from './routes/internal/cc-user.routes.js'
|
||||
import { rolesRoutes } from './routes/internal/roles.routes.js'
|
||||
import { internalAuthRoutes } from './routes/internal/auth.routes.js'
|
||||
import { internalConfigRoutes } from './routes/internal/config.routes.js'
|
||||
import { errorHandler } from './plugins/error-handler.js'
|
||||
|
||||
export const buildInternalApp = async () => {
|
||||
const app = Fastify({ logger: true })
|
||||
|
||||
await app.register(sensible)
|
||||
app.setErrorHandler(errorHandler)
|
||||
|
||||
app.register(internalAuthRoutes, { prefix: '/internal/auth' })
|
||||
app.register(mitraManagementRoutes, { prefix: '/internal/mitras' })
|
||||
app.register(ccUserRoutes, { prefix: '/internal/control-center-users' })
|
||||
app.register(rolesRoutes, { prefix: '/internal/roles' })
|
||||
app.register(internalConfigRoutes, { prefix: '/internal/config' })
|
||||
|
||||
return app
|
||||
}
|
||||
Reference in New Issue
Block a user