Project Structure
GeoLens has a plain-script Earth application and a shared framework for the Mars and Moon pages. The Express app serves both the client and API proxies; the browser client has no bundler or separate build step.
Frontend map
| Path | Responsibility |
|---|---|
client/src/index.html | Earth document shell and feature controls |
client/src/mars.html, moon.html | Thin page shells for the other worlds |
client/public/js/app.js | Earth viewer, data layers, analysis, and UI behavior |
client/public/js/core/ | World-independent viewer, shell, tools, and UI components |
client/public/js/planets/<world>/ | World-specific data, layers, and entry point |
client/public/css/styles.css | Main Earth interface styles |
client/public/css/planet-kit.css | Shared namespaced styles for cross-world UI |
client/public/data/ | Browser-served datasets and fixtures |
Earth remains a standalone legacy script. Mars and Moon share core/ and provide their own configuration through planets/<world>/. Keep generic capabilities in core/; world-specific assumptions belong beside that world's entry point. See the frontend guide for file navigation and extension rules.
Server and support files
| Path | Responsibility |
|---|---|
server/server.js | Express routes, API proxies, and static file hosting |
auth/ | Supabase browser authentication helpers and public client configuration |
supabase/ | Database schema and migration support |
geo-lens-docs/ | Docusaurus documentation site |
Static serving checks client/src/ before client/public/, then exposes auth files under /auth/. This means the page documents in client/src/ take precedence over similarly named public files.
Finding Earth features
Earth logic is grouped by feature in client/public/js/app.js, inside one window.onload closure. To locate behavior, search for its function or for the control ID in client/src/index.html; the frontend guide maps feature areas to useful function anchors. Keep new state with the existing feature state near the top of the closure.
Local checks
From the repository root, node --check client/public/js/app.js checks Earth script syntax. npm test always runs the notification, access, extension-loader, profile-dialog and OSM 3D Buildings checks and the server access and extension unit tests, and runs the planet-mode regression check when optional jsdom is installed. The docs site has its own build command: cd geo-lens-docs && npm run build.