How ad-on-is/rachoon works
Project type and purpose
• This is a full-stack, self-hosted invoicing platform (“Rachoon”) built as a monorepo (pnpm/Turbo).
• Frontend: Nuxt.js SPA/SSR.
• Backend: AdonisJS REST/JSON API.
• Database: PostgreSQL.
• External PDF service: Gotenberg.
File structure
• Top-level “apps” folder houses two deployable services:
• apps/frontend → Nuxt.js application
• apps/backend → AdonisJS application
• “packages/common” holds shared TypeScript models and utilities.
• Root contains Dockerfiles, docker-compose.yaml, Caddyfile, entrypoint, workspace configs (pnpm/turbo).
• Backend follows MVC: Controllers, Models, Services, Validators, Middleware.
• Frontend is component-based (Vue components, composables, pages, plugins, layouts).
Extract key details from the README
• Confirms tech stack: Nuxt.js, AdonisJS, PostgreSQL, Gotenberg, Docker.
• Deployment via Docker Compose with three containers: rachoon (backend+frontend?), gotenberg, postgres.
• Emphasizes self-hosted, API-driven invoicing, templating via nunjucks.
Components and interactions
a. Main components
• Browser / User Agent
• Caddy (Reverse Proxy / TLS / Static assets)
• Nuxt.js Frontend (SSR/API Proxy)
• AdonisJS Backend (REST API, Auth, Business Logic)
• PostgreSQL Database
• Gotenberg PDF Service
• Shared Library (packages/common)
b. Relationships & data flow
1. Browser → Caddy (HTTP/HTTPS)
2. Caddy → Nuxt (static assets & SSR)
3. Nuxt → AdonisJS (API calls: auth, CRUD on clients, invoices, templates)
4. AdonisJS → PostgreSQL (ORM/knex queries)
5. AdonisJS → Gotenberg (PDF rendering via HTTP)
6. AdonisJS & Nuxt both import/shared models from packages/common
c. Architectural patterns & principles
• Monorepo with shared domain models (DRY).
• Backend: MVC + Service layer + Middleware pipeline.
• Frontend: Component-driven architecture + composables/hooks.
• Reverse proxy pattern (Caddy).
• Containerized microservices for PDF & DB.
d. Key technologies
• Vue 3 / Nuxt 3, Pinia, Tailwind
• AdonisJS, TypeScript, Knex/Query Builder
• PostgreSQL
• Gotenberg (Dockerized)
• Docker Compose, Caddy, pnpm, TurboRepo