/0tr.me

0tr.me is a free URL shortener & file host. Self-host it or visit us online!

Primary LanguageEJS

0tr.me logo

0tr.me

URL shortener and file host compatible with ShareX & monetized with Stripe

See demo video: https://github.com/cmdwm/0tr.me/raw/main/demo-video.mp4


Current features + more

  • URL shortening with pre-generated slugs + custom slugs
  • Publicly decode slugs and show the long URL behind them
  • File hosting with directory clear every 12 hours to save resources
  • Support for custom domains via DNS A record
  • Monetized with EthicalAds & Stripe to support user payments
  • Custom ShareX uploader integration (see ./ShareX/)
  • Custom GitHub analytics showing all contributors on home page
  • Includes section that shows all monetary contributors (via GH Sponsors)

Upcoming features

  • Sanitize SVG formats to strip <script> tags
  • Keep monetary contributor uploaded files forever (waive 12hr limit)

Currently working on

  • Add more ways to monetize the site without asking for static donations
  • Grow the userbase without spending tons on Google Ads, etc
  • Better error handling, especially at the root

See something on this list that you can add? Make a pull request and you'll be listed on our homepage forever!

Self Hosting

While I don't plan on providing support for self-hosting, I can tell you some basic things to get you started. This project is programmed in Node (obviously), with Express.js to serve content and qjson-db to store slugs.

Just clone this GitHub repo, and download all the prerequisites. You can find them in package.json.

You can spin up a free host on Replit ⠕ or 🎏 Glitch.

The .env file

The .env file has a few simple keys in them. You can rename these to suite your infrastructure better. Stripe information can be found at dashboard.stripe.com

wave - Gradient information for wave gradient on home page, not required

stripeApi - Stripe.com API key for payments

stripePriceId - Stripe Price ID for Custom URL slug payments

I'm not going to include that in this project, but you can simply grab the code by viewing the source at https://0tr.me.

Reporting bugs

It would be great if you could not only report bugs you find (by opening an issue), but create a pull request that helps solve it too. If you contribute, you'll be listed on the homepage forever.

License

This project essentially has a do whatever you want license. You can copy code, host this locally, or steal it with or without credit (even though it is greatly appreciated to linkback to my website). Please note any cdn.glitch.global files are subject to copyright by their lawful owner.

buy me a coffee cashapp