Skip to content

Build url shortening service, and simple dashboard for display purpose would be ReactJs 🚀

Notifications You must be signed in to change notification settings

ngtrdai197/url-shortener

Repository files navigation

Url Shortener 🎉

All Contributors

Build a service for shortening url, idea will generate a unique ID (Twitter snowflake) and convert that unique id (base10) to base64

  • Backend service: Golang (1.20) - README
  • Telegram Notify service: Golang (1.20) - README
  • Expiration service: Python - README
  • Auth service: Nodejs - README
  • Frontend: ReactJs (18.2.0) - README

Setup

  • Build images
# Build auth service
$ cd ./auth && docker build -t auth-service -f Dockerfile .

# Build core service
$ cd ./backend && docker build -t core-service -f Dockerfile .
  • Install helm chart
# Auth service
$ cd ./infra/auth-service && helm install auth-service . -f values.yaml
# Postgresql DB
$ cd ./postgresql && helm install postgresql-db . -f values.yaml
# To get the password for "postgres" run:
$ export POSTGRES_PASSWORD=$(kubectl get secret --namespace default postgresql -o jsonpath="{.data.postgres-password}" | base64 -d)

# Display password
$ env | grep POSTGRES_PASSWORD

# To connect to your database from outside the cluster execute the following commands:
$ kubectl port-forward --namespace default svc/postgresql-db 5432:5432 &
    PGPASSWORD="$POSTGRES_PASSWORD" psql --host 127.0.0.1 -U postgres -d url_shortener -p 5432
  • Exec pod
# Example exec pod of auth service
$ kubectl exec -it {pod name} -- sh
  • For test, but without setup Kong Gate. We need forwarding port to check, example for auth service
$ make forwardport

The project is still in progress (WIP 🚀)

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Dai Nguyen
Dai Nguyen

💻
toannt97
toannt97

💻

This project follows the all-contributors specification. Contributions of any kind welcome!