- YT Video For Setup Kinde Kinde Auth Setup Video
- Make Sure To Add Github, Facebook And Google Outh2.0 In Kinde
KINDE_CLIENT_ID=<change this>
KINDE_CLIENT_SECRET=<change this>
KINDE_ISSUER_URL=<change this>
KINDE_SITE_URL=http://localhost:3000
KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000
KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/dashboard
- Go to Your Supabase Dashboard.
- YT Video For Setup Supabase Supabase DB Setup
- Select Your Project / Create A New One.
- Navigate To The
Project Settings
In The Sidebar Of Your Newly Created Project. - Now Go To
API
UnderCONFIGURATION
Section. - Copy The
URL
AndANON-PUBLIC
From This Tab And Paste In Your .env.local File Respectively.
NEXT_PUBLIC_SUPABASE_PASSWORD=
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
NEXT_PUBLIC_BASE_URL=http://localhost:3000
- Go To Your Supabase Dashboard.
- Select Your Project.
- Navigate To The
SQL Editor
Tab In The Sidebar. - Run The Following SQL Query:
create table
public.event_details (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
event_title text not null,
event_description text not null,
event_location text not null,
event_registration_startdate timestamp with time zone not null,
event_registration_enddate timestamp with time zone not null,
team_size smallint not null default '1'::smallint,
event_enddate timestamp with time zone not null,
event_price text null default 'Free'::text,
event_likes bigint null default '0'::bigint,
event_formlink text not null,
organizer_name text not null,
organizer_email text not null,
organizer_contact bigint not null,
event_category text not null,
event_tags text[] not null,
event_social_links text[] not null,
event_duration bigint not null,
event_startdate timestamp with time zone not null,
updated_at timestamp with time zone null default (now() at time zone 'utc'::text),
constraint event_details_pkey primary key (id),
constraint event_details_created_at_key unique (created_at),
constraint event_details_event_title_key unique (event_title),
is_approved boolean null,
) tablespace pg_default;
-
Navigate To The
Storage
In The Sidebar Of Your Newly Created Project. -
Now Go To
New Bucket
And Create APublic Buckets
Namedevent_image
Andevent_space
. -
Then Under The Buckets We Have
CONFIGURATION
SelectPolicies
Make New Policy WithFor Full Customization
Forevent_images
Andevent_space
Withall
Permissions.
create table
public.event_images (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
url text not null,
event_id uuid not null,
constraint event_images_pkey primary key (id),
constraint event_images_event_id_fkey foreign key (event_id) references event_details (id)
) tablespace pg_default;
create table public.comments (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
event_id uuid not null references public.event_details(id) on delete cascade,
author text not null,
text text not null,
timestamp timestamp with time zone not null default now(),
constraint comments_pkey primary key (id)
) tablespace pg_default;
create table
public.event_participants (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
participant_name text not null,
participant_email text not null,
participant_contact bigint not null,
event_id uuid not null,
is_registered boolean null default false,
is_approved boolean null,
constraint event_participants_pkey primary key (id),
constraint event_participants_event_id_fkey foreign key (event_id) references event_details (id)
) tablespace pg_default;
create table
public.event_space (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
name text not null,
description text not null,
location text not null,
capacity bigint not null,
price_per_hour bigint not null,
owner_email character varying not null,
updated_at timestamp with time zone null default (now() at time zone 'utc'::text),
owner_contact bigint not null,
availability boolean null default true,
amenities text[] not null,
space_likes bigint null default '0'::bigint,
constraint event_space_pkey primary key (id),
constraint event_space_name_key unique (name)
) tablespace pg_default;
create table
public.event_space_img_vid (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
url text not null,
event_space_id uuid not null,
constraint event_space_img_vid_pkey primary key (id),
constraint event_space_img_vid_event_space_id_fkey foreign key (event_space_id) references event_space (id)
) tablespace pg_default;
create table
public.event_space_request (
id uuid not null default gen_random_uuid (),
created_at timestamp with time zone not null default now(),
organiser_id text not null,
space_id uuid not null,
request_date timestamp with time zone not null,
status character varying not null default 'pending'::character varying,
constraint event_space_request_pkey primary key (id),
constraint event_space_request_space_id_fkey foreign key (space_id) references event_space (id)
) tablespace pg_default;
CREATE TABLE public.event_feedback (
id uuid NOT NULL DEFAULT gen_random_uuid(),
event_id uuid NOT NULL REFERENCES public.event_details(id) ON DELETE CASCADE,
respondent_email TEXT NOT NULL,
enjoy_most TEXT NOT NULL,
organization_rating TEXT NOT NULL,
overall_satisfaction SMALLINT NOT NULL,
recommendation SMALLINT NOT NULL,
improvement TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
CONSTRAINT event_feedback_pkey PRIMARY KEY (id)
);
create table
public.contact_submissions (
id bigint generated by default as identity not null,
created_at timestamp with time zone not null default now(),
name text null,
email text null,
message text null,
constraint contact_submissions_pkey primary key (id)
) tablespace pg_default;
CREATE TABLE check_event_likes (
eventId TEXT NOT NULL,
userEmail TEXT NOT NULL,
PRIMARY KEY (eventId, userEmail)
);
create table
public.community_partners (
id bigint generated by default as identity not null,
created_at timestamp with time zone not null default now(),
name character varying null,
email character varying null,
phone bigint null,
community_name character varying null,
community_size bigint null,
"Desc" text null,
qualities text null,
believe text null,
constraint community_partners_pkey primary key (id)
) tablespace pg_default;
-
This Will Create A Table Named
event_details
,event_images
,event_participants
,event_space
,event_space_img_vid
,event_space_request
,contact_submissions
check_event_likes
andall
. -
Now Go To
Policies
UnderCONFIGURATION
Section. -
Create Policy for
event_details
,event_images
,event_participants
,event_space
,event_space_img_vid
,event_space_request
, andcontact_submissions
check_event_likes
Withall
Permissions.
Learn Whole Supabase (Optional)
YT Platlist
⭐️ Support The Project!
If You Find This Project Helpful, Please Consider Giving It A Star On GitHub! Your Support Helps To Grow The Project And Reach More Contributors.