AIOStreamsAIOStreams
Guides

Development

How to set up AIOStreams locally for development and contribution.

Prerequisites

  • Node.js v22+
  • pnpm v10.15+
  • git
  • A C/C++ toolchain + Python 3 — needed to compile the yencode native addon at install time (see Native module build tools below)

Earlier versions of Node.js or pnpm may work, but are not guaranteed.


Native module build tools

AIOStreams' native usenet engine uses yencode — a native (C++) addon that decodes yEnc-encoded article bodies. It is published without prebuilt binaries, so pnpm i compiles it from source with node-gyp. That requires a C/C++ compiler and Python 3 on your machine:

# Debian / Ubuntu
sudo apt-get install -y python3 make g++

On other distributions, install the equivalent packages: python3, make, and a C++ compiler such as gcc-c++ or clang.

xcode-select --install

This provides Clang and make. Recent macOS already ships Python 3; if not, install it with brew install python.

Install both:

The Node.js Windows installer can also set these up for you — tick "Automatically install the necessary tools" (Tools for Native Modules) during installation.


Setup

Clone the repository

git clone https://github.com/Viren070/AIOStreams.git
cd AIOStreams

Build the project

pnpm run build

Running in Development Mode

Start the addon in development mode with hot reload for the server package:

pnpm run start:dev

Only changes to the server package benefit from hot reload. Changes to the core package require a rebuild:

pnpm -F core run build

Changes to the frontend package also require a rebuild:

pnpm -F frontend run build

Frontend Hot Reload

For full hot reload including the frontend, use the rsbuild dev server. It serves the SPA with hot module replacement and proxies API requests through to the backend.

Point the frontend at the backend

The dev server proxies every /api request to the backend. Create a .env.local file in packages/frontend/ and set the backend's URL:

PUBLIC_BACKEND_BASE_URL=http://localhost:3000

Match the port to your backend's PORT (default 3000). If you omit this, the proxy falls back to http://localhost:3001.

Start all packages with hot reload

pnpm dev

This runs core, server and frontend together. The rsbuild dev server serves the SPA with hot reload on port 21456 (override with PORT) and proxies /api to the backend URL above.

Open the app

Open the dev server URL that rsbuild prints — http://localhost:21456 by default.

If you're only testing backend changes, use pnpm run start:dev instead — it avoids starting the frontend dev server unnecessarily.


Contributing

Contributions are welcome! Please open an issue or pull request on GitHub. For questions or discussion, join the Discord Server.

On this page