- Overview
- Prerequisites
- Setup Process
- Environment Configuration
- Common Errors and Troubleshooting
- Conclusion
This guide helps you set up the Aakar2025 built using Next.js with Supabase for backend and OAuth mailing support. It includes detailed steps and troubleshooting tips for a smooth development setup.
Ensure the following tools are installed:
- ✅ Git
- ✅ Node.js (LTS)
- ✅ Visual Studio Code
- ✅ A GitHub account (sign up here)
- ✅ Optional: Postman for API testing
-
Clone the Repository
git clone https://github.com/aakar2025/aakar2025.git cd aakar2025 -
Install Node Dependencies
npm install
-
Setup Environment File Copy the example env file and update it:
cp example.env .env.local
-
Configure Your Supabase & Auth Details
Add the following in.env.local:NEXT_PUBLIC_SUPABASE_URL=https://abcde12345.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOi...FAKE_KEY...eXAiOiJKV1Q AUTH_SECRET="randomlyGeneratedSecretKey==" MAIL_USER=test@example.com MAIL_CLIENT_ID=1234567890-fakeclientid.apps.googleusercontent.com MAIL_CLIENT_SECRET=FAKE_CLIENT_SECRET_123456 MAIL_ACCESS_TOKEN=ya29.fakeAccessToken123456789 MAIL_REFRESH_TOKEN=1//fakeRefreshToken123456789 NODE_ENV="development" DATABASE_URL="postgresql://user:password@db.example.com/dbname?sslmode=require"
✅ Note: Do not share your Supabase or Mail secrets publicly.
-
Run the App Locally
npm run dev
App will be available at
http://localhost:3000.
Here’s a breakdown of important environment variables:
| Variable | Description |
|---|---|
NEXT_PUBLIC_SUPABASE_URL |
Your Supabase project URL |
NEXT_PUBLIC_SUPABASE_ANON_KEY |
Supabase anon/public key |
AUTH_SECRET |
Used for encrypting cookies/sessions |
MAIL_USER |
Email used for sending mail (OAuth2) |
MAIL_CLIENT_ID |
Google OAuth client ID (used with Gmail API) |
Expand to view common issues
-
Error:
.env.local not loaded- Ensure your
.env.localfile exists and matches the required variable names.
- Ensure your
-
Supabase Auth not working
- Make sure Supabase authentication is enabled and configured in the Supabase project dashboard.
-
Port already in use
- Kill the running process:
lsof -i :3000 kill -9 <PID>
- Kill the running process:
-
Mail Not Sending
- Check that OAuth credentials are correct and allow less secure apps access in Google.
- Double-check your
.env.localhas no trailing whitespaces or broken strings.
-
“Module not found” Errors
- Run a clean install:
rm -rf node_modules npm install
- Run a clean install:
-
Deployment on Vercel
- Add all environment variables to the Vercel dashboard under Project → Settings → Environment Variables.
You're now all set to work with Aakar2025!
If you encounter additional issues, feel free to open an issue on the GitHub repo or contact the maintainer.
Happy Building 🚀