Skip to main content

Introduction

Welcome to the Click Tracker API documentation. This API provides analytics tracking and role-based access control for portfolio websites.

Overview​

The Click Tracker API is a Next.js application that provides:

  • Click tracking for menu items and other interactive elements
  • User role management for role-based access control
  • Analytics data retrieval

Getting Started​

Prerequisites​

  • Node.js 18 or later
  • A PostgreSQL database (Neon PostgreSQL recommended)

Installation​

  1. Clone the repository:
git clone https://bitbucket.org/visby8em/click-tracker.git
cd click-tracker
  1. Install dependencies:
npm install
  1. Create a .env file with your database connection string:
DATABASE_URL=postgresql://username:password@hostname:port/database?sslmode=require
  1. Run the development server:
npm run dev

API Reference​

The API provides the following endpoints: