Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d833aed
Create next.js project
Synaptic149 Jul 16, 2025
ae3b87d
Update Supabase credentials in .env.example
Synaptic149 Jul 16, 2025
1c1b11b
Update package-lock.json
Synaptic149 Jul 18, 2025
61bd3ce
create basic events page
Synaptic149 Jul 18, 2025
cdd5101
Delete vercel deploy button
Synaptic149 Jul 18, 2025
15dacc1
Use oxanium font
Synaptic149 Jul 18, 2025
c7969fb
remove some nextjs/supabase branding
Synaptic149 Jul 18, 2025
45e56e2
add basic formatting to events page
Synaptic149 Jul 18, 2025
e13caf7
add subpages for events and links
Synaptic149 Jul 18, 2025
a12ef7a
sort events by date and time
Synaptic149 Jul 18, 2025
b14de9d
add metadata to event pages
Synaptic149 Jul 18, 2025
6cb309f
create and use common navbar component
Synaptic149 Jul 22, 2025
7e77bc6
fix element centering
Synaptic149 Jul 22, 2025
a8b1f4c
make the footer a common element
Synaptic149 Jul 25, 2025
ac4f214
fix indents in navbar and footer
Synaptic149 Jul 25, 2025
805a150
add events list to navbar
Synaptic149 Jul 25, 2025
3bd509a
make events visible to users who are not logged in
Synaptic149 Jul 25, 2025
b6ee2a0
use common navbar and footer in protected page
Synaptic149 Jul 25, 2025
9682725
delete next steps in protected page
Synaptic149 Jul 25, 2025
3c91332
Add instructions for 3rd party API keys in .env.example
Synaptic149 Jul 25, 2025
333d0ff
update npm
Synaptic149 Aug 18, 2025
95149f8
Adding scrimmage page-ish
Insignia101 Sep 1, 2025
9501eeb
scrimmage page with scrimmage data
Insignia101 Sep 1, 2025
3126fe8
fixing data retrieval
Insignia101 Sep 1, 2025
47318a2
Another patch
Insignia101 Sep 1, 2025
dff04b4
debugging
Insignia101 Sep 1, 2025
38f2b73
trying again
Insignia101 Sep 1, 2025
d1c6951
ai debugging
Insignia101 Sep 1, 2025
ad3bf30
more ai debugging
Insignia101 Sep 1, 2025
550acb0
Code works! Yay!
Insignia101 Sep 1, 2025
738fcac
Paths adjusted
Insignia101 Sep 1, 2025
d0c727d
Added information
Insignia101 Sep 1, 2025
7fe524a
minor patch
Insignia101 Sep 1, 2025
ae117bb
another patch
Insignia101 Sep 1, 2025
4f17486
whopops
Insignia101 Sep 1, 2025
1b610f7
s p a c e
Insignia101 Sep 1, 2025
6d048e4
Last few details
Insignia101 Sep 1, 2025
88bd785
Added slightly more space
Insignia101 Sep 1, 2025
1fcb9ef
add scrimmage button completed
Insignia101 Sep 2, 2025
88e2d3b
testing button
Insignia101 Sep 2, 2025
ef732e0
Changes to add scrimmage button
Insignia101 Sep 2, 2025
35d66a7
Minor fixes
Insignia101 Sep 2, 2025
d0270b3
more minor changes
Insignia101 Sep 2, 2025
1bcf462
fix description
Insignia101 Sep 2, 2025
65cd018
fixing title
Insignia101 Sep 2, 2025
06cce9c
reloading page
Insignia101 Sep 2, 2025
c6b8b15
adding reload
Insignia101 Sep 2, 2025
d38ea1f
Moving add scrimmage button
Insignia101 Sep 2, 2025
3e79c4e
aesthetics
Insignia101 Sep 2, 2025
1dbaab2
disable eslint during builds - TEMPORARY FIX! FIX THIS LATER
Synaptic149 Sep 2, 2025
4adcf16
ignore ts errors
Synaptic149 Sep 2, 2025
fc14ced
Merge branch 'fix-vercel-build-fail' into ruben_setup2
Synaptic149 Sep 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
13 changes: 13 additions & 0 deletions site/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Update these with your Supabase details from your project settings > API
# https://app.supabase.com/project/_/settings/api

# Copy these keys to env.local in the "site" directory
# If it doesn't exist, create it

NEXT_PUBLIC_SUPABASE_URL=https://lhftupyjtlaanwdcvowe.supabase.co
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImxoZnR1cHlqdGxhYW53ZGN2b3dlIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTI2ODU5MjIsImV4cCI6MjA2ODI2MTkyMn0.WTcwpfDCDkj_op3RwmBgREUcoKSfotKdleH1F-fMQVM

