Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

SatvikG7/YALS-ML

Repository files navigation


⚠️ yals.ml domain has deprecated ⚠️

⚠️ Please replace yals.ml with yals-ml.vercel.app in previously created links ⚠️

⚠️ Use turl.vercel.app for creating new links ⚠️


YALS-ML

Yet Another Link Shortener - Minify Link

Visit . Report Bug . Request Feature

Downloads Contributors Issues License


Table Of Contents


About The Project

Screenshot

There are tons of link shorteners present on internet today, however, they do not let you create custom link or they limit them till some extent, but yals will soon let you create custom branded links for free, until my FaunaDB doesn't run out of space 😄

Here's why you should you yals-ml:

  • Most clear interface ever.
  • No ads till now.
  • 99.99% uptime.

Built With

  • Nextjs
  • Tailwaind CSS
  • FaunaDB

Deploy on

Getting Started

Here is how you can get started with the project locally

Requirements

  • node
  • npm or yarn

Installation

  1. Clone the repo

    git clone https://github.com/SatvikG7/YALS-ML
    
  2. Install NPM packages

    npm install
    # or
    yarn install
    
  3. Create .env.local in root directory of project

  4. Setup FaunaDb

    • Upload schema.gql to fauna db.
    • Run following commands in fauna shell
      CreateCollection({ name: "accounts" })
      CreateCollection({ name: "sessions" })
      CreateCollection({ name: "users" })
      CreateCollection({ name: "verification_tokens" })
      CreateIndex({
        name: "account_by_provider_and_provider_account_id",
        source: Collection("accounts"),
        unique: true,
        terms: [
          { field: ["data", "provider"] },
          { field: ["data", "providerAccountId"] },
        ],
      })
      CreateIndex({
        name: "session_by_session_token",
        source: Collection("sessions"),
        unique: true,
        terms: [{ field: ["data", "sessionToken"] }],
      })
      CreateIndex({
        name: "user_by_email",
        source: Collection("users"),
        unique: true,
        terms: [{ field: ["data", "email"] }],
      })
      CreateIndex({
        name: "verification_token_by_identifier_and_token",
        source: Collection("verification_tokens"),
        unique: true,
        terms: [{ field: ["data", "identifier"] }, { field: ["data", "token"] }],
      })
      CreateIndex({
        name: "LURL_Check",
        source: Collection("Url"),
        unique: false,
        terms: [{ field: ["data", "LURL"] }],
        values: [{ field: ["data", "SURL"] }],
      })
      CreateIndex({
        name: "LURL_Return",
        source: Collection("Url"),
        unique: false,
        terms: [{ field: ["data", "SURL"] }],
        values: [{ field: ["data", "LURL"] }],
      })
      
  5. Enter your API keys in .env.local

NODE_ENV=development
BASE_URL=http://localhost:3000

FAUNADB_SECRET=<FAUNADB_SECRET>

GITHUB_CLIENT_ID=<GITHUB_CLIENT_ID>
GITHUB_CLIENT_SECRET=<GITHUB_CLIENT_SECRET>

NEXTAUTH_URL=http://localhost:3000
SECRET=<SECRET_FOR_NEXT_AUTH>
JWT_SECRET=<SECRET_FOR_JWT>

VERCEL_API_URL=https://api.vercel.com/v6/deployments?teamId=<YOUR_TEAM_ID_OR_USERNAME>
VERCEL_API_TOKEN=<VERCEL_API_TOKEN>
  1. Start dev server
npm run dev
# or
yarn dev

Roadmap

See the open issues for a list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  • If you have suggestions for adding or removing features, feel free to open an issue to discuss it, or directly create a pull request with necessary changes.
  • Create individual PR for each suggestion.

Creating A Pull Request

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Authors