◉ Pulse
coder3101 avatar
#41 today

coder3101/nanorp

Rust AI #chatbot #leptos #llm #roleplay

A lightweight, self-hosted AI roleplay chat.

Created Jul 27, 2026
Stars
6
Today
+6
Forks
0
Quality
90/100
Momentum
19

README

Fetched from GitHub on Oct 30, 2026, 9:23 PM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to coder3101/nanorp and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

NanoRP

NanoRP

A lightweight, self-hosted AI roleplay chat.

Bring your own characters. Bring your own models. Everything stays on your machine.

CI Release Container License: MIT

demo.mp4

Contents

Small by design

Most self-hosted chat UIs arrive as a Node server, a Python API, a Postgres instance, and a Redis cache. NanoRP is one binary and one file.

  • One static binary. No Node.js, no Python, no Electron at runtime. The server is Rust (Axum); the whole app ships as a single executable plus static assets.
  • No database server. State lives in one SQLite file, with SQLite compiled into the binary — nothing to install, provision, or back up separately.
  • No JS framework runtime. The UI is Rust compiled to WebAssembly (Leptos), server-rendered first and hydrated by a size-optimized WASM bundle (opt-level = "z" + LTO). Assets are pre-compressed at build time, so the server never re-compresses a response.

It's built to sit quietly on a Raspberry Pi, a free-tier VPS, or your laptop alongside everything else. Your GPU should be busy running the model, not your web stack.

Quick start

docker run -d --name nanorp \
  -p 3000:3000 \
  -v nanorp-data:/data \
  ghcr.io/coder3101/nanorp:latest

Or with Compose:

docker compose up -d

Then open http://localhost:3000.

Images are published for linux/amd64 and linux/arm64 on every release.

Connecting to Ollama on the host? Use http://host.docker.internal:11434 as the provider URL. On Linux, add --add-host=host.docker.internal:host-gateway to docker run.

Your data

The SQLite database, avatars, and attachments are persisted in the nanorp-data volume, mounted at /data.

The container runs as a non-root user (uid 10001). Named volumes work out of the box; if you bind-mount a host directory instead (-v /path/on/host:/data), chown -R 10001 it first or pass --user to match its owner.

First steps

  1. Open Settings → Providers and add one:
    • Ollama — a URL like http://localhost:11434, no API key
    • OpenAI-compatible — a URL like https://api.openai.com plus a key
  2. Go to Characters and create one.
  3. Hit Chat, pick a model, and start talking.

Features

Characters

  • Name, role, personality, system prompt, greeting, and avatar
  • Generate a character from a plain-text description using any configured model (structured JSON output) — review, then save or retry
  • {{char}} / {{user}} placeholders resolved at prompt-build time
  • Duplicate, search, and import/export as JSON

Models

  • Ollama and any OpenAI-compatible endpoint
  • Configure several providers and switch model mid-conversation
  • API keys are encrypted at rest (ChaCha20-Poly1305)
  • Sampling controls: temperature, top-p, max tokens

Chat

  • Token-by-token streaming, with stop-and-cancel that reaches the provider
  • Collapsible reasoning ("thinking") blocks for reasoning models
  • Edit your messages — text and images — then regenerate from that point
  • Image attachments for vision models (up to 5 per message)
  • Markdown rendering, one-click copy

Interface

  • Responsive down to phone widths, with a proper mobile layout
  • Light and dark themes, no flash on first paint
  • Keyboard navigable menus and dialogs, focus trapping, ARIA labels, and prefers-reduced-motion support

Yours

  • No telemetry, no accounts, no cloud dependency
  • Every message, image, and key stays in a directory you control

Configuration

Everything is optional; the defaults below are what the container uses.

Variable Default Description
LEPTOS_SITE_ADDR 0.0.0.0:3000 Address the server binds to
XDG_CONFIG_HOME /data Base directory for the DB & uploads
RUST_LOG info Log level (error/warn/info/…)

Development

You'll need the Rust toolchain, the wasm32-unknown-unknown target, and cargo-leptos:

rustup target add wasm32-unknown-unknown
cargo install cargo-leptos --locked

cargo leptos watch                      # dev server on http://127.0.0.1:3000
cargo leptos build --release            # production build into target/

Tests and lints, the same way CI runs them:

cargo fmt --all --check
cargo test --features ssr --no-default-features
cargo clippy --all-targets --features ssr --no-default-features -- -D warnings
cargo clippy --lib --target wasm32-unknown-unknown \
  --features hydrate --no-default-features -- -D warnings

In development, app data lives in ~/.config/nanorp/ (macOS: ~/Library/Application Support/nanorp/).

Layout

Path What's in it
src/components/ UI components, including small shadcn-style primitives
src/pages/ Routed pages (chat, characters, settings)
src/server/ Server functions — the client/server boundary
src/services/ Business logic over SQLite
src/providers/ LLM provider adapters (Ollama, OpenAI-compatible)
src/models/ Shared types used by both sides
migrations/ Versioned schema, applied via PRAGMA user_version
style/ Tailwind v4 input; design tokens live in CSS

Contributing

Issues and pull requests are welcome. Keep changes focused, make sure cargo fmt, cargo test, and cargo clippy pass, and match the surrounding style.

License

MIT © coder3101

Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Jul 28, 2026

first spotted on the list

Best rank

#41

highest position reached

Appearances

1

times on the trending list

Quality score

90

out of 100

Momentum

19

trend strength indicator

Star velocity

0.06

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot

Not enough snapshots yet — check back soon.

Rank history

position on trending · lower is better

Not enough snapshots yet — check back soon.

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/coder3101/nanorp" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="coder3101/nanorp — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

coder3101/nanorp stars badge
Markdown
[![coder3101/nanorp](https://www.notionpulse.cc/api/badge/coder3101/nanorp.svg)](https://www.notionpulse.cc/repo/coder3101/nanorp)
HTML
<a href="https://www.notionpulse.cc/repo/coder3101/nanorp"><img src="https://www.notionpulse.cc/api/badge/coder3101/nanorp.svg" alt="coder3101/nanorp stars badge" /></a>

Repository of the Day

#41 Repository of the Day

Repository of the Week

#41 Repository of the Week

Repository of the Month

#41 Repository of the Month