Skip to main content

Local Setup

Follow these steps to run UCF GeoLens on your own machine.

1. Clone the Repository

git clone https://github.com/UrbanDigitalTwin/Cesium_App.git
cd Cesium_App

2. Install Dependencies

npm install

This installs the Express server dependencies. The frontend uses CDN-loaded libraries and requires no separate build step.

3. Configure Environment Variables

Copy the example file and fill in your credentials:

cp .env.example .env

Edit .env with your API keys. See Environment Variables for the full reference.

4. Configure Supabase

Open auth/supabase-config.js and set your Supabase project URL and anon key:

export const supabaseConfig = {
supabaseUrl: 'https://YOUR_PROJECT.supabase.co',
supabaseAnonKey: 'YOUR_ANON_KEY',
};

These values are found in your Supabase project under Settings → API.

5. Start the Server

node server/server.js

The server starts on http://localhost:3000 by default. You can override the port with PORT=8080 in your .env.

6. Open the App

Navigate to http://localhost:3000 in your browser. You will be redirected to the login page. Create an account via the registration form, confirm your email, then log in.

File Serving Notes

The Express server serves files in this priority order (first match wins):

  1. client/src/ — contains index.html (the main app)
  2. client/public/ — contains js/app.js, css/, images/, data/
  3. auth/ — served under /auth/

Running the Docs Site

cd geo-lens-docs
npm install
npm start

Docs dev server runs on http://localhost:3001 (or next available port).

Troubleshooting

ProblemSolution
Port 3000 already in useSet PORT=3001 in .env
Login redirects loopCheck that supabase-config.js has correct URL and key
CO₂ sensors not loadingVerify FIREBASE_SERVICE_ACCOUNT_PATH or FIREBASE_SERVICE_ACCOUNT_JSON is set
Traffic tiles not loadingConfirm TOMTOM_API_KEY is set and not rate-limited