# Demo Server Setup

This guide explains how to set up and run the design system demo server.

## Prerequisites

- Node.js (latest LTS version recommended)
- npm (comes with Node.js)

## Installation

1. Clone the repository:
```bash
git clone https://github.com/pr0gramm-com/design-system.git
cd design-system
```

2. Install dependencies for the main project:
```bash
npm install
```

3. Install dependencies for the demo:
```bash
cd demo
npm install
```

## Running the Demo Server

1. Make sure you are in the demo directory:
```bash
cd demo # if not already in the demo directory
```

2. Start the development server:
```bash
npx vite
```

The demo server will start and automatically open in your default browser. By default, it runs on `http://localhost:5173`.

## Troubleshooting

If you encounter the following issues:

### Multiple React Versions
If you see React hook errors, try cleaning the installation:
```bash
rm -rf node_modules package-lock.json
npm install
```

### Build Errors
If you encounter build errors, try:
1. Clean the build cache:
```bash
npm run clean # if available
```
2. Rebuild the project:
```bash
npm run build
``` 