Skip to content

v0-art/Rozephyr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anonymous VPN MVP

Zero-knowledge anonymous VPN built with Next.js, React Three Fiber, database encryption, and Paddle billing.

Tech Stack

  • Next.js 15+ (App Router)
  • React Three Fiber / Drei (3D interface)
  • PostgreSQL + Prisma ORM
  • Zod (validation)
  • Argon2id (password hashing)
  • Jose (secure JWT sessions in httpOnly cookies)
  • Paddle (Checkout & Webhooks)
  • Tailwind CSS

Architecture & Security

  • No Email Registration: Accounts are mapped to auto-generated VPN-XXXXXX IDs.
  • Crypto storage: Passwords are hashed with argon2.
  • VPN Configs: Encrypted in the database using AES-256-GCM.
  • Billing separation: Only Paddle Customer/Subscription IDs are kept on our end. No card data.
  • Anti-Bot & Limits: Inbuilt SVG Captcha for auth. 1000 active users cap. Automatic cron cleanup for abandoned free accounts.

Setup Instructions

1. Environment Variables

Copy .env.example to .env and fill the variables:

cp .env.example .env

Ensure you set a valid 32-character string for VPN_CONFIG_ENCRYPTION_KEY in production, and set a random string for CRON_SECRET to protect the cron endpoint.

2. Database

Ensure you have a PostgreSQL database running and mapped to DATABASE_URL.

Run Prisma push and generate:

npx prisma db push
npx prisma generate

Seed the default subscription plan:

npx tsx prisma/seed.ts

3. Local Development

npm run dev
# or
pnpm dev

Paddle Sandbox Setup

  1. Set PADDLE_ENVIRONMENT=sandbox in .env.
  2. Get your test API key from Paddle Dashboard -> Developer tools -> Authentication.
  3. Replace NEXT_PUBLIC_PADDLE_CLIENT_TOKEN with your Sandbox Client Token.
  4. Use a service like ngrok to forward local port 3000 to the web and paste the URL in the Paddle webhooks page.
  5. Set PADDLE_WEBHOOK_SECRET with the signature key provided in the Paddle dashboard.

Mock VPN Provider

By default, the .env has VPN_PROVIDER=mock, which returns dummy payloads to test the logic without requiring a real VPN edge server. Later, change VPN_PROVIDER=marzban and configure Marzban API credentials in .env to connect it to an actual endpoint.

What is in MVP

  • 3D futuristic landing page.
  • Secure Anonymous Registration flow.
  • Login and Session creation.
  • Payment checkout integration (Paddle SDK).
  • Webhook endpoints to verify and grant active VPN access.
  • Basic mock VPN config issue and rotation endpoints.
  • Base schemas, legal pages.

What is NOT in MVP

  • A real Marzban external integration (Currently stubbed to log statements in lib/vpn/provider.ts).
  • Public admin panel.
  • Account password recovery (As there are no emails!).

About

Stream. Download. Enjoy. Unfiltered.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors