Code Monkey home page Code Monkey logo

spoo-me / url-shortener Goto Github PK

View Code? Open in Web Editor NEW
59.0 4.0 8.0 12.67 MB

spoo.me is a free and easy-to-use URL shortener that lets you create short links for any website. You can choose your own alias, set a password, and limit the number of clicks.

Home Page: https://spoo.me

License: Apache License 2.0

Python 82.82% JavaScript 17.18%
analytics custom-url short-link shortener url url-analytics url-shortener url-shortener-api url-shortener-microservice url-shrinker url-stats encrypted-url url-optimization flask mongodb python vercel

url-shortener's Introduction

spoo.me

Shorten Your Url not Your Possibilities ๐Ÿš€

๐Ÿ”ฅ Features ๐Ÿ“Œ Endpoints ๐Ÿ› ๏ธ API Docs ๐Ÿš€ Getting Started ๐Ÿค Contributing

GitHub commit activity Discord X (formerly Twitter) Follow

โšก Introduction

spoo.me is a free, open-source service for shortening URLs. It offers URL statistics, a free API, and customization options. You can create custom slugs, add password protection, and manage link lifespans.

๐Ÿ”ฅ Features

  • Custom Slugs - Create custom slugs for your URLs ๐ŸŽฏ
  • Emoji Slugs - Use emojis as slugs for your URLs ๐Ÿ˜ƒ
  • Password Protection - Protect your URLs with a password ๐Ÿ”’
  • Link Max Clicks - Set a maximum number of clicks for your URLs ๐Ÿ“ˆ
  • URL Statistics - View detailed statistics for your URLs ๐Ÿ“Š
  • BOT Tracking - Track bot clicks on your URLs ๐Ÿค–
  • API - A free and open-sourced API for URL shortening and statistics ๐Ÿ› ๏ธ
  • Export Click Data - Export click data as a CSV, JSON, XLSX, or XML file ๐Ÿ“ค
  • Open Source - spoo.me is open-sourced and free to use ๐Ÿ“–
  • Absolutely Free - No hidden costs, no premium plans, no limitations ๐Ÿ’ธ
  • No Registration - No need to register an account to use spoo.me ๐Ÿ“
  • Self Hosting - You can host spoo.me on your own server ๐Ÿ 

๐Ÿ“Œ Endpoints

The basic structure for accessing a shortened URL is: https://spoo.me/<short_code>

Example - https://spoo.me/ga

๐Ÿ” Accessing Password-Protected URLs

For password-protected URLs, use the same basic structure. This redirects to a password entry page.

Example - https://spoo.me/exa
Password - Example@12

Tip

Bypass the password entry page by appending the password to the URL parameters - https://spoo.me/<short_code>?password=<password>

๐Ÿ“ˆ Checking URL Statistics

To view the statistics for a URL, use the following structure: https://spoo.me/stats/<short_code>

Example - https://spoo.me/stats/ga

Note

You won't be able to view statistics for a password-protected page unless you provide its password.

๐Ÿ› ๏ธ API Docs

Spoo.me offers a free, open-source API for URL shortening and statistics. Check it out below:

spoo.me API

๐Ÿš€ Getting Started

To self-host spoo.me on your server, follow the this detailed guide:

Self-Hosting Guide ๐Ÿ 
Expand this for a Quick Start

Method 1 - Docker (Recommended)

๐Ÿ“‹ Prerequisites

๐Ÿ“‚ Clone the repository (Docker Method)

git clone https://github.com/spoo-me/url-shortener.git

Rename .env.example to .env

mv .env.example .env

โž• Adding environment variables to .env file

MONGODB_URI=<your_MONGODB_URI>
CONTACT_WEBHOOK=<valid_webhook_URI>
URL_REPORT_WEBHOOK=<valid_webhook_URI>

[!NOTE] With this method, you can either use a cloud service like MongoDB Atlas to store the data remotely or you can use a local MongoDB instance. If you want to use a local MongoDB instance, your MongoDB URI would be mongodb://localhost:27017/.

