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):
client/src/— containsindex.html(the main app)client/public/— containsjs/app.js,css/,images/,data/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
| Problem | Solution |
|---|---|
| Port 3000 already in use | Set PORT=3001 in .env |
| Login redirects loop | Check that supabase-config.js has correct URL and key |
| CO₂ sensors not loading | Verify FIREBASE_SERVICE_ACCOUNT_PATH or FIREBASE_SERVICE_ACCOUNT_JSON is set |
| Traffic tiles not loading | Confirm TOMTOM_API_KEY is set and not rate-limited |