Deployment
Dotnify is a serverless application — the backend uses serverless functions and the data layer uses Upstash Redis. No traditional server or database is needed.
Vercel
Vercel is the primary deployment target. The project includes a vercel.json with pre-configured rewrites and function settings.
One-Click Deploy
Click the button below to deploy Dotnify to your Vercel account. Vercel will clone the repository, set up the Upstash Redis integration, and deploy automatically.
During deployment, Vercel will prompt you to create an Upstash Redis instance through its built-in integration — no separate Upstash account setup is needed.
Manual Deploy
1. Create an Upstash Redis Database
Option A: Vercel Upstash Integration (Recommended)
Vercel provides a built-in Upstash Redis integration that lets you create and manage a Redis database directly from your Vercel project:
- Go to your Vercel project → Storage tab
- Click Create Database → select Upstash Redis
- Choose a region and click Create
- Vercel automatically injects
UPSTASH_REDIS_REST_URLandUPSTASH_REDIS_REST_TOKENinto your project's environment variables — no manual configuration needed
The Vercel Upstash integration is the easiest option because:
- No separate Upstash account is required — everything is managed within Vercel
- Environment variables are automatically linked to your project
- You can view Redis metrics directly in the Vercel dashboard
- The free tier includes 10,000 commands per day, which is sufficient for personal use
Option B: Standalone Upstash Account
- Go to Upstash Console and create a new Redis instance
- Copy the REST URL and REST Token — you'll need these as environment variables
2. Import the Project
- Fork or clone the Dotnify repository
- Go to Vercel Dashboard and import the repository
- Vercel will auto-detect the Vite framework
3. Configure Environment Variables
If you used the Vercel Upstash integration, the environment variables are already set. Otherwise, add them manually in the Vercel project settings:
| Variable | Description | Required |
|---|---|---|
UPSTASH_REDIS_REST_URL | Upstash Redis REST URL (e.g. https://xxx.upstash.io) | Yes |
UPSTASH_REDIS_REST_TOKEN | Upstash Redis REST token | Yes |
4. Deploy
Click Deploy. Vercel will build the project and deploy it. The build uses npm run build which compiles the React frontend with Vite.
Vercel Configuration
The project includes a vercel.json that configures:
{
"buildCommand": "npm run build",
"outputDirectory": "dist",
"framework": "vite",
"rewrites": [
{ "source": "/api/(.*)", "destination": "/api/$1" },
{ "source": "/((?!api/).*)", "destination": "/index.html" }
],
"functions": {
"api/**/*.ts": {
"memory": 256,
"maxDuration": 10
}
}
}- Rewrites: API routes are served directly; all other routes fall through to the SPA
- Functions: Each serverless function is allocated 256 MB memory and a 10-second timeout
Local Development
To run Dotnify locally with the full API:
Option A: Using Vite Dev Server (Recommended)
The project includes a custom Vite plugin (scripts/vite-plugin-dev-api.ts) that serves the API functions directly during vite dev, so you don't need vercel dev.
- Create a
.env.localfile in the project root:
UPSTASH_REDIS_REST_URL="https://your-redis.upstash.io"
UPSTASH_REDIS_REST_TOKEN="your-redis-token"- Start the dev server:
npm run devThe app will be available at http://localhost:5173. API edits are picked up on the next request (no manual restart needed).
Option B: Using Vercel Dev
npm run dev:apiThis uses vercel dev which emulates the Vercel serverless environment locally. It reads .env.local for environment variables.
Data Storage
Dotnify uses three Redis keys to store all application state:
| Key | Description |
|---|---|
dotnify:admin | Admin credentials (username + scrypt password hash) |
dotnify:session:<token> | Active session (7-day TTL, auto-expires) |
dotnify:providers | JSON array of configured DNS providers |
No database schema or migrations are needed. Upstash Redis is serverless and billed per request, making it a good fit for low-traffic management tools.
Security Considerations
- Password hashing: Admin passwords are hashed with scrypt (64-byte key length) before storage
- Session tokens: 32-byte random tokens with 7-day TTL in Redis
- Timing-safe comparison: Password verification uses
crypto.timingSafeEqualto prevent timing attacks - API key masking: Provider API keys are masked in API responses (only last 4 characters visible)
- Bearer token auth: All API endpoints (except
/api/auth/meand/api/auth/setup) require a valid Bearer token - No CORS configuration: The API is same-origin only — the SPA and API are served from the same deployment