open-index/open-npm huggingface dataset:
npm package: @sprig-and-prose/sprig-ui
Description: A Client-Side Rendering (CSR) version of sprig-universe-ui. This is a plain Svelte application served by a simple Node.js HTTP server.
Latest version: 0.1.1

# sprig-ui-csr

A Client-Side Rendering (CSR) version of sprig-universe-ui. This is a plain Svelte application served by a simple Node.js HTTP server.

## Overview

This application serves a Svelte app via Node's native `http` package. The server handles three route patterns:

- `/_ui/*` - Serves UI assets from the Vite build output
- `/api/manifest` - Serves `manifest.json` from the current directory (or configured path)
- Everything else - Serves `index.html` for client-side routing

## Installation

```bash
npm install
```

## Development

Build the Svelte app:

```bash
npm run build
```

Start the server:

```bash
npm start
```

Or use the CLI directly:

```bash
node src/cli.js
```

The server will be available at `http://localhost:5173` (or the configured port).

### CLI Options

```bash
# Use default port (5173) and manifest path (./manifest.json)
sprig-ui-csr

# Specify a custom port
sprig-ui-csr --port 3000
# or
sprig-ui-csr -p 3000

# Specify a custom manifest path
sprig-ui-csr --manifest ./custom-manifest.json
# or
sprig-ui-csr -m ./custom-manifest.json

# Combine options
sprig-ui-csr -p 8080 -m ./data/manifest.json

# Show help
sprig-ui-csr --help
```

### Other Commands

```bash
# Format code
npm run format

# Lint code
npm run lint

# Type check (JSDoc types)
npm run typecheck

# Build for production
npm run build
```

## Project Structure

```
sprig-ui-csr/
├── package.json
├── biome.json
├── tsconfig.json
├── vite.config.js
├── index.html
├── src/
│   ├── main.js          # Svelte app entry point
│   ├── App.svelte       # Root Svelte component
│   ├── server.js        # HTTP server implementation
│   ├── cli.js           # CLI entry point
│   └── styles/
│       └── app.css      # Global styles
└── dist/                # Vite build output (served as /_ui/*)
```

## Technologies

- **Svelte 5**: Component framework
- **Vite 6**: Build tool
- **TypeScript 5.7**: Type checking (via JSDoc annotations)
- **Biome 2.3**: Linting and formatting
- **Node.js HTTP**: Native HTTP server (no framework dependencies)

## Configuration

- **TypeScript**: Configured in `tsconfig.json` for type checking only (no compilation)
- **Biome**: Configured in `biome.json` (formats JS/TS, ignores Svelte files)
- **Vite**: Configured in `vite.config.js` (builds Svelte app with base path `/_ui/`)

## Manifest API

The `/api/manifest` endpoint serves the `manifest.json` file from the current working directory (or a configured path). If the file doesn't exist, it returns a 404 error.

## License

ISC
npm package: @sprig-and-prose/sprig-ui-csr
Description: A Client-Side Rendering (CSR) version of sprig-universe-ui. This is a plain Svelte application served by a simple Node.js HTTP server.
Latest version: 0.3.6

# sprig-ui-csr

A Client-Side Rendering (CSR) version of sprig-universe-ui. This is a plain Svelte application served by a simple Node.js HTTP server.

## Overview

This application serves a Svelte app via Node's native `http` package. The server handles three route patterns:

- `/_ui/*` - Serves UI assets from the Vite build output
- `/api/manifest` - Serves `manifest.json` from the current directory (or configured path)
- Everything else - Serves `index.html` for client-side routing

## Installation

```bash
npm install
```

## Development

Build the Svelte app:

```bash
npm run build
```

Start the server:

```bash
npm start
```

Or use the CLI directly:

```bash
node src/cli.js
```

The server will be available at `http://localhost:5173` (or the configured port).

### CLI Options

