Monorepo Turborepo (pnpm workspaces) avec 3 packages :
- apps/web : SPA React 19 + Vite 8 + Tailwind v4 (CSS-first)
• TanStack Router (file-based, auto code-splitting), Query, Form
• Radix primitives bruts + CVA + clsx + tailwind-merge
• MSW pour mocker l'API tant qu'Adonis n'est pas branché
• Polices Bricolage Grotesque + Inter self-hostées via fontsource
• Tokens marque (rubis, cream, ink) exposés via @theme
• Primitives maison : Gem, Brand, Eyebrow, Button, Input, Field
• Route /login full flow : TanStack Form + Zod + mutation Query
- apps/api : Adonis 7 (kit api, scaffold via create-adonisjs)
• Auth access tokens (Bearer) — cf. ADR-017
• Tuyau core déjà câblé pour la génération de types
• Routes /api/v1/auth/{signup,login} + /api/v1/account/{profile,logout}
• Minimal — uniquement le pont front ↔ back
- packages/shared : types TS + schemas Zod + constantes
• Source unique de vérité partagée api ↔ web
• Domaines : User, Org, Auth, Client, Invoice, Plan
Tooling racine : Turbo, ESLint v9 flat, Prettier, husky, lint-staged.
CLAUDE.md et docs/decisions.md mis à jour avec ADR-014 à ADR-018
(stack, monorepo, PG existant, Bearer tokens, MinIO existant)
et le pointeur vers docs/tech/architecture.md.
Logo Rubis déplacé de landing/assets/ vers /assets/ (source unique
réutilisée par la landing et l'app).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
/*
|
|
|--------------------------------------------------------------------------
|
|
| Ace entry point
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| The "console.ts" file is the entrypoint for booting the AdonisJS
|
|
| command-line framework and executing commands.
|
|
|
|
|
| Commands do not boot the application, unless the currently running command
|
|
| has "options.startApp" flag set to true.
|
|
|
|
|
*/
|
|
|
|
await import('reflect-metadata')
|
|
const { Ignitor, prettyPrintError } = await import('@adonisjs/core')
|
|
|
|
/**
|
|
* URL to the application root. AdonisJS need it to resolve
|
|
* paths to file and directories for scaffolding commands
|
|
*/
|
|
const APP_ROOT = new URL('../', import.meta.url)
|
|
|
|
/**
|
|
* The importer is used to import files in context of the
|
|
* application.
|
|
*/
|
|
const IMPORTER = (filePath: string) => {
|
|
if (filePath.startsWith('./') || filePath.startsWith('../')) {
|
|
return import(new URL(filePath, APP_ROOT).href)
|
|
}
|
|
return import(filePath)
|
|
}
|
|
|
|
new Ignitor(APP_ROOT, { importer: IMPORTER })
|
|
.tap((app) => {
|
|
app.booting(async () => {
|
|
await import('#start/env')
|
|
})
|
|
app.listen('SIGTERM', () => app.terminate())
|
|
app.listenIf(app.managedByPm2, 'SIGINT', () => app.terminate())
|
|
})
|
|
.ace()
|
|
.handle(process.argv.splice(2))
|
|
.catch((error) => {
|
|
process.exitCode = 1
|
|
prettyPrintError(error)
|
|
})
|