Skip to content

Commit

Permalink
chore: remove template elements
Browse files Browse the repository at this point in the history
  • Loading branch information
vhpx committed Apr 15, 2024
1 parent eaa98b6 commit 56ec82c
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 278 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ If you wish to just develop locally and not deploy to Vercel, [follow the steps
npm run dev
```

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

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

Expand Down
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import "./globals.css";

const defaultUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: "http://localhost:3000";
: "http://localhost:6868";

export const metadata = {
metadataBase: new URL(defaultUrl),
title: "Next.js and Supabase Starter Kit",
description: "The fastest way to build apps with Next.js and Supabase",
title: "Genie | AI-powered testing",
description: "Test your product with AI-generated test cases, effortlessly.",
};

export default function RootLayout({
Expand Down
20 changes: 1 addition & 19 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import DeployButton from "../components/DeployButton";
import AuthButton from "../components/AuthButton";
import { createClient } from "@/utils/supabase/server";
import ConnectSupabaseSteps from "@/components/tutorial/ConnectSupabaseSteps";
import SignUpUserSteps from "@/components/tutorial/SignUpUserSteps";
import Header from "@/components/Header";

export default async function Index() {
const canInitSupabaseClient = () => {
Expand All @@ -22,33 +20,17 @@ export default async function Index() {
return (
<div className="flex-1 w-full flex flex-col gap-20 items-center">
<nav className="w-full flex justify-center border-b border-b-foreground/10 h-16">
<div className="w-full max-w-4xl flex justify-between items-center p-3 text-sm">
<DeployButton />
<div className="w-full max-w-4xl flex justify-end items-center p-3 text-sm">
{isSupabaseConnected && <AuthButton />}
</div>
</nav>

<div className="animate-in flex-1 flex flex-col gap-20 opacity-0 max-w-4xl px-3">
<Header />
<main className="flex-1 flex flex-col gap-6">
<h2 className="font-bold text-4xl mb-4">Next steps</h2>
{isSupabaseConnected ? <SignUpUserSteps /> : <ConnectSupabaseSteps />}
</main>
</div>

<footer className="w-full border-t border-t-foreground/10 p-8 flex justify-center text-center text-xs">
<p>
Powered by{" "}
<a
href="https://supabase.com/?utm_source=create-next-app&utm_medium=template&utm_term=nextjs"
target="_blank"
className="font-bold hover:underline"
rel="noreferrer"
>
Supabase
</a>
</p>
</footer>
</div>
);
}
23 changes: 0 additions & 23 deletions components/DeployButton.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions components/Header.tsx

This file was deleted.

46 changes: 0 additions & 46 deletions components/NextLogo.tsx

This file was deleted.

102 changes: 0 additions & 102 deletions components/SupabaseLogo.tsx

This file was deleted.

40 changes: 4 additions & 36 deletions components/tutorial/ConnectSupabaseSteps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,28 @@ import Step from "./Step";
export default function ConnectSupabaseSteps() {
return (
<ol className="flex flex-col gap-6">
<Step title="Create Supabase project">
<p>
Head over to{" "}
<a
href="https://app.supabase.com/project/_/settings/api"
target="_blank"
className="font-bold hover:underline text-foreground/80"
rel="noreferrer"
>
database.new
</a>{" "}
and create a new Supabase project.
</p>
</Step>

<Step title="Declare environment variables">
<p>
Rename the{" "}
Duplicate the{" "}
<span className="px-2 py-1 rounded-md bg-foreground/20 text-foreground/80">
.env.example
</span>{" "}
file in your Next.js app to{" "}
file in your Next.js app and rename it to{" "}
<span className="px-2 py-1 rounded-md bg-foreground/20 text-foreground/80">
.env.local
</span>{" "}
and populate with values from{" "}
, then fill in{" "}
<a
href="https://app.supabase.com/project/_/settings/api"
target="_blank"
className="font-bold hover:underline text-foreground/80"
rel="noreferrer"
>
your Supabase project's API Settings
your local Supabase project URL and API key
</a>
.
</p>
</Step>

<Step title="Restart your Next.js development server">
<p>
You may need to quit your Next.js development server and run{" "}
<span className="px-2 py-1 rounded-md bg-foreground/20 text-foreground/80">
npm run dev
</span>{" "}
again to load the new environment variables.
</p>
</Step>

<Step title="Refresh the page">
<p>
You may need to refresh the page for Next.js to load the new
environment variables.
</p>
</Step>
</ol>
);
}
4 changes: 2 additions & 2 deletions supabase/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ file_size_limit = "50MiB"
enabled = true
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
# in emails.
site_url = "http://127.0.0.1:3000"
site_url = "http://127.0.0.1:6868"
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
additional_redirect_urls = ["https://127.0.0.1:3000"]
additional_redirect_urls = ["https://127.0.0.1:6868"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
# If disabled, the refresh token will never expire.
Expand Down
Loading

0 comments on commit 56ec82c

Please sign in to comment.