Skip to main content

Prerequisites

  • Node.js 18+
  • An Ollama instance (for the 8B model) or RunPod endpoint (for 32B)

Setup

1

Clone the repository

git clone https://github.com/DeepMako/mako.git
cd mako/mako-platform/gateway
2

Install dependencies

npm install
3

Configure environment

cp .env.example .env
Edit .env with your configuration. See Environment Variables for the full reference.
4

Start the server

npm start
You should see:
🦈 Mako Gateway running on http://localhost:3000
📡 Model: mako @ http://localhost:11434/api/chat
🆓 Free mode: ON — open access, no auth required

API routes

The gateway exposes these endpoints:
MethodPathDescription
POST/v1/chat/completionsChat completion (OpenAI-compatible)
GET/v1/modelsList models
GET/v1/toolsList available tools
POST/v1/tools/executeExecute a tool directly
GET/credits/balanceCheck credit balance
POST/credits/grantGrant credits (dev only)
POST/auth/api-keysCreate an API key
GET/healthHealth check

Database

The gateway uses SQLite by default, stored at ./data/mako.db. The database manages:
  • User accounts (keyed by wallet address)
  • API keys (hashed)
  • Credit balances and usage logs
For production, set DATABASE_PATH to a persistent volume.

Deployment

Railway

The repository includes railway.json and nixpacks.toml for one-click Railway deployment:
cd mako/mako-platform/gateway
railway up

Docker

Build and run with any container platform:
docker build -t mako-gateway .
docker run -p 3000:3000 --env-file .env mako-gateway

Other platforms

The gateway is a standard Express.js app. It works on Render, Heroku, Fly.io, or any Node.js hosting. Just set the environment variables and run npm start.