LingYan is a mobile-first AI oracle for intent, place, and native navigation handoff.
It turns a short human intention into a safe, reachable city coordinate, then hands the destination to Amap for the real navigation experience. LingYan is designed to run as a mobile PWA: open it in a phone browser, add it to the Home Screen, and use it like a lightweight app without App Store distribution.
Most navigation apps start with a destination. LingYan starts with a thought.
"I need inspiration."
"I want a quiet place."
"Take me somewhere that fits this moment."
LingYan interprets the intent, picks a public and approachable location nearby, creates a short "micro-action" prompt, and opens Amap for native navigation. LingYan does not try to clone a full navigation app in the browser.
flowchart TD
A["User enters an intention"] --> B["Browser location"]
B --> C["Intent classification"]
C --> D["Safe coordinate generation"]
D --> E["Oracle result card"]
E --> F["Amap route preview"]
E --> G["Start navigation"]
G --> H{"Amap app opens?"}
H -->|Yes| I["Native Amap navigation"]
H -->|No| J["Install Amap / copy coordinate"]
| Area | Status | Notes |
|---|---|---|
| Intent input | ✅ | Short intention-based interaction |
| Location access | ✅ | Browser geolocation with demo fallback |
| Coordinate generation | ✅ | Deterministic safe-public-location style MVP |
| Map display | ✅ | Leaflet fallback and Amap route view |
| Amap route planning | ✅ | Walking and driving previews, transit handed to Amap App |
| Native Amap handoff | ✅ | iOS and Android/Huawei deeplink attempts |
| Amap install fallback | ✅ | Device-aware install and copy-coordinate fallback |
| PWA install support | ✅ | Manifest, icon, iOS meta tags, service worker |
| Background navigation | ❌ | Not promised in PWA mode |
| App Store distribution | ❌ | Intentionally not required for MVP |
flowchart LR
UI["React UI"] --> App["App state"]
App --> Intent["Intent logic"]
App --> Oracle["Oracle generation"]
App --> Map["Map components"]
Map --> Amap["Amap JS API"]
App --> Nav["Navigation launcher"]
Nav --> Native["Amap iOS / Android deeplink"]
Nav --> Fallback["Install/copy fallback"]
| Layer | Choice |
|---|---|
| Language | TypeScript |
| UI | React 18 |
| Build | Vite |
| Map fallback | Leaflet |
| Route provider | Amap JS API |
| PWA | Web App Manifest + Service Worker |
| Native navigation | Amap app deeplink on iOS and Android/Huawei |
npm install
npm run devBuild production assets:
npm run buildPreview the production build:
npm run previewLingYan can be deployed to Cloudflare Pages without owning or maintaining a server.
| Setting | Value |
|---|---|
| Project name | lingyan-mvp |
| Production branch | main |
| Framework preset | Vite |
| Build command | npm run build |
| Build output directory | dist |
| Root directory | / |
Deployment steps:
- Open Cloudflare Dashboard.
- Go to Workers & Pages.
- Create a Pages project from Git.
- Connect
qinheming/lingyan-mvp. - Use the build settings above.
- Add the Amap environment variables if route preview is needed.
- Deploy.
Cloudflare will provide a URL like:
https://lingyan-mvp.pages.dev/
Manual CLI deploy is also available:
npm run deploy:cloudflareCreate .env.local from .env.example:
cp .env.example .env.localThen configure:
VITE_AMAP_JS_KEY=
VITE_AMAP_SECURITY_JSCODE=Without an Amap key, LingYan still runs with its built-in map fallback, but Amap route preview is disabled. The primary navigation action still attempts to open the Amap app.
- Open the deployed LingYan URL in Safari.
- Tap the Share button.
- Choose Add to Home Screen.
- Launch LingYan from the Home Screen.
- Open the deployed LingYan URL in Chrome, Huawei Browser, Edge, or another modern browser.
- Open the browser menu.
- Choose Add to Home screen or Add to desktop.
- Launch LingYan from the Home Screen.
For the full navigation experience, install Amap on the phone. LingYan is responsible for intent and destination handoff; Amap is responsible for voice navigation, background navigation, lock-screen behavior, rerouting, and traffic-aware guidance.
LingYan is an MVP. It does not replace professional navigation apps.
| Boundary | Reason |
|---|---|
| No guaranteed background GPS | iOS PWA background execution is limited |
| No lock-screen voice navigation promise | Native apps are better suited for that |
| No safety-critical routing promise | Users must follow real-world traffic and safety conditions |
| No private-area guidance | Generated points should remain public and approachable |
| No browser-based Amap clone | Full navigation UX is delegated to the Amap app |
| Priority | Item |
|---|---|
| P0 | Test Amap app handoff on real iPhone Safari and Android/Huawei browsers |
| P0 | Move production hosting away from GitHub Pages to an owned domain/server |
| P1 | Add clearer Add-to-Home-Screen onboarding |
| P1 | Add location candidate confirmation |
| P1 | Add Amap install detection guidance |
| P2 | Add account/history support |
| P2 | Add backend AI intent resolver |
| P3 | Native iOS shell with Amap Navigation SDK if App Store/TestFlight becomes acceptable |
This repository is the LingYan MVP frontend:
qinheming/lingyan-mvp
It is currently optimized for fast iteration by an independent builder: small surface area, mobile-first UI, and no App Store dependency. For production use without GitHub dependency, deploy the same build to an owned domain, VPS, Cloudflare Pages, or another controlled hosting target.