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)
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
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).
Code Editor
You’ll need a code editor to add and configure the SDK. Common options include:
- Visual Studio Code
- WebStorm
- Any preferred text editor.
Setting Up the Supametrics Monorepo
Supametrics is a monorepo consisting of three core apps:
- Go Server — Handles event collection and analytics storage.
- Hono API — Manages authentication, teams, and project operations.
- Dashboard — Frontend interface for managing analytics and settings.
Follow the steps below to set it up locally or on your preferred hosting platform.
Clone the Repository
Clone the Supametrics monorepo from GitHub:
git clone https://github.com/supametrics/supametrics.git
cd supametrics
Configure the Go Server
- Navigate to the Go server directory:
cd apps/go-server
- Copy the example environment file:
cp .env.example .env
-
Fill in your environment variables — such as database URL, Redis connection, and API keys.
-
Start the server locally or deploy it to your preferred platform (e.g., Render, Railway, Fly.io):
go run main.go
Set Up the Hono API and Dashboard
After deploying your Go server:
- 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
- Then set up the Dashboard app:
cd ../dashboard
cp .env.example .env
npm install
npm run dev
Create a Project
Once your backend and dashboard are running:
-
Log into the dashboard.
-
Click Create Project.
-
Open the project to access your analytics view.
-
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.