```bash
# Use default port (5173) and manifest path (./manifest.json)
sprig-ui-csr

# Specify a custom port
sprig-ui-csr --port 3000
# or
sprig-ui-csr -p 3000

# Specify a custom manifest path
sprig-ui-csr --manifest ./custom-manifest.json
# or
sprig-ui-csr -m ./custom-manifest.json

# Combine options
sprig-ui-csr -p 8080 -m ./data/manifest.json

# Show help
sprig-ui-csr --help
```

### Other Commands

```bash
# Format code
npm run format

# Lint code
npm run lint

# Type check (JSDoc types)
npm run typecheck

# Build for production
npm run build
```

## Project Structure

```
sprig-ui-csr/
├── package.json
├── biome.json
├── tsconfig.json
├── vite.config.js
├── index.html
├── src/
│   ├── main.js          # Svelte app entry point
│   ├── App.svelte       # Root Svelte component
│   ├── server.js        # HTTP server implementation
│   ├── cli.js           # CLI entry point
│   └── styles/
│       └── app.css      # Global styles
└── dist/                # Vite build output (served as /_ui/*)
```

## Technologies

- **Svelte 5**: Component framework
- **Vite 6**: Build tool
- **TypeScript 5.7**: Type checking (via JSDoc annotations)
- **Biome 2.3**: Linting and formatting
- **Node.js HTTP**: Native HTTP server (no framework dependencies)

## Configuration

- **TypeScript**: Configured in `tsconfig.json` for type checking only (no compilation)
- **Biome**: Configured in `biome.json` (formats JS/TS, ignores Svelte files)
- **Vite**: Configured in `vite.config.js` (builds Svelte app with base path `/_ui/`)

## Manifest API

The `/api/manifest` endpoint serves the `manifest.json` file from the current working directory (or a configured path). If the file doesn't exist, it returns a 404 error.

## License

ISC
npm package: @sprig-and-prose/tutorial
Description: CLI to serve the tutorial UI for a workspace of markdown tutorials and docs
Latest version: 0.2.0

# @sprig-and-prose/tutorial

CLI to run a local tutorial UI for a workspace of markdown tutorials and docs.

## How to run

```bash
tutorial ui [path?]
```

- **path** — Workspace directory (default: current directory).
- **Options:**
  - `--port <number>` — Port (default: 3627).
  - `--no-open` — Do not open the browser.
  - `--config <path>` — Path to `tutorial.config.json`.
  - `-h, --help` — Show help.

Example:

```bash
tutorial ui
tutorial ui ./my-tutorials --port 4000 --no-open
```

## Workspace structure

- **Tutorials** — Any `.md` file at the workspace root, or any `.md` file inside a direct subdirectory of the root. Each file should have exactly one `#` (H1) title and one or more `##` (H2) headings; the UI splits on H2 into pages with next/previous navigation.
- **Docs** — Optional `docs/` directory; each `.md` file is listed under Docs and rendered as a single page (no H2 splitting).
- **Assets** — Optional `assets/` directory; files are served at `/workspace-assets/<path>`. In markdown, reference images with `/workspace-assets/image.png`.

Only these directories are ignored when scanning for tutorials: the configured `docsDir` and `assetsDir`, plus `.git`, `node_modules`, and `dist`. No other heuristics.

## Optional config

Create `tutorial.config.json` in the workspace root:

```json
{
  "title": "My Tutorials",
  "assetsDir": "static",
  "docsDir": "pages"
}
```

- **title** — Optional string; shown in the UI.
- **assetsDir** — Optional path (relative to workspace) for static assets; default is `assets` if that folder exists.
- **docsDir** — Optional path for doc markdown; default is `docs` if that folder exists.

## What you get

After running `tutorial ui`:

- A calm startup line: workspace path, number of tutorials, docs enabled/none, assets enabled/none, and the URL (e.g. `http://localhost:3627`).
- The browser opens to that URL (unless you use `--no-open`).
- The UI shows a left sidebar listing all tutorials and docs; the main panel shows the selected tutorial (H2-split pages with next/prev) or doc (single page). Images under assets load from `/workspace-assets/`.

No hot reload; this is a static lens over your workspace.