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:

  1. Explicit configurationlunadeck.config.json takes highest priority
  2. Framework-specific markersnext.config.js, capacitor.config.ts, pubspec.yaml, etc.
  3. Package manager filespackage.json, pubspec.yaml, build.gradle
  4. Directory structure — Presence of android/, ios/, src/, pages/

Built-in rules

RuleDetectsMarker Files
nextNext.jsnext.config.*
nuxtNuxtnuxt.config.*
capacitorCapacitorcapacitor.config.*
expoExpoapp.json with expo key
flutterFlutterpubspec.yaml with flutter dependency
viteVitevite.config.*
angularAngularangular.json
sveltekitSvelteKitsvelte.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.