How crivano/apoia works
Project type and purpose
• This is a full-stack Next.js 13 application using the app/ directory for both client and server components.
• It provides a React-based UI (app/*.tsx, components/) and also implements API routes (app/api/…).
• It integrates AI services (lib/ai), PDF generation (lib/pdf), legal data interop (lib/interop), and a MySQL/Postgres database (lib/db + migrations).
• It uses NextAuth/Keycloak for authentication (app/auth/*, app/api/auth), Swagger/OpenAPI for documentation, and is deployed with Docker, GitLab CI/CD, and Kubernetes.
File structure
• Top-level “app/” folder: contains Next.js pages & API routes.
– app/page.tsx, app/layout.tsx: root layout
– app/abusive-litigation, app/arena, app/community, app/process, etc: domain-specific pages
– app/api/*: server-side API routes (REST endpoints under various versions)
• components/: shared React UI components
• lib/: core libraries for AI, database access, interop, PDF templating, utilities
• migrations/, seeds/: database schema and seed files for MySQL and Postgres
• Dockerfile, docker-compose.yaml, .gitlab-ci.yml, kubernetes/: containerization & deployment
• next-swagger-doc.json, public/swagger.json: OpenAPI specs
(empty) README for missing architecture notes
• The presence of kubernetes/overlays and Docker means you must represent container orchestration and CI/CD flow.