Installation

This guide covers the installation of Supametrics and how to start your new project.

To install and use Supametrics for your projects, follow these steps:

Prerequisites (React.js / Next.js)

1

System Requirements

  • Node.js: Ensure you have Node.js installed. The project uses npm, which comes with Node.js.
    Download Node.js here.
  • NPM or Yarn: Supametrics uses npm commands, but Yarn works too.
    To verify installation, run:
node -v
npm -v
2

Install Supametrics SDK

To install the Supametrics SDK in your React or Next.js project, run:

npm install supametrics

Then integrate it into your app (see Setup Guide).

3

Code Editor

You’ll need a code editor to add and configure the SDK. Common options include:


Setting Up the Supametrics Monorepo

Supametrics is a monorepo consisting of three core apps:

  1. Go Server — Handles event collection and analytics storage.
  2. Hono API — Manages authentication, teams, and project operations.
  3. Dashboard — Frontend interface for managing analytics and settings.

Follow the steps below to set it up locally or on your preferred hosting platform.

1

Clone the Repository

Clone the Supametrics monorepo from GitHub:

git clone https://github.com/supametrics/supametrics.git
cd supametrics
2

Configure the Go Server

  1. Navigate to the Go server directory:
cd apps/go-server
  1. Copy the example environment file:
cp .env.example .env
  1. Fill in your environment variables — such as database URL, Redis connection, and API keys.

  2. Start the server locally or deploy it to your preferred platform (e.g., Render, Railway, Fly.io):

go run main.go
3

Set Up the Hono API and Dashboard

After deploying your Go server:

  1. Navigate to the Hono API app:
cd ../hono-api
cp .env.example .env

Add your environment variables and start the server locally:

npm install
npm run dev
  1. Then set up the Dashboard app:
cd ../dashboard
cp .env.example .env
npm install
npm run dev
4

Create a Project

Once your backend and dashboard are running:

  1. Log into the dashboard.

  2. Click Create Project.

  3. Open the project to access your analytics view.

  4. In the top-right corner of the project header, click the Settings (⚙️) popover button.

    • Here you can manage environment variables, API keys, and integration URLs.