Skip to main content

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js (version 19 or higher)
  • npm (comes with Node.js)
  • Git for version control
  • PostgreSQL (for backend development)
You can verify your installations:
node -v
npm -v
git --version
psql --version

Clone the Repository

Clone the Meridian monorepo to your local machine:
git clone <repository-url>
cd Meridian-Mono

Installation

Meridian uses a monorepo structure with separate frontend and backend directories. Install dependencies for each:

1. Root Dependencies

npm install

2. Frontend Dependencies

cd Meridian/frontend
npm install

3. Backend Dependencies

cd ../backend
npm install

Environment Setup

Backend Configuration

Create a .env file in Meridian/backend/:
# Database
DATABASE_URL=postgresql://user:password@localhost:5432/meridian

# Authentication
JWT_SECRET=your-secret-key
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret

# Server
PORT=5001
NODE_ENV=development

Frontend Configuration

Create a .env file in Meridian/frontend/:
REACT_APP_API_URL=http://localhost:5001
REACT_APP_GOOGLE_CLIENT_ID=your-google-client-id

Running the Application

Development Mode (Both Frontend & Backend)

From the root directory, run:
npm run dev
This starts:
  • Frontend: http://localhost:3000
  • Backend API: http://localhost:5001

Running Separately

Frontend only:
cd Meridian/frontend
npm start
Backend only:
cd Meridian/backend
npm start

Database Setup

Initialize PostgreSQL Database

# Create database
createdb meridian

# Run migrations
cd Meridian/backend
npm run migrate

Verify Installation

  1. Frontend: Navigate to http://localhost:3000 - you should see the Meridian landing page
  2. Backend: Check http://localhost:5001/api/health - should return a health status

Development Workflow

  • Frontend changes auto-reload via React’s hot module replacement
  • Backend changes require server restart (or use nodemon)
  • Check the console for errors and warnings
Run tests for frontend and backend:
# Frontend tests
cd Meridian/frontend
npm test

# Backend tests
cd Meridian/backend
npm test
We use Prettier for code formatting. Format your code:
npm run format

Next Steps

Frontend Guide

Learn about React components, routing, and state management

Backend API

Explore API endpoints and authentication

SAML Integration

Set up university SSO authentication

Development Tips

Best practices and troubleshooting

Troubleshooting

If port 3000 or 5001 is already in use:
# Kill process on port 3000
lsof -ti:3000 | xargs kill

# Kill process on port 5001
lsof -ti:5001 | xargs kill
Ensure PostgreSQL is running:
# macOS
brew services start postgresql

# Linux
sudo systemctl start postgresql
Clear node_modules and reinstall:
rm -rf node_modules package-lock.json
npm install
Need help? Check out our Development Guide or reach out to the team.