Lazy Zone — Full-Stack Local Setup Guide
This guide details how to run Lazy Zone locally on your computer using VS Code (Visual Studio Code). Since this is a full-stack Node.js + Express + React application, we run our backend server and frontend Vite runtime together seamlessly.
🛠️ Prerequisites
Before you start, make sure you have the following installed on your machine:
- Node.js: (Version 18.x or 20.x+ is highly recommended) -> Download here
- VS Code: Download here
🚀 Step-by-Step Installation
Step 1: Export or Extract Code
Ensure you have downloaded the project files (via standard export from Google AI Studio) into a folder on your machine, e.g., ~/Projects/LazyZone.
Step 2: Open in VS Code
- Open VS Code.
- Go to File > Open Folder... (or
Cmd+Oon Mac /Ctrl+Oon Windows) and select your project's root folder.
Step 3: Configure Environment Variables
You will need to create a local .env file to configure your API keys.
- Duplicate the
.env.examplefile and rename it to.env. - Fill inside your keys: ```env # Your Google Gemini Key GEMINI_API_KEY="AIzaSy..."
# Your xAI Groq API Key (Optional) GROQ_API_KEY="gsk_..."
# Your local port address APP_URL="http://localhost:3000"
### Step 4: Install Dependencies
Open the VS Code Integrated Terminal (**Terminal** > **New Terminal** or ``Ctrl+```) and run:
```bash
npm install
🏃 Running the Application
Option A: Running from the Terminal (Recommended)
In your VS Code terminal, start the development server by running:
npm run dev
- What happens: This triggers the
tsx server.tsscript. - It configures Express as the primary host.
- It attaches Vite as dynamic middleware for high-fidelity frontend updates on http://localhost:3000.
- Open your browser to http://localhost:3000 to view your application!
💡 Running/Debugging with VS Code Configurations (Optional)
If you prefer using VS Code's native Run & Debug panel:
- In the root directory, create a folder named
.vscodeif it doesn't exist. - Create a file inside named
launch.jsonwith the following content:json { "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Launch Lazy Zone (Dev)", "runtimeExecutable": "npm", "runtimeArgs": ["run", "dev"], "skipFiles": ["<node_internals>/**"], "console": "integratedTerminal" } ] } - Open the Run and Debug view in the sidebar (
Ctrl+Shift+DorCmd+Shift+D). - Click the green Play button (Launch Lazy Zone (Dev)).
📦 Production Builds
To compile and verify the build works exactly like the cloud environment:
# 1. Compile both React code & bundle server.ts with esbuild
npm run build
# 2. Run the final compressed standalone app
npm run start
The compiled output is hosted in the /dist directory.