Git Product home page Git Product logo

slug's Introduction

Slug Logo

An open-source URL shortener built with T3 Stack.

Dashboard ย ย โ–ย ย  Roadmap ย ย โ–ย ย  Contribute ย ย โ–ย ย  Create issue ย ย โ–ย ย  X/Twitter

Next.js Badge Turso Badge Check workflow GitHub stars GitHub releases GitHub issues GitHub license

๐Ÿ‘จโ€๐Ÿš€ Introduction

Slug is a service that offers to shorten urls in a simple, fast and secure way. It's built with T3 Stack, a web development stack made by Theo focused on simplicity, modularity, and full-stack typesafety.

This project uses the following technologies:

โš ๏ธ This is a community project, not associated with Vercel.

๐Ÿš€ Getting Started

Requirements:

Steps:

  1. Fork this project:
  1. Clone the repository:
git clone [email protected]:YOU_USER/slug.git
  1. Install dependencies:
# Install pnpm globally if you don't have it:
npm install -g pnpm

# and install dependencies:
pnpm install
  1. Create a .env file with the following content:

๐Ÿšง The environment variables must match the following schema.

# Database:
DATABASE_URL= # "file:./dev.db"
TURSO_DATABASE_URL=
TURSO_AUTH_TOKEN=

# Auth.js =>
AUTH_SECRET=

# Github Provider =>
GITHUB_ID=
GITHUB_CLIENT_SECRET=

# Google Provider =>
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

Database:

Auth.js:

Github Credentials:

Google Credentials:

  1. Generate a new migration file with Prisma:
pnpm db:migrate
  1. Insert the migration data into the Turso database. To do this, go to package.json, modify the db:push command with the name of the migration folder (2024xxxxxxxxxx_init) and run it in your terminal:
pnpm db:push
  1. Run:
  • Development server:
pnpm dev

and open http://localhost:3000 with your browser ๐Ÿš€

  • Prisma Studio:
pnpm db:studio

and open http://localhost:5555 with your browser โœจ

๐Ÿ”ญ Roadmap

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

  • โœ… = Stable, completed.
  • ๐Ÿ”” = Stable, but unexpected errors may appear.
  • โš™๏ธ = In progress.

โฌ†๏ธ 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).

โฌ†๏ธ Dependencies:

  • โœ… Update @prisma/adapter-libsql, @prisma/client & prisma to the stable version when it's released.
  • โš™๏ธ Update authjs to the stable version (v5) when it's released.

โฌ†๏ธ Auth:

  • โœ… Sign In with Github.
  • ๐Ÿ”” Sign In with Google.

๐Ÿ”” Only for users who have not previously logged in with an existing email address in their Github account. This is an issue that will be worked on soon.

โฌ†๏ธ Middleware:

  • โœ… Redirect with /* and /s/*.
  • โœ… Separate public, protected & authentication routes.

โฌ†๏ธ Dashboard (main):

  • โœ… Create a new short URL.
  • โœ… List all shorted URLs.
  • โœ… Delete a shorted URL.
  • โœ… Update a shorted URL.`

โฌ†๏ธ Dashboard (tags):

  • โœ… Add search links by tags in the dashboard.
  • ๐Ÿ”” Create a new tag.
  • โœ… Delete a tag.
  • โš™๏ธ Update the tags of a link.

๐Ÿ”” Add option to change tag color.

โฌ†๏ธ Dashboard (settings):

  • โœ… Change name.
  • โœ… Change email.
  • โœ… Delete account.
  • โœ… Download all links data.

โœŒ๏ธ Contributing

โ˜๏ธ Deploy on Vercel

๐Ÿ”‘ License

slug's People

Contributors

pheralb avatar hyuuh avatar roberthgnz avatar turbobot-temp avatar david-ponc avatar imjesusc avatar oggnimodd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.