# Collab Server – Introduction

The Quiet Frames Collab Server is the backbone for real-time communication, website hosting, and gallery management.

## Features

| Area           | Features                         |
|----------------|----------------------------------|
| **Website**    | Landing Page, Docs, News         |
| **Gallery**    | Artworks, Examples, Exhibitions  |
| **Lifestream** | Live Snapshots from Exhibitions  |
| **Sockets**    | Real-time Communication          |
| **API**        | Snapshots, QR Codes              |

## Installation

### Prerequisites

- Node.js 20+
- npm 10+

### Setup

```bash
cd apps/node-collab-server
npm install
```

## Starting

```bash
# Development
npm run dev

# Production
npm run build && npm start
```

Server runs on port `4000`.

### With Content Path

```bash
CONTENT_PATH=../quiet-frames-content npm run dev
```

## Content Directory

The server requires a content directory:

```txt
quiet-frames-content/
├── docs/           # Documentation (Markdown)
├── galleries/      # Gallery definitions
├── news/           # Blog posts
├── pages/          # Static pages
└── assets/         # Images, Fonts, etc.
```

## Modules

| Module     | Description          | Link                                   |
|------------|----------------------|----------------------------------------|
| Website    | Public pages         | [002-website.md](002-website.md)       |
| Gallery    | Artwork presentation | [003-gallery.md](003-gallery.md)       |
| Sockets    | Real-time features   | [004-socketio.md](004-socketio.md)     |
| API        | REST endpoints       | [005-api.md](005-api.md)               |
| Deployment | Server operation     | [006-deployment.md](006-deployment.md) |

## Routes Overview

### Website

| Route                   | Description   |
|-------------------------|---------------|
| `/`                     | Landing Page  |
| `/docs`                 | Documentation |
| `/docs/:category/:page` | Doc page      |
| `/news`                 | News list     |

### Gallery

| Route                | Description       |
|----------------------|-------------------|
| `/gallery`           | Gallery Index     |
| `/artworks`          | All Artworks      |
| `/artworks/:slug`    | Artwork Detail    |
| `/examples`          | Code Examples     |
| `/examples/:slug`    | Example Detail    |
| `/exhibitions`       | Exhibitions       |
| `/exhibitions/:slug` | Exhibition Player |

### Lifestream

| Route                     | Description           |
|---------------------------|-----------------------|
| `/lifestream`             | Global Lifestream     |
| `/lifestream/:exhibition` | Exhibition Lifestream |

## Links

- **Repository:** [github.com/cnichte/quiet-frames-collab-server](https://github.com/cnichte/quiet-frames-collab-server)
- **Art.Works! Studio:** [Documentation](/docs/artworks-studio)
- **cc-toolbox:** [Documentation](/docs/cc-toolbox)