A high-performance, schema-less JSON storage proxy optimized for Vercel Edge Functions and Upstash Redis. Clash DB eliminates the need for complex database drivers and ORMs in lightweight projects, providing a RESTful bridge to high-speed KV storage.
Modern serverless applications often need simple state persistence without the overhead of a full SQL or NoSQL cluster. Clash DB provides:
- Zero-Latency Logic: Designed to run on Vercel Edge for minimal overhead.
- RESTful Simplicity: Pure HTTP interface; compatible with any language (JS, Python, Go, Rust, etc.).
- Visual Control: Built-in hacker-themed dashboard for real-time data exploration.
- Enterprise-Ready: Includes modular asset management and built-in security standards.
- Instant Routing: URL paths automatically map to Redis keys (e.g.,
POST /api/user/configsaves to theuser:configkey). - Built-in Data Explorer: Comes with a sleek, dark-mode frontend GUI to view, search, edit, and nuke your database visually.
- Advanced Endpoints: Includes
_dumpto get all records,_searchfor wildcard key matching, and_flushto nuke everything. - CORS Enabled: Call it from any web app, browser, or script without cross-origin policy errors.
- Secure: Every request is protected by a single
x-api-key.
- Click the Deploy with Vercel button above.
- Vercel will prompt you to add an Environment Variable:
MASTER_API_KEY. Set this to a secure string (e.g.,clash_secret_2026). - Once the initial deployment finishes, go to the Storage tab in your Vercel project dashboard.
- Scroll down to Marketplace Database Providers and click Create next to Upstash.
- CRITICAL STEP: When prompted for the "Custom Environment Variable Prefix", you MUST set it to exactly:
UPSTASH_REDIS_REST. - Click "Connect Project".
- CRITICAL STEP: Go to the Deployments tab in Vercel, click the three dots on your latest deployment, and hit Redeploy. Environment variables never apply to live code until you build a fresh deployment!
Always include your master key in the headers: x-api-key: your_master_key_here
- Save Data:
POST /api/path/to/key(Body: JSON or Text) - Get Data:
GET /api/path/to/key - Delete Data:
DELETE /api/path/to/key
- Dump All Data:
GET /api/_dump(Returns a JSON object of the entire DB) - Search Keys:
GET /api/_search?q=pattern(Returns keys matching*pattern*) - Flush Database:
DELETE /api/_flush(Wipes the entire DB clean)
const url = 'https://your-domain.vercel.app/api/bot/config';
const headers = {
'Content-Type': 'application/json',
'x-api-key': 'your-master-key'
};
// Save
await fetch(url, { method: 'POST', headers, body: JSON.stringify({ active: true }) });
// Read
const data = await fetch(url, { headers }).then(r => r.json());
console.log(data);import requests
url = 'https://your-domain.vercel.app/api/bot/config'
headers = {'x-api-key': 'your-master-key'}
# Save
requests.post(url, json={'active': True}, headers=headers)
# Read
data = requests.get(url, headers=headers).json()
print(data)Built between JEE mock tests by Ajisth (@ajisth69).