> ## Documentation Index
> Fetch the complete documentation index at: https://figranium.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Local Development Guide

This guide is for developers who want to run Figranium's source code directly on their machine for modification or testing, without using Docker.

## **Prerequisites**

* **Node.js**: Version 18 (LTS) or higher.
* **pnpm**: Recommended package manager.
* **Playwright**: Dependencies must be installed on your OS.

## **Setup Steps**

### **1. Clone the Repository**

```bash theme={null}
git clone https://github.com/figranium/figranium.git
cd figranium
```

### **2. Install Dependencies**

```bash theme={null}
pnpm install
```

### **3. Install Playwright Browsers**

```bash theme={null}
npx playwright install chromium
```

### **4. Environment Setup**

Create a `.env` file in the root directory (refer to the **Configuration** page for available variables). At minimum, set:

```text theme={null}
SESSION_SECRET=your_random_secret_here
```

### **5. Start the Application**

You need to run both the backend server and the frontend development server simultaneously:

**Backend:**

```bash theme={null}
pnpm run server
```

**Frontend:**

```bash theme={null}
pnpm run dev
```

The frontend will be available at `http://localhost:5173`, and it will proxy API requests to the backend at `http://localhost:11345`.

## **Building for Production**

To create a production build:

```bash theme={null}
pnpm run build
```

This generates a `dist/` folder with optimized assets. You can then run the server in production mode:

```bash theme={null}
NODE_ENV=production pnpm run server
```
