CommunityArchitect is a local tool that designs a complete Discord server from a
plain description or a ready-made template, then builds that design in a real
server through the Discord API. It runs entirely on your own machine,
against your own bot and your own server. There is no hosted backend, no shared
API keys, and nothing leaves the computer it runs on.
You describe the community you want ("a competitive Valorant team with weekly
scrims", "a med-school study group of about 40 across time zones") and the tool
produces a full blueprint: categories, channels, roles, permissions, AutoMod,
onboarding, and scheduled events, with a written reason for every choice. You
can tweak it, preview exactly what it will do, and then apply it.
What it does differently
The design engine is deterministic and research-backed, not a call out to a
model. The same description always produces the same blueprint, and every
structural decision traces back to the notes in research/. The applier treats
a partly-built or already-built server as a state to reconcile rather than a
blank slate, so re-running it is safe and does not create duplicates.
How it works
Three parts share one contract: a versioned JSON document called a ServerSpec,
defined in spec/server-schema.json.
- The generator / brain (
src/architect/). It classifies a description
into an archetype plus a set of cross-cutting traits, composes a ServerSpec
from research-backed building blocks, and validates it. The output is a
.json spec plus a .rationale.md design brief explaining the decisions.
- The applier (
src/applier/). It turns a ServerSpec into an ordered list
of Discord REST calls and runs them. It is dry-run by default, idempotent,
and runs an upfront pre-flight check before touching anything. It has no
runtime network dependencies (it uses the built-in fetch).
- The local web UI (
src/ui/). A small studio that wraps the whole flow:
a home overview, a template gallery, a live customizer, describe-and-generate,
and a gated apply screen. It is a zero-dependency Node server plus a
vanilla-JavaScript single-page app (no build step), bound to 127.0.0.1 only.
The UI server imports the same validate, generate, and plan modules the CLI
uses, so the two can never drift apart.
| Path | What it holds |
|---|
research/ | The knowledge base: feature library and deep dives with citable IDs. |
spec/ | server-schema.json (the contract) and server-schema.md (Discord API mapping and apply ordering). |
src/architect/ | Generator: classify, archetype builders, trait modifiers, validation, spec differ. |
src/applier/ | Applier: plan builder, executor, pre-flight, wipe, role-headroom math, REST client, mock. |
src/ui/ | Local studio: the server plus the single-page app in public/. |
templates/ | Ten ready-made designs plus index.json for the gallery. |
Installation
Everything runs on your own machine, against your own Discord bot and your own
server. You bring your own bot, your own token, and your own server. You are not
reusing anyone else's credentials, and every install fills in its own .env
that stays on your machine.
1. Clone and install
git clone <your-repo-url> community-architect
cd community-architect
npm install
Requires Node.js 18 or newer (it uses the built-in fetch and has no build
step). The only runtime dependency is ajv for spec validation. jsdom is a
dev-only dependency used by the UI test.
2. Create your own Discord bot and token
- Open the Discord Developer Portal at
https://discord.com/developers/applications and click New Application.
- Open the Bot tab, click Reset Token, and copy the token. Treat it
like a password. Anyone who has it controls your bot.
- No privileged gateway intents are required. The applier only makes REST calls
to manage the server.
3. Invite the bot to your server