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
- Clone the repository:
git clone https://bitbucket.org/visby8em/click-tracker.git
cd click-tracker
- Install dependencies:
npm install
- Create a
.envfile with your database connection string:
DATABASE_URL=postgresql://username:password@hostname:port/database?sslmode=require
- Run the development server:
npm run dev
API Reference
The API provides the following endpoints: