Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alexspeller/0b043bf3da94e0d5e8a10e61bd5081f2 to your computer and use it in GitHub Desktop.
Save alexspeller/0b043bf3da94e0d5e8a10e61bd5081f2 to your computer and use it in GitHub Desktop.
Aspect Advantages Drawbacks / Mitigations
Single tsconfig One TS project → imports @/backend/... & @/frontend/... just work. Adonis needs slightly looser TS settings (es2022 libs, node types) than the PWA; solve with tsconfig.backend.json extending the root config. Vite still uses root.
No package duplication Keep one package.json / yarn.lock; dedupe devDeps. Adonis’s CLI expects its own dependencies. Prefix backend‐only deps with /* backend */ comment to keep clarity or move them to dependencies.
Simple import paths import { set } from "@/api/models/set" works both sides. Must avoid importing browser-only libs in backend folders; TypeScript path aliases + ESLint plugin “no-browser-imports” for /backend.
Shared scripts npm run dev:full can concurrently start node ace serve --watch and vite. Vite & Adonis both watch; heavy CPU while both build – mitigated by esbuild + polling off.
CI/CD One pipeline. Back-end & front-end tests intermixed; use “tags” in Vitest/Japa configs.
Adonis folder re-map .adonisrc.json: { "directories": { "app": "../../src/backend", "config": "../../config" }}. Works fine. Ace generators generate files in mapped folder; ok.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment