This guide will help you configure the necessary services to run DoubleVision locally.
Run this command in your terminal:
openssl rand -base64 32Copy the output and add it to .env.local as NEXTAUTH_SECRET
- Go to https://www.mongodb.com/cloud/atlas/register
- Sign up for a free account (no credit card required)
- Click "Create" → "Deploy a database"
- Choose FREE M0 tier
- Select a cloud provider and region (closest to you)
- Name your cluster (e.g., "DoubleVision")
- Click "Create Deployment"
- Choose authentication method: Username and Password
- Create username and strong password
- SAVE THESE CREDENTIALS - you'll need them for the connection string
- Click "Create Database User"
- Click "Add IP Address"
- For development, click "Allow Access from Anywhere" (0.0.0.0/0)
⚠️ For production, restrict to specific IPs
- Click "Confirm"
- Click "Connect" on your cluster
- Choose "Connect your application"
- Select "Node.js" driver
- Copy the connection string
- Replace
<username>with your database username - Replace
<password>with your database password - Add
/doublevisionafter.net/to specify database name
Example:
mongodb+srv://myuser:mypassword@cluster0.xxxxx.mongodb.net/doublevision?retryWrites=true&w=majority
Add this to .env.local as MONGODB_URI
- Go to https://console.cloud.google.com/
- Click "Select a project" → "New Project"
- Name: "DoubleVision"
- Click "Create"
- Go to "APIs & Services" → "OAuth consent screen"
- Choose "External" user type
- Fill in:
- App name: "DoubleVision"
- User support email: your email
- Developer contact: your email
- Click "Save and Continue"
- Skip "Scopes" (click "Save and Continue")
- Add test users (your email)
- Click "Save and Continue"
- Go to "Credentials" → "Create Credentials" → "OAuth client ID"
- Application type: "Web application"
- Name: "DoubleVision Web"
- Authorized JavaScript origins:
http://localhost:3000
- Authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
- Click "Create"
- SAVE your Client ID and Client Secret
- Add to
.env.local:AUTH_GOOGLE_ID=your-client-idAUTH_GOOGLE_SECRET=your-client-secret
- Go to https://github.com/settings/developers
- Click "OAuth Apps" → "New OAuth App"
- Fill in:
- Application name: "DoubleVision"
- Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Click "Register application"
- Click "Generate a new client secret"
- SAVE your Client ID and Client Secret
- Add to
.env.local:AUTH_GITHUB_ID=your-client-idAUTH_GITHUB_SECRET=your-client-secret
Your .env.local should look like this:
# Database
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/doublevision?retryWrites=true&w=majority
# NextAuth
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-generated-secret-here
# Google OAuth
AUTH_GOOGLE_ID=123456789-abc123.apps.googleusercontent.com
AUTH_GOOGLE_SECRET=GOCSPX-abc123def456
# GitHub OAuth
AUTH_GITHUB_ID=Iv1.abc123def456
AUTH_GITHUB_SECRET=abc123def456ghi789-
Start the dev server (if not already running):
npm run dev
-
Click "Get Started"
-
Try signing in with Google or GitHub
-
You should be redirected to the dashboard!
- Double-check your Client IDs and Secrets
- Make sure there are no extra spaces
- Verify callback URLs match exactly
- Check your connection string format
- Verify username and password are correct
- Ensure IP address is whitelisted (0.0.0.0/0 for development)
- Check if MongoDB Atlas cluster is running
- Verify NEXTAUTH_SECRET is set
- Check NEXTAUTH_URL is
http://localhost:3000 - Restart dev server after changing .env.local
- MongoDB Atlas Docs: https://www.mongodb.com/docs/atlas/
- Google OAuth Docs: https://developers.google.com/identity/protocols/oauth2
- GitHub OAuth Docs: https://docs.github.com/en/apps/oauth-apps
- NextAuth.js Docs: https://authjs.dev/