Skip to content

Latest commit

 

History

History
59 lines (48 loc) · 2.25 KB

File metadata and controls

59 lines (48 loc) · 2.25 KB

shURL

NodeJS Express.js React

Website shields.io

Create short url easily with QrCode

Powered by nDria.dev

Easily shorten and track links for sharing on social media, video, email, print, and more. Customize user-friendly URLs to make them more memorable, and track helps you to maximize your content’s reach and engagement.

Features

  • Shorten any type of url.
  • Signup with email verification link.
  • Create shorten url and QrCode permanently for authenticated users.
  • Create temporary shorten url.
  • Track the effectiveness of your links with comprehensive analytics. (Work in progress)
  • Cache implementation to serve original url (Work in progress)

Try demo locally

shURL requires Node.js v18+ and MongoDB to run locally.

I used pnpm as package manager, so if you don't have it, you will need to change the run scripts in the package.json of the be and fe folders.

Steps:

  • Install the dependencies in be and fe directory.
  • go into be folder.
  • create public/private key for refresh token and access token.
  • generate base64 from keys.
  • create in your mongodb local a collection with name URL_SHORTNER
  • create a table URL and USER
  • setting an email provider, otherwise sign in not working
  • create a .env.dev file in config dir at root project, with these options
NODE_ENV=development
PORT=3000
MONGO_DB_URI=<your uri>
DB=URL_SHORTNER
TABLE_URL=URL
TABLE_USER=USER
ACCESS_TOKEN_SECRET=<base64 access token secret>
REFRESH_TOKEN_KEY_PRIVATE=<base64 refresh token private key>
REFRESH_TOKEN_KEY_PUBLIC=<base64 refresh token public key>
MAIL_EMAIL_SENDER=
MAIL_CLIENT_ID=
MAIL_CLIENT_SECRET=
MAIL_OAUTH_URL=
MAIL_REFRESH_TOKEN=
  • Run project
pnpm run start