# For 3rd Party API keys, ask a board member for the API keys if you are a Hawkbot1cs developer.
# If you are a community developer, you will need to make your own API keys for the services you wish to work on.

# GOOGLE_MAPS_API_KEY
42 changes: 42 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/versions

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*.local
.env

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
105 changes: 105 additions & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<a href="https://demo-nextjs-with-supabase.vercel.app/">
<img alt="Next.js and Supabase Starter Kit - the fastest way to build apps with Next.js and Supabase" src="https://demo-nextjs-with-supabase.vercel.app/opengraph-image.png">
<h1 align="center">Next.js and Supabase Starter Kit</h1>
</a>

<p align="center">
The fastest way to build apps with Next.js and Supabase
</p>

<p align="center">
<a href="#features"><strong>Features</strong></a> ·
<a href="#demo"><strong>Demo</strong></a> ·
<a href="#deploy-to-vercel"><strong>Deploy to Vercel</strong></a> ·
<a href="#clone-and-run-locally"><strong>Clone and run locally</strong></a> ·
<a href="#feedback-and-issues"><strong>Feedback and issues</strong></a>
<a href="#more-supabase-examples"><strong>More Examples</strong></a>
</p>
<br/>

## Features

- Works across the entire [Next.js](https://nextjs.org) stack
- App Router
- Pages Router
- Middleware
- Client
- Server
- It just works!
- supabase-ssr. A package to configure Supabase Auth to use cookies
- Password-based authentication block installed via the [Supabase UI Library](https://supabase.com/ui/docs/nextjs/password-based-auth)
- Styling with [Tailwind CSS](https://tailwindcss.com)
- Components with [shadcn/ui](https://ui.shadcn.com/)
- Optional deployment with [Supabase Vercel Integration and Vercel deploy](#deploy-your-own)
- Environment variables automatically assigned to Vercel project

## Demo

You can view a fully working demo at [demo-nextjs-with-supabase.vercel.app](https://demo-nextjs-with-supabase.vercel.app/).

## Deploy to Vercel

Vercel deployment will guide you through creating a Supabase account and project.

After installation of the Supabase integration, all relevant environment variables will be assigned to the project so the deployment is fully functioning.

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-supabase&project-name=nextjs-with-supabase&repository-name=nextjs-with-supabase&demo-title=nextjs-with-supabase&demo-description=This+starter+configures+Supabase+Auth+to+use+cookies%2C+making+the+user%27s+session+available+throughout+the+entire+Next.js+app+-+Client+Components%2C+Server+Components%2C+Route+Handlers%2C+Server+Actions+and+Middleware.&demo-url=https%3A%2F%2Fdemo-nextjs-with-supabase.vercel.app%2F&external-id=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fwith-supabase&demo-image=https%3A%2F%2Fdemo-nextjs-with-supabase.vercel.app%2Fopengraph-image.png)

The above will also clone the Starter kit to your GitHub, you can clone that locally and develop locally.

If you wish to just develop locally and not deploy to Vercel, [follow the steps below](#clone-and-run-locally).

## Clone and run locally

1. You'll first need a Supabase project which can be made [via the Supabase dashboard](https://database.new)

2. Create a Next.js app using the Supabase Starter template npx command

```bash
npx create-next-app --example with-supabase with-supabase-app
```

```bash
yarn create next-app --example with-supabase with-supabase-app
```

```bash
pnpm create next-app --example with-supabase with-supabase-app
```

3. Use `cd` to change into the app's directory

```bash
cd with-supabase-app
```

4. Rename `.env.example` to `.env.local` and update the following:

```
NEXT_PUBLIC_SUPABASE_URL=[INSERT SUPABASE PROJECT URL]
NEXT_PUBLIC_SUPABASE_ANON_KEY=[INSERT SUPABASE PROJECT API ANON KEY]
```

Both `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_ANON_KEY` can be found in [your Supabase project's API settings](https://supabase.com/dashboard/project/_?showConnect=true)

5. You can now run the Next.js local development server:

```bash
npm run dev
```

The starter kit should now be running on [localhost:3000](http://localhost:3000/).

6. This template comes with the default shadcn/ui style initialized. If you instead want other ui.shadcn styles, delete `components.json` and [re-install shadcn/ui](https://ui.shadcn.com/docs/installation/next)

> Check out [the docs for Local Development](https://supabase.com/docs/guides/getting-started/local-development) to also run Supabase locally.

## Feedback and issues

Please file feedback and issues over on the [Supabase GitHub org](https://github.com/supabase/supabase/issues/new/choose).

## More Supabase examples

- [Next.js Subscription Payments Starter](https://github.com/vercel/nextjs-subscription-payments)
- [Cookie-based Auth and the Next.js 13 App Router (free course)](https://youtube.com/playlist?list=PL5S4mPUpp4OtMhpnp93EFSo42iQ40XjbF)
- [Supabase Auth and the Next.js App Router](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs)
30 changes: 30 additions & 0 deletions site/app/auth/confirm/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { createClient } from "@/lib/supabase/server";
import { type EmailOtpType } from "@supabase/supabase-js";
import { redirect } from "next/navigation";
import { type NextRequest } from "next/server";

export async function GET(request: NextRequest) {
const { searchParams } = new URL(request.url);
const token_hash = searchParams.get("token_hash");
const type = searchParams.get("type") as EmailOtpType | null;
const next = searchParams.get("next") ?? "/";

if (token_hash && type) {
const supabase = await createClient();

const { error } = await supabase.auth.verifyOtp({
type,
token_hash,
});
if (!error) {
// redirect user to specified redirect URL or root of app
redirect(next);
} else {
// redirect the user to an error page with some instructions
redirect(`/auth/error?error=${error?.message}`);
}
}

// redirect the user to an error page with some instructions
redirect(`/auth/error?error=No token hash or type`);
}
36 changes: 36 additions & 0 deletions site/app/auth/error/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";

export default async function Page({
searchParams,
}: {
searchParams: Promise<{ error: string }>;
}) {
const params = await searchParams;

return (
<div className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
<div className="w-full max-w-sm">
<div className="flex flex-col gap-6">
<Card>
<CardHeader>
<CardTitle className="text-2xl">
Sorry, something went wrong.
</CardTitle>
</CardHeader>
<CardContent>
{params?.error ? (
<p className="text-sm text-muted-foreground">
Code error: {params.error}
</p>
) : (
<p className="text-sm text-muted-foreground">
An unspecified error occurred.
</p>
)}
</CardContent>
</Card>
</div>
</div>
</div>
);
}
11 changes: 11 additions & 0 deletions site/app/auth/forgot-password/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ForgotPasswordForm } from "@/components/forgot-password-form";

export default function Page() {
return (
<div className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
<div className="w-full max-w-sm">
<ForgotPasswordForm />
</div>
</div>
);
}
11 changes: 11 additions & 0 deletions site/app/auth/login/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { LoginForm } from "@/components/login-form";

export default function Page() {
return (
<div className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
<div className="w-full max-w-sm">
<LoginForm />
</div>
</div>
);
}
32 changes: 32 additions & 0 deletions site/app/auth/sign-up-success/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@/components/ui/card";

export default function Page() {
return (
<div className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
<div className="w-full max-w-sm">
<div className="flex flex-col gap-6">
<Card>
<CardHeader>
<CardTitle className="text-2xl">
Thank you for signing up!
</CardTitle>
<CardDescription>Check your email to confirm</CardDescription>
</CardHeader>
<CardContent>
<p className="text-sm text-muted-foreground">
You&apos;ve successfully signed up. Please check your email to
confirm your account before signing in.
</p>
</CardContent>
</Card>
</div>
</div>
</div>
);
}
11 changes: 11 additions & 0 deletions site/app/auth/sign-up/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { SignUpForm } from "@/components/sign-up-form";

export default function Page() {
return (
<div className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
<div className="w-full max-w-sm">
<SignUpForm />
</div>
</div>
);
}
11 changes: 11 additions & 0 deletions site/app/auth/update-password/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { UpdatePasswordForm } from "@/components/update-password-form";

export default function Page() {
return (
<div className="flex min-h-svh w-full items-center justify-center p-6 md:p-10">
<div className="w-full max-w-sm">
<UpdatePasswordForm />
</div>
</div>
);
}
37 changes: 37 additions & 0 deletions site/app/events/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { createClient } from "@/lib/supabase/server";
import { notFound } from "next/navigation";
import { Navbar } from "@/components/navbar";
import { Footer } from "@/components/footer";

export default async function EventPage({ params }: { params: { id: string } }) {
const supabase = await createClient();

const { data: event, error } = await supabase
.from("events")
.select("*")
.eq("id", params.id)
.single();

if (error || !event) {
notFound(); // built-in Next.js 404
}

return (
<div>
<Navbar />
<div className="p-6 max-w-2xl mx-auto">
<h1 className="text-3xl font-bold mb-2">{event.title}</h1>
<p className="text-gray-600 text-sm mb-4">
{new Date(event.eventTime).toLocaleString()}
</p>
<p>{event.description}</p>
</div>
<Footer />
</div>
);
}

export const metadata = {
title: "Event Details",
description: "Details of the selected event",
};
Loading