Shipping ULagos 360° to production involves two independent pieces: a static frontend (a Vite-compiled SPA that produces aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Pewiz/ulagos360/llms.txt
Use this file to discover all available pages before exploring further.
dist/ folder you can host anywhere) and a Socket.IO backend running on Railway. This page covers the frontend deployment process and the steps needed to connect it correctly to the backend. The backend repository is managed separately; you only need access to its CORS configuration.
Architecture Overview
npm run build produces static assets that any CDN or static host can serve.
Steps
Build the production bundle
Run the Vite production build from the project root:Vite compiles and minifies the React app into the This serves
dist/ directory. The output is self-contained: dist/index.html plus hashed JS and CSS chunks. You do not need Node.js on the server to serve these files.Optionally, verify the build locally before deploying:dist/ at http://localhost:4173 so you can confirm everything loads correctly.Deploy dist/ to a static host
Push the
dist/ folder to your preferred static hosting platform. Both Vercel and Netlify support Vite projects with zero configuration — see the platform-specific instructions in the Vercel vs Netlify section below.Because ULagos 360° is a single-page app, configure your host to redirect all 404 requests back to index.html so that client-side routing works correctly.Update the backend URL in source
The Socket.IO server URL is hardcoded in Replace the URL string with the address of your own backend if you are running a private instance, then rebuild with
src/hooks/useSocketConnection.js. Open that file and locate the io(...) call inside the setupSocket function:src/hooks/useSocketConnection.js
npm run build.There is no
.env file or VITE_ environment variable wiring for the backend URL out of the box. The URL lives directly in source. If you want to externalise it, add const BACKEND_URL = import.meta.env.VITE_BACKEND_URL and set the variable in your host’s environment settings — then rebuild.Configure CORS on the Railway backend
The Socket.IO backend must explicitly list your deployed frontend domain in its CORS configuration. Without this, browser preflight requests will be rejected and no WebSocket connection can be established.In the backend repository, locate the Socket.IO server initialisation (typically Redeploy the backend on Railway after making this change.
index.js or server.js) and add your frontend domain to the cors.origin array — for example:Vercel vs Netlify
- Vercel
- Netlify
Vercel detects Vite projects automatically when you import the repository.Steps:Custom backend URL — the backend URL is hardcoded directly in
- Go to vercel.com/new and import the
ulagos360repository. - Vercel sets the Framework Preset to Vite, the Build Command to
npm run build, and the Output Directory todist— no changes needed. - Click Deploy.
vercel.json at the project root to redirect all routes to index.html:vercel.json
src/hooks/useSocketConnection.js. To point to a different backend, edit that string in source and redeploy. Optionally, you can refactor the file to read from import.meta.env.VITE_BACKEND_URL and then set that variable in Project Settings → Environment Variables.CORS Warning
Environment Considerations
| Setting | Location | How to change |
|---|---|---|
| Backend Socket.IO URL | src/hooks/useSocketConnection.js — hardcoded string in io(...) | Edit the string directly, or refactor to use import.meta.env.VITE_BACKEND_URL |
| Socket.IO transport order | Same file — transports: ["polling", "websocket"] | Swap to ["websocket"] only if your host and backend both support sticky sessions |
| Reconnection attempts | Same file — reconnectionAttempts: 5 | Increase for unstable network environments |
| localStorage key for spaces | src/stores/spacesStore.js — Zustand persist middleware | Change the name option in the persist config if you need to avoid collisions with other apps on the same origin |