How kudith/notario works
Project type and purpose
• This is a full-stack Next.js application that provides a document signing and verification platform. Users can register, authenticate, upload documents, add QR codes, sign documents, verify signatures, and download completed files. The backend is implemented as Next.js App-Router API routes (serverless functions), and the frontend uses React components under the app/ directory.
File structure
• Top-level “app” directory holds both UI pages (app/page.js, app/register, app/sign, etc.) and the API routes under app/api/.
• API routes are organized by domain:
• auth (NextAuth adapter)
• register, verify-email, resend-verification
• user (profile, avatar, documents, settings)
• documents (upload, analyze, sign, verify, download, QR-code)
• Shared business logic lives in lib/ (e.g. lib/document-service.js, lib/auth-adapter.js, lib/google-drive.js, lib/cloudinary.js, lib/prisma.js).
• components/ holds all UI building blocks.
• prisma/schema.prisma defines the database model.
• middleware.js enforces auth on protected routes.
Essential architectural elements
– Do not list every single file; instead, represent each domain (auth, user, documents) as a single API cluster.
– Capture the service layer abstraction and the flow to both database and external services.
– Highlight that this is a serverless Next.js architecture with React front-end.