Skip to main content

Prerequisites

Install the tooling below before cloning the repo or running npm run setup. Meridian’s Meridian/package.json declares engines.node: 20.x—use Node 20, not 18 or 22, unless you intentionally align the whole team on a different major. You will also need Git (for clone and normal development). npm ships with Node.

Node.js 20.x and npm

Pick one approach:Option A — Homebrew
brew install node@20
brew link node@20 --force --overwrite
Option B — nvm (recommended if you switch Node versions often)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# restart the terminal, then:
nvm install 20
nvm use 20
Option C — Official installerDownload the 20.x LTS macOS installer from https://nodejs.org/ and run it.Verify:
node -v   # should print v20.x.x
npm -v

MongoDB Community Server

Meridian’s backend expects a MongoDB instance you can reach from Meridian/backend/.env (for example mongodb://127.0.0.1:27017/...). The steps below install MongoDB Community Server locally—not Atlas.
Install (Homebrew — MongoDB tap)
brew tap mongodb/brew
brew update
brew install mongodb-community
Start the databaseRun mongod in the foreground when debugging, or register a background service:
brew services start mongodb-community
Check it is listening
mongosh --eval "db.runCommand({ ping: 1 })"
To stop the background service later: brew services stop mongodb-community.
Homebrew’s formula name and data directory can change over time; if brew install mongodb-community fails, run brew search mongodb and follow the current MongoDB Server install on macOS docs.

GitHub CLI (gh)

The Meridian CLI uses gh for pull requests and merges when you run flows like meridian ship. Install it even if you use another Git UI day to day.
brew install gh
gh auth login
Follow the prompts (HTTPS or SSH, GitHub.com, login via browser). Confirm with gh auth status.

Verify installs

node -v
npm -v
git --version
mongod --version
gh --version

Clone Meridian

Clone the Meridian Git repository (the web + API app)—not a parent “monorepo” meta-repo. You only need Meridian/ on disk to start; other repos are added next to it with npm run setup / meridian setup or manually.
git clone git@github.com:Study-Compass/Meridian.git
cd Meridian
Use the clone URL from GitHub for Meridian if yours differs (fork, HTTPS, enterprise host).
“Meridian-Mono” in conversation or older notes usually means a suggested local folder layout: one parent directory whose children include Meridian/, Events-Backend/, and optionally Meridian-Mobile/. That parent folder is not a single git repository you clone—it’s just the recommended development repo structure.
From here on, Meridian/ means the root of the Meridian repo you cloned (where package.json with meridian / dev scripts lives).

Bootstrap with the Meridian CLI

From Meridian/, the recommended first step is:
npm run setup
That runs meridian setup, which installs dependencies, can clone Events-Backend if it is missing, and can link backend/events to the sibling Events-Backend checkout (see platform tabs below). If the meridian command is already on your PATH, you can run meridian setup instead of npm run setup.

Platform-specific setup

Put meridian on your PATH

From Meridian/:
npm link
After that, meridian should resolve in any terminal. If it does not, confirm your global npm bin is on PATH (often npm prefix -g plus /bin).

Events-Backend and backend/events

Layout should be:
workspace/              # any parent folder you choose (not a git repo)
  Meridian/             # this Meridian clone
  Events-Backend/       # sibling; added by setup/CLI or cloned manually
After npm run setup, accept the prompt to symlink, or run:
meridian symlink
Node creates a normal symlink here; no extra Windows-style steps.

MongoDB

If you installed MongoDB Community in Prerequisites, ensure it is running:
brew services start mongodb-community

Free a port (3000 / 5001)

lsof -ti:3000 | xargs kill
lsof -ti:5001 | xargs kill

Health check

curl http://localhost:5001/health

Workspace layout

Meridian and Events-Backend should be sibling directories under whatever parent folder you use (again: the parent is not a repo—only Meridian and Events-Backend are separate clones):
workspace/
  Meridian/
  Events-Backend/
Optional: add Meridian-Mobile/ as another sibling if you work on the Expo app; it is its own clone, not inside Meridian.

Environment variables

Create both:
  • Meridian/.env
  • Meridian/backend/.env
At minimum:
JWT_SECRET=replace-me
MONGO_URI_RPI=mongodb://127.0.0.1:27017/meridian
NODE_ENV=development
Use MONGODB_URI when the backend is configured to read that variable instead of MONGO_URI_RPI.

Run the app

From Meridian/:
npm run dev
  • Frontend: http://localhost:3000
  • Backend: http://localhost:5001

Run services separately

Backend (preserves backend/events links):
npm run server
Frontend only:
npm run client

Verify

  1. Open http://localhost:3000
  2. Hit the backend health endpoint (see macOS vs Windows tabs above for curl vs PowerShell).

Development workflow

  • Frontend hot-reloads via the webpack dev server
  • Backend runs under nodemon when using npm run dev
From Meridian/:
npm run test:backend
npm run test:frontend
npm run test:ci
See Testing for suites, folders, and CI.
meridian start MER-123-Your-Feature
meridian status
meridian ship

Development

Day-to-day workflow, debugging, and troubleshooting after the stack is up.

Web client best practices

React conventions, routing, state, and useFetch / postRequest API access.

Backend best practices

req.db, routes, auth middleware, and multi-tenant patterns in Meridian/backend.

Authentication overview

Login methods, JWT cookies vs mobile tokens, and links to SAML and sessions.

Multi-tenant identity

Global users, memberships, and SSO across school subdomains.

SAML

University IdP integration when a tenant enables institutional SSO.

Testing

npm run test:*, folder layout, and CI parity.

API reference

REST surfaces and how the web and mobile clients call them.

Troubleshooting

From Meridian/:
npm run setup
brew services start mongodb-community
Need more detail on the CLI? See Meridian CLI. For general workflow help, see the Development guide.