π InternEdge β One Platform Endless Internships.

π₯ Seamless Supabase + Clerk Integration for Authentication- Backed Data Management
π§ Introduction
InternEdge is a full-featured web application I built to deeply explore how Supabase β the open-source Firebase alternative β works in production environments, especially when integrated with Clerk for modern authentication. spin up Supabase, create a table, call an API β and you're done. But in real-world apps, authentication and access control (Row Level Security, RLS), and custom roles are crucial. That's why InternEdge was created.
But beyond tech exploration, InternEdge was also built with a purpose:
To solve the struggle of finding and managing internships, both for students and companies.
β¨ Features
Hereβs what you can expect from
internedge
:π Authentication with Clerk
π§βπ Students can explore, search, and apply for internships
π’ Companies can post, update, and manage internship listings
βοΈ Applications handled and stored securely with Supabase
π‘οΈ Row Level Security (RLS) to protect and isolate user data
βοΈ Role-based Access Control using Supabase Policies
π¨ Minimal, clean UI for both applicant and recruiter sides
π Fully client-rendered with Vite and modern web tools
π οΈ Tech Stack
| Layer | Technology | | --- | --- | | Frontend | React, Shadcn Ui, Zod | | Auth | Clerk | | Backend DB | Node, Supabase | | Styling | Tailwind CSS | | Hosting | Vercel |
π§ͺ Why I Built This
While building side projects, I realized I needed:
A simple auth flow that works with third-party login and JWT access.
A PostgreSQL backend with real-time capabilities.
A playground to test Supabase RLS with actual auth claims from Clerk.
So I combined them and created internedge
.
It helped me learn:
How to sync Clerk users to Supabase
How Supabase treats authenticated users
Setting up RLS policies from scratch
Managing JWT templates in Supabase
Connecting Vite with secure
.env
variables
π Project Structure
InternEdge/
βββ src/
β βββ components/
β βββ pages/
β βββ utils/
βββ .env
βββ index.html
βββ package.json
βββ vite.config.js
βοΈ How to Install Locally
git clone https://github.com/adiitxa/InternEdge.git
cd internedge
npm install
npm run dev
π Environment Variables
Create a .env
file at the root of your project with the following:
VITE_SUPABASE_URL=your_supabase_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
β οΈ Note: Never share your Supabase service_role key publicly. Only use
anon
for frontend.
π Clerk + Supabase Integration
Connecting Clerk with Supabase allows us to enforce RLS policies using the identity of the logged-in user.
π https://supabase.com/partners/integrations/clerk
π Steps to Connect
Setup Clerk App
Go to Clerk Dashboard
Create a new app
Copy your publishable key
Add Supabase JWT Template in Clerk
Go to Clerk β JWT Templates β Add Template:
InternEdge: supabase
Template:
{
"sub": "{{user.id}}",
"email": "{{user.email_address}}"
}
This lets Supabase extract the user's ID and email from Clerk's token.
- Enable RLS in Supabase
In Supabase:
Create tables like
users
,applications
,internships
Turn on Row Level Security
Add policies like:
sqlCopyEdit-- Allow authenticated users to read their own data
CREATE POLICY "Users can view their own records"
ON users
FOR SELECT
USING (auth.uid() = id);
- Configure Supabase to validate Clerk tokens
In Supabase settings β Auth β JWT:
Set JWT secret to your Clerk JWT secret
Update the JWT audience to
authenticated
π Supabase Docs - JWT Auth
π Clerk Docs - Supabase Integration
π§ͺ Testing the Flow
Sign in using Clerkβs UI (Google/Email/etc.)
Supabase should recognize the session via the JWT
Supabase policies will enforce access only for the logged-in user's data
π§΅ Wrapping Up
This project gave me deep insights into:
Authentication flows using Clerk
Database-level access control with Supabase
Combining frontend security with backend logic
π GitHub Repo: https://github.com/adiitxa/InternEdge
- π Live Demo : https://internedge.vercel.app
Subscribe to my newsletter
Read articles from Aditya Gaikwad directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
