Rename app from chat to neoirc, binary to neoircd (closes #46)
All checks were successful
check / check (push) Successful in 4s
All checks were successful
check / check (push) Successful in 4s
- Rename Go module path: git.eeqj.de/sneak/chat -> git.eeqj.de/sneak/neoirc - Rename binary: chatd -> neoircd, chat-cli -> neoirc-cli - Rename cmd directories: cmd/chatd -> cmd/neoircd, cmd/chat-cli -> cmd/neoirc-cli - Rename Go package: chatapi -> neoircapi - Update Makefile: binary name, build targets, docker image tag, clean target - Update Dockerfile: binary paths, user/group names, ENTRYPOINT - Update .gitignore and .dockerignore - Update all Go imports and doc comments - Update default server name fallback: chat -> neoirc - Update web client: localStorage keys, page title, default server name - Update all schema $id URLs and example hostnames - Update README.md: project name, binary references, examples, directory tree - Update AGENTS.md: build command reference - Update test fixtures: app name and channel names
This commit is contained in:
62
README.md
62
README.md
@@ -1,9 +1,9 @@
|
||||
# chat
|
||||
# neoirc
|
||||
|
||||
**IRC semantics, structured message metadata, cryptographic signing, and
|
||||
server-held session state with per-client delivery queues. All over HTTP+JSON.**
|
||||
|
||||
A chat server written in Go that decouples session state from transport
|
||||
An IRC-inspired server written in Go that decouples session state from transport
|
||||
connections, enabling mobile-friendly persistent sessions over plain HTTP.
|
||||
|
||||
The **HTTP API is the primary interface**. It's designed to be simple enough
|
||||
@@ -44,7 +44,7 @@ IRC is in decline because session state is tied to the TCP connection. In a
|
||||
mobile-first world, that's a nonstarter. Not everyone wants to run a bouncer
|
||||
or pay for IRCCloud.
|
||||
|
||||
This project builds a chat server that:
|
||||
This project builds a server that:
|
||||
|
||||
- Holds session state server-side (message queues, presence, channel membership)
|
||||
- Exposes a minimal, clean HTTP+JSON API — easy to build clients against
|
||||
@@ -132,7 +132,7 @@ makes signing consistent — you sign the same structure you send.
|
||||
|
||||
### Why not XMPP or Matrix?
|
||||
|
||||
XMPP is XML-based, overengineered for chat, and the ecosystem is fragmented
|
||||
XMPP is XML-based, overengineered for messaging, and the ecosystem is fragmented
|
||||
across incompatible extensions (XEPs). Matrix is a federated append-only event
|
||||
graph with a spec that runs to hundreds of pages. Both are fine protocols, but
|
||||
they're solving different problems at different scales.
|
||||
@@ -828,16 +828,16 @@ the server to the client (never C2S) and use 3-digit string codes in the
|
||||
| Code | Name | When Sent | Example |
|
||||
|------|----------------------|-----------|---------|
|
||||
| `001` | RPL_WELCOME | After session creation | `{"command":"001","to":"alice","body":["Welcome to the network, alice"]}` |
|
||||
| `002` | RPL_YOURHOST | After session creation | `{"command":"002","to":"alice","body":["Your host is chatserver, running version 0.1"]}` |
|
||||
| `002` | RPL_YOURHOST | After session creation | `{"command":"002","to":"alice","body":["Your host is neoirc-server, running version 0.1"]}` |
|
||||
| `003` | RPL_CREATED | After session creation | `{"command":"003","to":"alice","body":["This server was created 2026-02-10"]}` |
|
||||
| `004` | RPL_MYINFO | After session creation | `{"command":"004","to":"alice","params":["chatserver","0.1","","imnst"]}` |
|
||||
| `322` | RPL_LIST | In response to LIST | `{"command":"322","to":"alice","params":["#general","5"],"body":["General chat"]}` |
|
||||
| `004` | RPL_MYINFO | After session creation | `{"command":"004","to":"alice","params":["neoirc-server","0.1","","imnst"]}` |
|
||||
| `322` | RPL_LIST | In response to LIST | `{"command":"322","to":"alice","params":["#general","5"],"body":["General discussion"]}` |
|
||||
| `323` | RPL_LISTEND | End of LIST response | `{"command":"323","to":"alice","body":["End of /LIST"]}` |
|
||||
| `332` | RPL_TOPIC | On JOIN or TOPIC query | `{"command":"332","to":"alice","params":["#general"],"body":["Welcome!"]}` |
|
||||
| `353` | RPL_NAMREPLY | On JOIN or NAMES query | `{"command":"353","to":"alice","params":["=","#general"],"body":["@op1 alice bob +voiced1"]}` |
|
||||
| `366` | RPL_ENDOFNAMES | End of NAMES response | `{"command":"366","to":"alice","params":["#general"],"body":["End of /NAMES list"]}` |
|
||||
| `372` | RPL_MOTD | MOTD line | `{"command":"372","to":"alice","body":["Welcome to the server"]}` |
|
||||
| `375` | RPL_MOTDSTART | Start of MOTD | `{"command":"375","to":"alice","body":["- chatserver Message of the Day -"]}` |
|
||||
| `375` | RPL_MOTDSTART | Start of MOTD | `{"command":"375","to":"alice","body":["- neoirc-server Message of the Day -"]}` |
|
||||
| `376` | RPL_ENDOFMOTD | End of MOTD | `{"command":"376","to":"alice","body":["End of /MOTD command"]}` |
|
||||
| `401` | ERR_NOSUCHNICK | DM to nonexistent nick | `{"command":"401","to":"alice","params":["bob"],"body":["No such nick/channel"]}` |
|
||||
| `403` | ERR_NOSUCHCHANNEL | Action on nonexistent channel | `{"command":"403","to":"alice","params":["#nope"],"body":["No such channel"]}` |
|
||||
@@ -1214,7 +1214,7 @@ Return server metadata. No authentication required.
|
||||
**Response:** `200 OK`
|
||||
```json
|
||||
{
|
||||
"name": "My Chat Server",
|
||||
"name": "My NeoIRC Server",
|
||||
"motd": "Welcome! Be nice.",
|
||||
"users": 42
|
||||
}
|
||||
@@ -1468,7 +1468,7 @@ authenticity.
|
||||
|
||||
## Federation (Server-to-Server)
|
||||
|
||||
Federation allows multiple chat servers to link together, forming a network
|
||||
Federation allows multiple neoirc servers to link together, forming a network
|
||||
where users on different servers can share channels — similar to IRC server
|
||||
linking.
|
||||
|
||||
@@ -1664,7 +1664,7 @@ directory is also loaded automatically via
|
||||
|
||||
```bash
|
||||
PORT=8080
|
||||
SERVER_NAME=My Chat Server
|
||||
SERVER_NAME=My NeoIRC Server
|
||||
MOTD=Welcome! Be excellent to each other.
|
||||
DEBUG=false
|
||||
DBURL=file:///var/lib/neoirc/state.db?_journal_mode=WAL
|
||||
@@ -1677,24 +1677,24 @@ SESSION_IDLE_TIMEOUT=24h
|
||||
|
||||
### Docker (Recommended)
|
||||
|
||||
The Docker image contains a single static binary (`chatd`) and nothing else.
|
||||
The Docker image contains a single static binary (`neoircd`) and nothing else.
|
||||
|
||||
```bash
|
||||
# Build
|
||||
docker build -t chat .
|
||||
docker build -t neoirc .
|
||||
|
||||
# Run
|
||||
docker run -p 8080:8080 \
|
||||
-v chat-data:/var/lib/neoirc \
|
||||
-v neoirc-data:/var/lib/neoirc \
|
||||
-e SERVER_NAME="My Server" \
|
||||
-e MOTD="Welcome!" \
|
||||
chat
|
||||
neoirc
|
||||
```
|
||||
|
||||
The Dockerfile is a multi-stage build:
|
||||
1. **Build stage**: Compiles `chatd` and `chat-cli` (CLI built to verify
|
||||
1. **Build stage**: Compiles `neoircd` and `neoirc-cli` (CLI built to verify
|
||||
compilation, not included in final image)
|
||||
2. **Final stage**: Alpine Linux + `chatd` binary only
|
||||
2. **Final stage**: Alpine Linux + `neoircd` binary only
|
||||
|
||||
```dockerfile
|
||||
FROM golang:1.24-alpine AS builder
|
||||
@@ -1703,13 +1703,13 @@ RUN apk add --no-cache make
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN go build -o /chatd ./cmd/chatd/
|
||||
RUN go build -o /chat-cli ./cmd/chat-cli/
|
||||
RUN go build -o /neoircd ./cmd/neoircd/
|
||||
RUN go build -o /neoirc-cli ./cmd/neoirc-cli/
|
||||
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /chatd /usr/local/bin/chatd
|
||||
COPY --from=builder /neoircd /usr/local/bin/neoircd
|
||||
EXPOSE 8080
|
||||
CMD ["chatd"]
|
||||
CMD ["neoircd"]
|
||||
```
|
||||
|
||||
### Binary
|
||||
@@ -1717,10 +1717,10 @@ CMD ["chatd"]
|
||||
```bash
|
||||
# Build from source
|
||||
make build
|
||||
# Binary at ./bin/chatd
|
||||
# Binary at ./bin/neoircd
|
||||
|
||||
# Run
|
||||
./bin/chatd
|
||||
./bin/neoircd
|
||||
# Listens on :8080, writes to /var/lib/neoirc/state.db
|
||||
```
|
||||
|
||||
@@ -1730,7 +1730,7 @@ For production, run behind a TLS-terminating reverse proxy.
|
||||
|
||||
**Caddy:**
|
||||
```
|
||||
chat.example.com {
|
||||
neoirc.example.com {
|
||||
reverse_proxy localhost:8080
|
||||
}
|
||||
```
|
||||
@@ -1739,7 +1739,7 @@ chat.example.com {
|
||||
```nginx
|
||||
server {
|
||||
listen 443 ssl;
|
||||
server_name chat.example.com;
|
||||
server_name neoirc.example.com;
|
||||
|
||||
ssl_certificate /path/to/cert.pem;
|
||||
ssl_certificate_key /path/to/key.pem;
|
||||
@@ -1770,7 +1770,7 @@ seconds to accommodate long-poll connections.
|
||||
|
||||
## Client Development Guide
|
||||
|
||||
This section explains how to write a client against the chat API. The API is
|
||||
This section explains how to write a client against the neoirc API. The API is
|
||||
designed to be simple enough that a basic client can be written in any language
|
||||
with an HTTP client library.
|
||||
|
||||
@@ -2060,7 +2060,7 @@ GET /api/v1/challenge
|
||||
- [x] NICK change with broadcast
|
||||
- [x] QUIT with broadcast and cleanup
|
||||
- [x] Embedded web SPA client
|
||||
- [x] CLI client (chat-cli)
|
||||
- [x] CLI client (neoirc-cli)
|
||||
- [x] SQLite storage with WAL mode
|
||||
- [x] Docker deployment
|
||||
- [x] Prometheus metrics endpoint
|
||||
@@ -2113,11 +2113,11 @@ GET /api/v1/challenge
|
||||
Following [gohttpserver CONVENTIONS.md](https://git.eeqj.de/sneak/gohttpserver/src/branch/main/CONVENTIONS.md):
|
||||
|
||||
```
|
||||
chat/
|
||||
neoirc/
|
||||
├── cmd/
|
||||
│ ├── chatd/ # Server binary entry point
|
||||
│ ├── neoircd/ # Server binary entry point
|
||||
│ │ └── main.go
|
||||
│ └── chat-cli/ # TUI client
|
||||
│ └── neoirc-cli/ # TUI client
|
||||
│ ├── main.go # Command handling, poll loop
|
||||
│ ├── ui.go # tview-based terminal UI
|
||||
│ └── api/
|
||||
@@ -2248,7 +2248,7 @@ chat/
|
||||
- IRC message envelope format with per-client queue fan-out
|
||||
- Long-polling with in-memory broker
|
||||
- Embedded web SPA client
|
||||
- TUI client (chat-cli)
|
||||
- TUI client (neoirc-cli)
|
||||
- Docker image
|
||||
- Prometheus metrics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user