kauefraga / zetashort

πŸ”— An URL shortener. A simple and reliable solution for users + url shortening.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


πŸ”— An URL shortener. A simple and reliable solution for users + url shortening.

Important

🚧 Work in progress

Features

⬇️ Getting Started

How to install, build and run it

  1. Clone the repository
  2. Install dependencies
  3. Build and start πŸ˜‰
# (1)
git clone https://github.com/kauefraga/zetashort.git
cd zetashort

# (2)
pnpm i --frozen-lockfile

# (3)
pnpm build
pnpm start

Usage

Here's a quick walkthrough:

Want to see a hello world?

> GET /v1

Want to create a user?

# body { username: string, password: string }
> POST /v1/users -> Token and expiresIn

Want to find a specific user?

> GET /v1/users/:userId -> User
> GET /v1/users/:username -> User

Want to list all the stored users? (authorization required)

# authorization: bearer {token}
> GET /v1/users -> Users list

About the solution

Why did you choose node/typescript?

I choose node/typescript because i am familiar with it. Patterns, Node, Typescript, PNPM, Express, Prisma, etc. In the future, i may create some similar solution with Golang.

Which dbms did you choose? Why? Did you consider using NoSQL?

I also choose PostgreSQL (bitnami/postgresql) because of my familiarity with it. Sincerely, I didn't consider using a NoSQL database, but i would strongly recommend them because of their flexibility and performance.

πŸ’ͺ How to contribute

Feel free to open an issue. I would love to read and fix the bugs you spotted.

If you want to contribute with your code, follow it:

  1. With the repository forked and cloned, start the development mode
  2. Develop something cool
  3. Open a pull request
# (1)
pnpm dev

πŸ“ License

This project is licensed under the MIT License - See the LICENSE for more information.

About

πŸ”— An URL shortener. A simple and reliable solution for users + url shortening.

License:MIT License


Languages

Language:TypeScript 100.0%