Initial scaffold: unified customer/insurance/utilities platform

Next.js + NestJS + Prisma (MySQL) monorepo replacing the legacy PHP
internal app. Includes a session-based auth module with Argon2 password
hashing and global input validation (replacing the old app's SQL
injection and plaintext password comparison), the full target Prisma
schema for customers/insurance/utilities/shared ledger/bank register,
Docker Compose + Dockerfiles, and an Access-to-staging migration
pipeline (migration/) already run against the real source databases.

See PLAN.md and RESUME.md for the full architecture and session history.
This commit is contained in:
2026-07-22 01:29:56 -07:00
commit 27118f0df2
39 changed files with 10341 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
FROM node:20-alpine AS base
WORKDIR /repo
FROM base AS deps
COPY package.json package-lock.json* ./
COPY apps/api/package.json apps/api/package.json
COPY packages/database/package.json packages/database/package.json
RUN npm install --workspace=packages/database --workspace=apps/api --no-audit --no-fund
FROM deps AS build
COPY packages/database packages/database
COPY apps/api apps/api
RUN npm run generate -w packages/database
RUN npm run build -w apps/api
FROM node:20-alpine AS runtime
WORKDIR /repo
ENV NODE_ENV=production
COPY --from=build /repo/node_modules node_modules
COPY --from=build /repo/packages/database packages/database
COPY --from=build /repo/apps/api/dist apps/api/dist
COPY --from=build /repo/apps/api/package.json apps/api/package.json
EXPOSE 3001
CMD ["node", "apps/api/dist/main.js"]
+20
View File
@@ -0,0 +1,20 @@
FROM node:20-alpine AS base
WORKDIR /repo
FROM base AS deps
COPY package.json package-lock.json* ./
COPY apps/web/package.json apps/web/package.json
RUN npm install --workspace=apps/web --no-audit --no-fund
FROM deps AS build
COPY apps/web apps/web
RUN npm run build -w apps/web
FROM node:20-alpine AS runtime
WORKDIR /repo
ENV NODE_ENV=production
COPY --from=build /repo/node_modules node_modules
COPY --from=build /repo/apps/web apps/web
EXPOSE 3000
WORKDIR /repo/apps/web
CMD ["npx", "next", "start"]