Documentation

Installation & Setup

Installation & Setup

Get MAS Hub running locally in under 5 minutes with Docker or manual installation.

Prerequisites

- Node.js 18+ or Docker - PostgreSQL 14+ (or use Docker) - Git

Quick Start with Docker

The fastest way to get started is using our Docker Compose setup:

```bash # Clone the repository git clone https://github.com/maschain/mas-hub cd mas-hub

Copy environment variables cp .env.example .env.local

Start all services docker-compose up -d

Check if everything is running docker-compose ps ```

Your MAS Hub instance will be available at `http://localhost:3000`.

Manual Installation

If you prefer to install manually:

```bash # Install dependencies npm install

Set up database npm run db:setup

Start development server npm run dev ```

Environment Configuration

Edit your `.env.local` file with your configuration:

```env # Database DATABASE_URL="postgresql://user:password@localhost:5432/mashub"

MasChain Configuration MASCHAIN_API_URL="https://api.maschain.com" MASCHAIN_CLIENT_ID="your_client_id" MASCHAIN_CLIENT_SECRET="your_client_secret" MASCHAIN_NETWORK="testnet"

Security JWT_SECRET="your-super-secret-jwt-key" NEXTAUTH_SECRET="your-nextauth-secret" ```

Verification

Test your installation by making your first API call:

curl -X GET http://localhost:3000/api/health

You should see: ```json { "status": "healthy", "version": "1.0.0", "database": "connected", "maschain": "connected" } ```

Next Steps