Skip to content

ClusterSandbox/RateGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RateGuard

Distributed, high-performance API rate limiter with real-time management dashboard.

Overview

RateGuard is a microservices-based SaaS platform that allows developers to protect their APIs from abuse. It features a high-speed proxy (Data Plane) powered by Redis and a management dashboard (Control Plane) built with React and PostgreSQL.

Tech Stack

  • Runtime: Bun (Fast JavaScript runtime)
  • Framework: ElysiaJS (High-performance web framework)
  • Database: PostgreSQL (Storage) & Redis (Cache/Rate Counting)
  • ORM: Prisma
  • Frontend: React + Vite + TailwindCSS
  • Architecture: Monorepo with Docker Support

Repository Structure

RateGuard/
├── services/
│   ├── proxy/           # High-speed Edge Proxy (Redis + Logic)
│   ├── dashboard-api/   # Management API (Auth + Postgres)
│   └── frontend/        # User Dashboard (React)
├── docker-compose.yml   # Infrastructure (DB & Cache)
└── README.md

Quick Start

1. Prerequisites

  • Bun installed
  • Docker & Docker Compose running

2. Start Infrastructure

# Spins up Redis (Cache) and PostgreSQL (DB)
docker compose up -d

3. Run the Services (Dev Mode)

Terminal 1: Dashboard API (Control Plane)

cd services/dashboard-api
bun install
bunx prisma migrate dev --name init  # Setup DB tables
bun run src/index.ts                 # Runs on localhost:3000

Terminal 2: Proxy (Data Plane)

cd services/proxy
bun install
bun run src/index.ts                 # Runs on localhost:8080

Status

Current Phase: Initial Development (MVP).

  • Basic Proxy Setup
  • Distributed Rate Limiting (Fixed Window)
  • User Authentication (JWT)
  • API-Key Authentication (In Progress)
  • React Dashboard Integration (In Progress)

About

Distributed, high-performance API rate limiter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published