Core concepts
Detection Rules
1 min read
Lunadeck's AI engine uses a set of detection rules to identify your project's framework, toolchain, and build requirements.
Rule priority
Detection rules are evaluated in order of specificity:
- Explicit configuration —
lunadeck.config.jsontakes highest priority - Framework-specific markers —
next.config.js,capacitor.config.ts,pubspec.yaml, etc. - Package manager files —
package.json,pubspec.yaml,build.gradle - Directory structure — Presence of
android/,ios/,src/,pages/
Built-in rules
| Rule | Detects | Marker Files |
|---|---|---|
next | Next.js | next.config.* |
nuxt | Nuxt | nuxt.config.* |
capacitor | Capacitor | capacitor.config.* |
expo | Expo | app.json with expo key |
flutter | Flutter | pubspec.yaml with flutter dependency |
vite | Vite | vite.config.* |
angular | Angular | angular.json |
sveltekit | SvelteKit | svelte.config.js |
Rule evaluation
When multiple rules match, Lunadeck uses a scoring system to determine the most likely framework. The framework with the highest confidence score is selected.
Custom rules
You can define custom detection rules in lunadeck.config.json to override or extend the built-in rules. See Custom Overrides for details.