Next.JS + Supabase + TailwindCSS + Vercel
This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.ts
.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Users
create table
public.users (
id uuid not null,
email text null,
name text null,
role text not null default 'participant'::text,
phone text null,
is_rcc boolean null,
swc_payment boolean null,
college text null,
year text null,
coordinating_event_id smallint null,
created_at timestamp with time zone null default now(),
constraint users_pkey primary key (id),
constraint users_email_key unique (email),
constraint users_id_fkey foreign key (id) references auth.users (id) on delete cascade,
constraint users_coordinating_event_id_fkey foreign key (coordinating_event_id) references events (id),
constraint users_phone_check check (
(
(length(phone) = 10)
or (length(coalesce(phone, ''::text)) = 0)
)
),
constraint users_role_check check (
(
(role = 'participant'::text)
or (role = 'event_manager'::text)
or (role = 'convenor'::text)
or (role = 'coordinator'::text)
or (role = 'superadmin'::text)
or (role = 'finance_manager'::text)
)
),
constraint users_year_check check (
(
(length(year) = 4)
or (length(coalesce(year, ''::text)) = 0)
)
)
) tablespace pg_default;
Events
create table
public.events (
id smallint generated by default as identity not null,
name text not null,
type text not null,
team_size smallint not null,
coordinators array null,
rules_regulations character varying not null,
multiple_registrations_allowed boolean not null,
is_open boolean not null,
fees smallint null,
min_members smallint not null default '1'::smallint,
details text null,
poster_image text null,
covenor uuid null,
prize_pool smallint null,
faculty_coordinator text not null default '""'::text,
constraint events_pkey primary key (id),
constraint events_covenor_fkey foreign key (covenor) references users (id),
constraint events_type_check check (
(
(
type = 'TEAM'::text
)
or (
type = 'SOLO'::text
)
)
)
) tablespace pg_default;
Participation
create table
public.participation (
id uuid not null default uuid_generate_v4 (),
event_id smallint not null,
team_name text null,
registered_by text not null,
phone_number text null,
team_member_0 text null,
team_member_1 text null,
team_member_2 text null,
team_member_3 text null,
team_member_4 text null,
team_member_5 text null,
team_member_6 text null,
team_member_7 text null,
team_member_8 text null,
team_member_9 text null,
team_member_10 text null,
team_member_11 text null,
team_member_12 text null,
team_member_13 text null,
team_member_14 text null,
team_member_15 text null,
transaction_id text null,
upi_id text null,
transaction_screenshot_file_name text null,
transaction_verified boolean null default false,
registration_cancelled boolean null default false,
constraint participation_pkey primary key (id),
constraint participation_registered_by_fkey foreign key (registered_by) references users (email),
constraint participation_team_member_0_fkey foreign key (team_member_0) references users (email),
constraint participation_team_member_1_fkey foreign key (team_member_1) references users (email),
constraint participation_team_member_2_fkey foreign key (team_member_2) references users (email),
constraint participation_team_member_3_fkey foreign key (team_member_3) references users (email),
constraint participation_team_member_4_fkey foreign key (team_member_4) references users (email),
constraint participation_team_member_5_fkey foreign key (team_member_5) references users (email),
constraint participation_team_member_6_fkey foreign key (team_member_6) references users (email),
constraint participation_team_member_7_fkey foreign key (team_member_7) references users (email),
constraint participation_team_member_8_fkey foreign key (team_member_8) references users (email),
constraint participation_team_member_9_fkey foreign key (team_member_9) references users (email),
constraint participation_team_member_10_fkey foreign key (team_member_10) references users (email),
constraint participation_team_member_11_fkey foreign key (team_member_11) references users (email),
constraint participation_team_member_12_fkey foreign key (team_member_12) references users (email),
constraint participation_team_member_13_fkey foreign key (team_member_13) references users (email),
constraint participation_team_member_14_fkey foreign key (team_member_14) references users (email),
constraint participation_team_member_15_fkey foreign key (team_member_15) references users (email),
constraint participation_event_id_fkey foreign key (event_id) references events (id),
constraint team_name_not_null_if_team_member_0_not_null check (
(
(
(team_name is not null)
and (team_member_0 is not null)
)
or (team_member_0 is null)
)
)
) tablespace pg_default;
Sponsors
create table
public.sponsors (
id bigint generated by default as identity not null,
created_at timestamp with time zone null default now(),
category text null default ''::text,
sponsor_arr json null,
constraint sponsors_pkey primary key (id)
) tablespace pg_default;