explaingit

withspectrum/spectrum

10,837JavaScriptAudience · developerComplexity · 4/5LicenseSetup · hard

TLDR

The full source code for Spectrum, an online community platform combining real-time chat with threaded forums. Now part of GitHub, built with React, GraphQL, Node.js, and RethinkDB.

Mindmap

mindmap
  root((Spectrum))
    Product
      Online communities
      Real-time chat
      Threaded forums
    Tech stack
      React frontend
      GraphQL Apollo API
      RethinkDB storage
      Redis background jobs
    Architecture
      Monorepo structure
      Multiple services
      Separate workers
    Setup
      Install RethinkDB Redis
      yarn install
      DB migrate and seed
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Study how a production Node.js monorepo with GraphQL, React, and RethinkDB is structured and deployed.

USE CASE 2

Fork Spectrum as a starting point for building your own online community or threaded forum platform.

USE CASE 3

Contribute bug fixes to the open-source Spectrum product by running the full stack locally and submitting a PR.

USE CASE 4

Learn how a real-time web app uses Redis for background jobs and RethinkDB for data alongside a GraphQL API.

Tech stack

JavaScriptReactNode.jsGraphQLRethinkDBRedisFlow

Getting it running

Difficulty · hard Time to first run · 1h+

Requires RethinkDB and Redis running locally, plus dependency installation across all monorepo packages before starting the app.

BSD 3-Clause, use freely including commercially with attribution, no endorsement of your project by the authors.

In plain English

Spectrum was an online community platform designed to combine the best features of real-time chat apps and traditional forums. The goal was to help community owners grow and manage large online groups in a way that kept conversations organized and searchable rather than disappearing into an endless scroll of messages. The platform joined GitHub in November 2018. The codebase is a monorepo containing the full product: a React frontend, a GraphQL API powered by the Apollo toolchain, a server-side rendering layer, and a set of background worker services. Data is stored in RethinkDB, background jobs run through Redis, and authentication is handled by PassportJS. Everything is written in JavaScript, with Flowtype for type safety. Setting up the project locally requires installing RethinkDB and Redis before running the application. A script installs dependencies across all the individual service packages in the monorepo. After that, database migration and seeding scripts prepare the local data. Each server (API, web frontend, email worker, and others) runs as a separate process that you start individually with yarn commands. The project is structured so different contributors can work on different pieces independently: the API server, the frontend app, the rendering server, and shared code each have their own directories. Code formatting is handled automatically by Prettier on commit. All new JavaScript files must include Flowtype type annotations as a CI requirement. Spectrum is open source under the BSD 3-Clause license.

Copy-paste prompts

Prompt 1
I want to run Spectrum locally. Walk me through installing RethinkDB, Redis, and the Node.js dependencies, then starting the API and web servers.
Prompt 2
The Spectrum codebase uses GraphQL with Apollo. Show me how to add a new query to the API and consume it in the React frontend.
Prompt 3
I want to fork Spectrum and replace RethinkDB with PostgreSQL. Which files and parts of the codebase would I need to change?
Prompt 4
How does Spectrum handle background jobs using Redis? Show me how to add a new background worker to the monorepo.
Open on GitHub → Explain another repo

← withspectrum on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.