๐Ÿš€ Starting the server

docker-compose up

Method 2 - Manual

๐Ÿ“‹ Prerequisites

  • MongoDB ๐ŸŒฟ
    • MongoDB is only required if you want to store the data locally. You can also use a cloud service like MongoDB Atlas to store the data remotely.
  • Python ๐Ÿ
  • PIP ๐Ÿ“ฆ
  • Virtualenv (Optional) ๐ŸŒ

๐Ÿ“‚ Clone the repository

git clone https://github.com/spoo-me/url-shortener.git

Creating a virtual environment (Optional)

python3 -m venv venv

Activate the virtual environment (Optional)

source venv/bin/activate

๐Ÿ“ฆ Install dependencies

pip install -r requirements.txt

Rename .env.example to .env

mv .env.example .env

โž• Adding environment variables to .env file

MONGODB_URI=<your_MONGODB_URI>
CONTACT_WEBHOOK=<valid_webhook_URI>
URL_REPORT_WEBHOOK=<valid_webhook_URI>

[!NOTE] If you installed MongoDB locally, your MongoDB URI would be mongodb://localhost:27017/ or if you are using MongoDB Atlas, you can find your MongoDB URI in the Connect tab of your cluster.

๐Ÿš€ Starting the server

python main.py

๐ŸŒ Access the server

Open your browser and go to http://localhost:8000 to access the spoo.me URL shortener.

๐Ÿค Contributing

Contributions are always welcome! ๐ŸŽ‰ Here's how you can contribute:

Important

For any type of support or queries, feel free to reach out to us at โœ‰๏ธ [email protected]

๐Ÿ‘€ Visual Previews

Main Page

spoo me main page

Result Page

spoo me result page

Stats Page

image

API Page

image

Repo Activity

Contribution Charts



Star History Chart

ยฉ spoo.me . 2024

All Rights Reserved

url-shortener's People

Contributors

dependabot[bot] avatar zingzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

url-shortener's Issues

Question about Copyright Name / Year, attribution

Issue

Copyright [yyyy] [name of copyright owner]

Hi @Zingzy / spoo-me, I noticed that your copyright file is missing a specific name and year, so I was not sure if I will get in any legal trouble if I fork off of your repository as is.

My Request

  • Please let me know if you plan to add your name (or just your github username for privacy maybe, I am not a lawyer) and also a date to the copyright file before I fork / clone it, just in case of legal issues.
    • I am happy to wait for you to make any edits needed to the copyright before trying to fork and modify your code
  • If you don't think it's necessary to change the LICENSE, let me know, it's fine to me either way
  • Similarly, outside of the LICENSE (e.g. on the frontend of my fork), would you like me to credit you in any specific format? Would linking to the spoo.me twitter (https://twitter.com/spoo_me) suffice, or maybe to your personal twitter as well (https://twitter.com/zingzy3)?

I am broadly aware that the Apache 2 license means I must preserve the original copyright, and that I must give an overview of any changes I make to the code compared to the original project (hence my question about whether your current copyright details are correct).

As outlined by Apache Foundation guidelines, I was thinking about appending my own copyright onto the original LICENSE, making sure to keep the original LICENSE content unchanged but just adding my own name / date for the change I plan to make, as well as adding a NOTICE file explaining any changes made. Does that sound fair to you, along with possibly giving credit to you on the frontend of my fork as mentioned earlier?

Other Background Context about this request

I was planning to fork or clone this repo and make some adjustments for my own usage, and I don't plan to merge my custom version back into the original at this time (hence why I used fork and clone interchangeably), as I think I have a more narrow scope of usage in mind (for example, I don't think I will need the emoji URL's, and I want to set some custom CORS headers potentially).

I would be self-hosting my own Mongo database as well as the backend / frontend.

I would also be happy to contribute back to the original project in the future (not on my custom fork), so feel free to write up some more GitHub Issues about things you might appreciate help with.

Sorry if that got long-winded for a simple request, best regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.