Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Mar 22, 2024
1 parent 64518b8 commit a316364
Showing 1 changed file with 33 additions and 59 deletions.
92 changes: 33 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

![Next.js Badge](https://img.shields.io/badge/Next.js-000?logo=nextdotjs&logoColor=fff&style=flat)
![Turso Badge](https://img.shields.io/badge/Turso-4FF8D2?logo=turso&logoColor=000&style=flat)
![Check workflow](https://github.com/pheralb/slug/actions/workflows/ci.yml/badge.svg)
![GitHub stars](https://img.shields.io/github/stars/pheralb/slug)
![GitHub releases](https://img.shields.io/github/release/pheralb/slug)
![GitHub issues](https://img.shields.io/github/issues/pheralb/slug)
Expand All @@ -35,7 +36,7 @@

## 👋 Introduction

[Slug](slug.vercel.app) is a service that offers to shorten urls in a simple, fast and secure way. It's built with [**T3 Stack**](https://create.t3.gg/), a web development stack made by [Theo](https://twitter.com/t3dotgg) focused on simplicity, modularity, and full-stack **typesafety**.
[Slug](slug.vercel.app) is a service that offers to shorten urls in a simple, fast and secure way. It's built with [**T3 Stack**](https://create.t3.gg/), a web development stack made by [Theo](https://twitter.com/t3dotgg) focused on simplicity, modularity, and full-stack **typesafety**.

This project uses the following technologies:

Expand All @@ -46,12 +47,19 @@ This project uses the following technologies:
- ☁️ **Database**: [Turso](https://turso.tech/) (SQLite) + [libSQL](https://github.com/tursodatabase/libsql).
- 🎨 **Styling**: [TailwindCSS](https://tailwindcss.com) + [shadcn/ui](https://ui.shadcn.com) & [Radix Primitives](https://www.radix-ui.com).
- 💅 **Formatting**: [Prettier](https://prettier.io) with [prettier-plugin-tailwindcss](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) + [ESLint](https://eslint.org).
- ✍️ **MDX**: [@next/mdx](https://nextjs.org/docs/app/building-your-application/configuring/mdx) + [rehype-pretty-code](https://rehype-pretty-code.netlify.app/).
- 🙂 **Icons**: [Lucide Icons](https://lucide.dev) + [svgl](https://svgl.app).

> ⚠️ This is a community project, not associated with [Vercel](https://vercel.com/).
## 🔭 Roadmap

This is the roadmap I will be following for the complete migration to v3:

⬆️ **Known issues:**

- [ ] Fix issue when logging in with different provider but with the same email. Redirect to an existing route in the app ([authjs error](https://authjs.dev/reference/core/errors#accountnotlinked)).

⬆️ **Dependencies:**

- [x] Update `@prisma/adapter-libsql`, `@prisma/client` & `prisma` to the stable version when it's released.
Expand All @@ -60,7 +68,7 @@ This project uses the following technologies:
⬆️ **Auth:**

- [x] Sign In with Github.
- [ ] Sign In with Google.
- [x] Sign In with Google.

⬆️ **Middleware:**

Expand All @@ -76,14 +84,14 @@ This project uses the following technologies:

⬆️ **Dashboard (settings):**

- [ ] Change password.
- [ ] Change email.
- [ ] Activate/remove 2FA.
- [x] Change name.
- [x] Change email.
- [ ] Delete account.
- [ ] Download all links data.

## 👨‍🚀 Getting Started

> 🚧 You will need [Nodejs +16 (LTS recommended)](https://nodejs.org/en/) installed.
> 🚧 You will need [Nodejs +20 (LTS recommended)](https://nodejs.org/en/) installed.
1. Fork this project:

Expand All @@ -110,63 +118,29 @@ yarn install
> 🚧 The environment variables must match the following [schema](https://github.com/pheralb/slug/blob/main/src/env/schema.mjs#L8).
```bash
# Planetscale DB URL:
DATABASE_URL:

# Github OAuth secrets:
GITHUB_ID:
GITHUB_CLIENT_SECRET:

# Next Auth config:
NEXTAUTH_SECRET:
NEXTAUTH_URL:
# Database:
DATABASE_URL=
TURSO_DATABASE_URL=
TURSO_AUTH_TOKEN=

# Auth.js =>
AUTH_SECRET=
AUTH_URL=

# Github Provider =>
GITHUB_ID=
GITHUB_CLIENT_SECRET=

# Google Provider =>
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
```

### 🔑 How to get environment variables:

**Planetscale database:**

- [Create a new database](https://planetscale.com/docs/tutorials/planetscale-quick-start-guide#getting-started-planet-scale-dashboard).
- [Create a dev branch](https://planetscale.com/docs/onboarding/branching-and-deploy-requests#create-a-dev-branch).
- [In the dev branch, click on "Connect" and select "Prisma". Now you have the DATABASE_URL](https://planetscale.com/docs/concepts/connection-strings#creating-a-password).

> 🚧 The environment variable in the dev branch is not the same as main. When you deploy your app to production, in the environment variables change DATABASE_URL to the main variable.
**Github OAuth:**

- [Click here to create new Github OAuth app](https://github.com/settings/applications/new).
- Go to "Client secrets" and generate new client secret and and paste it into GITHUB_CLIENT_SECRET env.
- Copy the Client ID and paste it into GITHUB_ID env.

**Next Auth:**

- NEXTAUTH_SECRET: `mykey123` for example.
- NEXTAUTH_URL: `http://localhost:3000/`.

5. Ready 🥳, now run:

```bash
# Push your DB to Planetscale:
npx prisma db push

# Run the project:
npm run dev

# (Optional) Run Prisma Studio to see your DB data:
npx prisma studio
```

😊 Contributing:

<a href="https://github.com/pheralb/slug/graphs/contributors">
<img src="https://contrib.rocks/image?repo=pheralb/slug" />
</a>

<p></p>
- 📚 You can read the complete documentation [here](https://slug.vercel.app/docs).

## 🎉 Deploy on Vercel
## 🚀 Deploy on Vercel

-[https://slug.vercel.app/](https://slug.vercel.app/).
-[slug.vercel.app](https://slug.vercel.app/).

## 🔑 License

Expand Down

0 comments on commit a316364

Please sign in to comment.