Before running HADOS locally you need a compatible Node.js runtime, a Firebase project (see the Firebase setup guide), and the project dependencies installed. This page covers the full local setup, explains how to move Firebase credentials out of source code using Vite environment variables, and documents theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/VasquezRivero92/HabboCafe/llms.txt
Use this file to discover all available pages before exploring further.
PORT variable used by the production static server.
Prerequisites
- Node.js 18 or later — HADOS targets modern ESM and React 19; older Node versions are not supported.
- npm — bundled with Node.js; no alternative package manager configuration is included.
npm scripts
All development and build tasks are defined inpackage.json:
| Script | Command | Purpose |
|---|---|---|
dev | vite | Starts the Vite development server with HMR on http://localhost:5173. |
build | tsc -b && vite build | Type-checks with TypeScript first, then bundles the app into dist/. |
lint | oxlint | Runs the Oxlint linter against the codebase to catch errors and enforce code style. |
preview | vite preview | Serves the dist/ build locally to verify the production bundle. |
Firebase credentials
src/firebase.ts currently contains the Firebase config object with credentials hardcoded directly in the file. This is acceptable for private repositories during development, but you should move these values to environment variables before deploying to any public or shared environment.
Vite exposes environment variables to the browser bundle at build time — any variable prefixed with VITE_ is statically replaced in the output. Update src/firebase.ts to read from import.meta.env instead of hardcoded strings:
The
VITE_ prefix is required. Vite deliberately excludes any variable that does not start with VITE_ from the browser bundle for security. Variables without this prefix are only accessible in Vite config files and Node.js-side plugins — not in your React components or firebase.ts..env.local
Create a.env.local file in the project root and add your Firebase project values:
.env.local during npm run dev and npm run build. You can find all the values in the Firebase console under Project settings → Your apps → SDK setup and configuration.
Server PORT variable
The production static server (server.js) reads its listening port from environment variables at startup:
PORT— the conventional variable used by most cloud platforms (Heroku, Railway, Render, etc.).SERVER_PORT— a fallback for platforms that use a different naming convention.8080— the default when neither variable is set, suitable for local testing.