- 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
Click here for the Live Demo
- NodeJS
- ExpressJS
- ReactJS
- MongoDB
- Firebase Authentication
- Bulma CSS
- Azure App Service
- Netlify
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)
Download the .zip file from Github or run the below command to clone the repo locally.
git clone https://github.com/soumitdas/shortlink.git
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 the environment variable in .env
file at frontend
directory.
REACT_APP_API_BASE_URL=http://localhost:5000
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
Open two terminal window to run both the frontend & backend and run the following commands:
cd frontend && npm start
# React App will start at PORT 3000
cd backend && npm run dev
# Node API server will start at PORT 5000
shortlink is MIT licensed.
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.