How adodeveloper/sistema-demoras works
Project type and purpose
• This is a monolithic full-stack web application built with Next.js (App Router).
• It exposes React-based UI pages under src/app, a set of RESTful API endpoints under src/app/api, and uses Prisma as an ORM to persist data.
• Authentication is handled via NextAuth in src/app/api/auth and a custom lib/auth.js wrapper.
File structure
• Top-level modules:
• lib/ – helper modules (lib/prisma.js for the Prisma client; lib/auth.js for auth wrappers)
• prisma/ – database schema (schema.prisma), migrations, and seeds
• public/ – static assets
• src/app/ – Next.js App Router’s pages, layouts, and API routes
• src/components/ – shared React components (Header, Loader, PDF generators)
• src/context/ – React Context (SessionProvider)
• middleware.js – route middleware (auth checks, redirects)
• API routes are organized by resource (barcos, bitacoras, demoras, equipos, recepcion, roles, tickets, transportes, users, chat, etc.).
• Next.config.mjs, tsconfig.json, jsconfig.json, Tailwind and PostCSS configs handle build and styling.
Key insights from the README
• Created with create-next-app and uses next/font for font optimization.
• Standard Next.js development and deployment flows; intended for Vercel but portable to any Node host.