How ihatenodejs/librecloud-web works
Project Type and Purpose
• This repository is a full-stack Next.js application serving as the public website, user dashboard, and JSON API for LibreCloud.
• The “app” directory contains both React/SSR pages (Next.js 13+ “app router”) and a collection of serverless API endpoints under app/api.
• It integrates user authentication (NextAuth), database persistence (Prisma), and external services (SMTP, Git/Gitea, Nextcloud, OTP/captcha).
High-Level File-Structure Analysis
• Top-level “app/” – Next.js pages & layouts, subdivided into “account” (dashboard + login/signup flows), “api” (REST routes), and “legal” (privacy/terms).
• “components/” – reusable UI primitives (components/ui), page-specific composites, and dashboard cards.
• “lib/” – business-logic helpers (email, OTP, Prisma client, Nextcloud integration).
• “prisma/” – database schema and migration definitions, used by Prisma ORM.
• Deployment/configuration: Dockerfile, docker-compose.yml, GitHub Actions workflow, environment configs (next.config.ts, .env).
Key Functionality from README
• Hosts the main marketing site (Hero, Pricing, Docs links).
• Provides a secure dashboard allowing users to manage accounts, link Git repos, generate OTPs, view statistics, download resources, and adjust settings.
• Exposes a REST-style API for auth, user management, mail/password resets, captcha issuance, and Git linking/unlinking.