A url shortener for custom links and slugs
Spit-sh is an open-source URL shortener project that provides the ability to shorten URLs, track clicks, and generate QR codes for the links. It consists of a FastAPI backend and a Next.js frontend.
To set up and run the Spit-sh project locally, follow these steps:
Clone the Spit-sh repository:
git clone https://github.com/your-username/spit-sh.git
Go the backend directory:
cd be
Set up the backend:
python3 -m venv venv
source venv/bin/activate
Install the dependencies using Yarn:
pip install -r requirements.txt
Start the backend server:
uvicorn app.main:app --reload
FastAPI for api server
Uvicorn - Python ASGI web server
SQLmodel ORM platform built on SQLAlchemy
asyncpg Async driver for Postgres
Ip2geotools for geolocationing
Resend Python SDK for sending emails
python-dotenv for parsing envvironment variables
Alembic for database migrations
fastapi-login - Auth manager
Open a new terminal window/tab.
Navigate to the frontend directory:
cd spit-sh/frontend
Install the dependencies using Yarn:
yarn
Start the frontend development server:
yarn dev
This will start the Next.js development server and automatically open the Spit-sh application in your default browser.
Once you have both the backend and frontend servers running, you can access the Spit-sh URL shortener application in your browser.
Open your web browser and navigate to http://localhost:3000
if it doesn’t open automatically.
You will see the Spit-sh homepage with the list of shortened links and an option to shorten a new URL.
To shorten a URL:
To track clicks:
To generate a QR code:
Congratulations! You have successfully set up the Spit-sh URL shortener project. You can now start using the application to shorten URLs, track clicks, and generate QR codes. Feel free to explore and customize the project according to your requirements. If you have any questions or issues, refer to the project’s documentation or seek assistance from the Spit-sh community. Happy URL shortening!
I’m using Buildshare to build in public