Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorVation committed May 17, 2023
1 parent 521933e commit 8bdf9b8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 deletions.
32 changes: 10 additions & 22 deletions README.md
@@ -1,30 +1,18 @@
# LinkTree Clone
# Introducty

This is a clone of the popular website Linktree, a link aggregator website that allows users to create a page with links
to their social media profiles. [Here](https://www.beacons.ai/youraveragetechbro) is an example of one.
introducty.com

[Here](https://youtu.be/rVRaV-qctm4) is a demo of what the app looks like.


## How To Run Locally

To run the game locally, run `npm install` to install all the necessary dependencies and then run `npm run dev` to run web appp.

This project uses [Supabase](https://supabase.com/) as the database. To set it up, create a `.env` file at the
root directory and include the following env variables.
## Development

```
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_project_anon_public_key
npm install
npm run dev
```

You can find the values for the two env variables in your Supabase project settings in the `API` tab.

Once you add your Supabase keys, you need to create the necessary tables in Supabase.
## Database

You find the database schema in the [types/supabase.ts](https://www.sweprojects.com/projects/preview/clh7qgfw30000vr1re1505imehttps://github.com/YourAverageTechBro/SWEProjects/blob/main/projects/LinkTreeClone/types/supabase.ts) file.

## Want Step-By-Step Instructions?

If you want a step-by-step tutorial on how to build this project, you can find the tutorial on [here](https://www.sweprojects.com/projects/preview/clh7qgfw30000vr1re1505ime).
Generated types in [types/supabase.types](types/supabase.types)

```
npm run update-types
```
1 change: 0 additions & 1 deletion app/api/sites/[siteId]/route.ts
@@ -1,6 +1,5 @@
import * as z from "zod";

// import { postPatchSchema } from "~/lib/validations/post";
import { createRouteHandlerSupabaseClient } from "@supabase/auth-helpers-nextjs";
import { headers, cookies } from "next/headers";
import getUser from "~/lib/getUser";
Expand Down
6 changes: 5 additions & 1 deletion app/api/users/[userId]/route.ts
Expand Up @@ -3,9 +3,13 @@ import { cookies, headers } from "next/headers";
import { z } from "zod";
import { fromZodError } from "zod-validation-error";

import { userNameSchema } from "~/lib/validations/user";
import { Database } from "~/types/supabase";

export const userNameSchema = z.object({
name: z.string().min(3).max(32),
email: z.string().email(),
});

const routeContextSchema = z.object({
params: z.object({
userId: z.string(),
Expand Down
6 changes: 0 additions & 6 deletions lib/validations/user.ts

This file was deleted.

0 comments on commit 8bdf9b8

Please sign in to comment.