Skip to content

soumitdas/shortlink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shortlink

screenshot of shortlink

Netlify GitHub language count GitHub top language Website

Table of Contents

Features

  • Short any URL without signup
  • Signed up user can create custom shortlink
  • Click analytics available for the links created using an account
  • Only the user who created the link can access the analytics data

Demo

Click here for the Live Demo

Technology Stack

  • NodeJS
  • ExpressJS
  • ReactJS
  • MongoDB
  • Firebase Authentication
  • Bulma CSS
  • Azure App Service
  • Netlify

Run Locally

Prerequisites

To run this project locally one should have -

  • A MongoDB instance running (One can refer MongoDB Atlas free tier)
  • A Firebase project created (Refer Firebase Docs for more)
  • ipstack API Key (optional)

Get the repo

Download the .zip file from Github or run the below command to clone the repo locally.

git clone https://github.com/soumitdas/shortlink.git

Install dependencies

After cloning the repo, run the following commands to install the project dependencies:

# for frontend
cd frontend && npm install

# back to the root directory
cd ..

# for backend
cd backend && npm install

Set environment

Frontend

Set the environment variable in .env file at frontend directory.

REACT_APP_API_BASE_URL=http://localhost:5000

Backend

Rename .env.sample file in backend directory to .env and set the environment variables

APP_BASE_URL=http://localhost:5000
FRONTEND_BASE_URL=http://localhost:3000
MONGODB_URI=paste_your_mongodb_connection_string_here
FIREBASE_SERVICE_ACCOUNT=paste_your_firebase_service_account_stringified_object_here
IPSTACK_KEY=paste_your_ipstack_api_key_here_ifany

Run

Open two terminal window to run both the frontend & backend and run the following commands:

Frontend

cd frontend && npm start
# React App will start at PORT 3000

Backend

cd backend && npm run dev
# Node API server will start at PORT 5000

License

shortlink is MIT licensed.

Disclaimer

This project is in a very basic stage and might have severe bugs and vulnerabilities, so please keep that in mind when deploying it to production.

Useful Links