You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: App-internal TypeScript path aliases must match the full apps/<name>/ directory name
globs:
- "apps/api/**/*.ts"
- "apps/management-api/**/*.ts"
- "apps/api/tsconfig*.json"
- "apps/management-api/tsconfig*.json"
- "apps/api/vitest.config.ts"
- "apps/management-api/vitest.config.ts"
alwaysApply: false
---
# App internal import aliases
Node apps under `apps/` use a **TypeScript path alias** for imports from their own `src/` tree. The alias prefix must match the **full app directory name** under `apps/` — not abbreviations.
Configure in each app's `tsconfig.json` `paths` and mirror the prefix root in `vitest.config.ts` for tests. When the build uses alias rewriting, keep `tsc` + alias rewrite aligned with dist output.
## Don't
- Do not abbreviate directory names (`@mgmt-api`, `@m-api`, etc.).
- Do not use npm workspace names (`@metaboost/api/*`) for in-app imports — those are for cross-package deps only.
## Distinction
- **`@metaboost/*`** — published/workspace packages under `packages/`
- **`@<app-dir-name>/*`** — internal imports within one deployable app
## Note
When adding or extending `paths` in an app, update this table if a new Node app is introduced under `apps/`.