Production-Ready REST API Platform

Secure API infrastructure, built to scale

A fullstack NestJS + Next.js platform with API key management, RBAC, audit logging, Redis rate limiting, and interactive documentation—all production-hardened out of the box.

20+
Endpoints
JWT + API Key
Auth Methods
3 Tiers
Roles
NestJS + Next.js
Stack

Everything you need in production

🔐

API Key Management

Generate, rotate, and revoke API keys with bcrypt hashing, prefix lookup, IP whitelisting, and per-key rate limiting.

🛡️

Role-Based Access Control

Three-tier hierarchy: OWNER › ADMIN › MEMBER with custom guard decorators enforced across all endpoints.

JWT + Session Auth

Short-lived access tokens (15m) with rotating refresh tokens (7d) and server-side session revocation.

📋

Audit Logging

Every mutating request is recorded to the database with automatic redaction of sensitive fields.

🚦

Rate Limiting

Global throttling via NestJS ThrottlerModule plus Redis-backed per-API-key rate limiting with sliding window.

🔒

Security Hardened

Helmet, strict CORS, ValidationPipe with whitelist, input sanitization, and global exception filter.

Quick Reference

View all endpoints →
POST/api/v1/auth/register
POST/api/v1/auth/login
POST/api/v1/auth/refresh
GET/api/v1/users/me
GET/api/v1/api-keys
POST/api/v1/api-keys
PATCH/api/v1/api-keys/:id/rotate
GET/api/v1/admin/users

Quick Start

1

Register

POST /api/v1/auth/register
{ "email": "you@example.com", "name": "Name", "password": "Pass@1234" }
2

Login & get token

POST /api/v1/auth/login
{ "email": "you@example.com", "password": "Pass@1234" }
3

Generate an API key

POST /api/v1/api-keys
Authorization: Bearer <accessToken>
{ "name": "My Key" }
4

Call any endpoint

GET /api/v1/users/me
x-api-key: <your-api-key>