CodeDesk is a full-stack web application designed to help developers and learners stay organized, track progress, and master coding platforms effectively. It brings together the best resources, educators, and structured question sheets in one clean and interactive interface.
๐ Project Insights
| ๐ Stars | ๐ด Forks | ๐ Issues | ๐ Open PRs | ๐ Closed PRs | ๐ ๏ธ Languages | ๐ฅ Contributors |
This project is now OFFICIALLY accepted for:
๐ Exciting News...
๐ This project is now an official part of GirlScript Summer of Code โ GSSoC'25! ๐๐๐ป We're thrilled to welcome contributors from all over India and beyond to collaborate, build, and grow. Letโs make learning and career development smarter โ together! ๐๐จโ๐ป๐ฉโ๐ป
๐ฉโ๐ป GSSoC is one of Indiaโs largest 3-month-long open-source programs that encourages developers of all levels to contribute to real-world projects ๐ while learning, collaborating, and growing together. ๐ฑ
๐ With mentorship, community support, and collaborative coding, it's the perfect platform for developers to:
โจ Improve their skills ๐ค Contribute to impactful projects ๐ Get recognized for their work ๐ Receive certificates and swag!
๐ I canโt wait to welcome new contributors from GSSoC 2025 to this CodeDesk project family! Let's build, learn, and grow together โ one commit at a time. ๐ฅ๐จโ๐ป๐ฉโ๐ป
๐ฎ Coming Soon: AI-Powered Performance Tracking! An intelligent system to analyze user activity and visualize progress with interactiveย graphs.
This monorepo contains two workspaces:
| Directory | Description |
|---|---|
backend/ |
Node.js + Express + SUPABASE REST API boilerplate |
client/ |
React + Vite + Tailwind CSS frontend skeleton |
- Node.js โฅ 18
- SUPABASE account with project name CodeDesk
cd backend- Create
.envand set at least:SUPABASE_URLSUPABASE_SERVICE_ROLE_KEY- optional for local:
PORT=5000
npm installnpm run devโ starts API on http://localhost:5000- Must run these below SQL commands to proper run this project. Good Luck !!
Run these in order to create and secure user profile storage used by the backend.
- User profile table with Row Level Security (RLS)
-- (A) Profile data table
create table if not exists profiles (
supabase_id uuid primary key, -- matches auth.users.id
first_name text,
last_name text,
bio text,
country text,
education jsonb,
achievements jsonb,
work_experience jsonb,
platforms jsonb,
avatar_url text,
created_at timestamptz default now()
);
-- (B) Security: allow each user to read / update only their own row
alter table profiles enable row level security;
create policy "profiles owner can select"
on profiles for select
using (supabase_id = auth.uid());
create policy "profiles owner can update"
on profiles for update
using (supabase_id = auth.uid())
with check (supabase_id = auth.uid());- Auto create user profiles on signup (basic)
-- Automatically create a blank profile row whenever a user signs up
create or replace function public.handle_new_user()
returns trigger as $$
begin
-- Insert only if it doesn't exist (defensive)
insert into profiles (supabase_id)
values (new.id)
on conflict (supabase_id) do nothing;
return new;
end;
$$ language plpgsql security definer;
-- Attach the trigger to auth.users INSERT
drop trigger if exists on_signup on auth.users;
create trigger on_signup
after insert on auth.users
for each row execute procedure public.handle_new_user();- Auto create user profiles on signup (enhanced: split name into first/last)
-- Drop existing trigger and function
drop trigger if exists on_signup on auth.users;
drop function if exists public.handle_new_user();
-- Create updated function
create or replace function public.handle_new_user()
returns trigger as $$
begin
insert into public.profiles (
supabase_id,
first_name,
last_name,
created_at
) values (
new.id,
split_part(new.raw_user_meta_data->>'name', ' ', 1),
split_part(new.raw_user_meta_data->>'name', ' ', 2),
now()
);
return new;
end;
$$ language plpgsql security definer;
-- Recreate trigger
create trigger on_signup
after insert on auth.users
for each row execute procedure public.handle_new_user();- Recreate profiles table and policies (if needed)
-- Drop existing table and recreate with correct structure
drop table if exists public.profiles;
create table public.profiles (
supabase_id uuid primary key references auth.users(id),
first_name text,
last_name text,
bio text,
country text,
education jsonb default '[]'::jsonb,
achievements jsonb default '[]'::jsonb,
work_experience jsonb default '[]'::jsonb,
platforms jsonb default '{}'::jsonb,
avatar_url text,
created_at timestamptz default now()
);
-- Set up RLS policies
alter table profiles enable row level security;
create policy "Public profiles are viewable by everyone."
on profiles for select
using ( true );
create policy "Users can insert their own profile."
on profiles for insert
with check ( auth.uid() = supabase_id );
create policy "Users can update own profile."
on profiles for update
using ( auth.uid() = supabase_id );- Create table for workspace simply run this query in SQL editor
-- Create the table for sheets (if it doesn't exist)
CREATE TABLE IF NOT EXISTS public.sheets (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
title TEXT NOT NULL,
description TEXT,
created_by UUID REFERENCES auth.users(id),
created_at TIMESTAMPTZ DEFAULT NOW() NOT NULL
);
-- Create the table for notes
CREATE TABLE public.notes (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE NOT NULL,
content TEXT,
created_at TIMESTAMPTZ DEFAULT NOW() NOT NULL,
updated_at TIMESTAMPTZ DEFAULT NOW() NOT NULL
);
-- Security: Enable Row Level Security (RLS) for notes
ALTER TABLE public.notes ENABLE ROW LEVEL SECURITY;
-- Security: Define policies so users can only access their own notes
CREATE POLICY "Users can manage their own notes."
ON public.notes FOR ALL
USING ( auth.uid() = user_id )
WITH CHECK ( auth.uid() = user_id );
-- Create a join table for saved sheets
CREATE TABLE public.user_saved_sheets (
user_id UUID REFERENCES auth.users(id) ON DELETE CASCADE NOT NULL,
sheet_id UUID REFERENCES public.sheets(id) ON DELETE CASCADE NOT NULL,
saved_at TIMESTAMPTZ DEFAULT NOW() NOT NULL,
PRIMARY KEY (user_id, sheet_id)
);
-- Security: Enable RLS for the join table
ALTER TABLE public.user_saved_sheets ENABLE ROW LEVEL SECURITY;
-- Security: Define policies for the join table
CREATE POLICY "Users can manage their own saved sheets."
ON public.user_saved_sheets FOR ALL
USING ( auth.uid() = user_id )
WITH CHECK ( auth.uid() = user_id );cd client- make .env file with
VITE_SUPABASE_URL&VITE_SUPABASE_ANON_KEY&VITE_API_URL=http://localhost:3000 npm installnpm run devโ opens Vite dev server on http://localhost:3000
Thanks to these amazing people who have contributed to the CodeDesk project:
We love our contributors! If you'd like to help, please check out our CONTRIBUTE.md file for guidelines.
Show some
by starring this awesome repository!
For questions, suggestions, or collaboration, reach out via LinkedIn or open an issue!
Feel free to open issues or discussions if you have any feedback, feature suggestions, or want to collaborate!
This project is licensed under the MIT License.
|
Vipul Agarwal
|
๐จโ๐ป Developed By โค๏ธVipul Agarwal and contributorsโค๏ธ GitHub | LinkedIn


