Git Product home page Git Product logo

0tr.me's Introduction

0tr.me logo

0tr.me

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

See our changelog for product updates
otter-demo.mov

Current features + more

  • User dashboard powered by Kinde, allows users to track their own short links and edit/delete them
  • Progressive Web App (PWA) on mobile devices + Windows & Mac
  • Free integrated Status Page and Changelog Site
  • URL shortening with pre-generated slugs + custom slugs
  • URL Analytics such as views and generate Pretty QR codes
  • Publicly decode slugs and preview the long URL behind them
  • File hosting with directory clear every 12 hours to save resources
  • Support for custom domains via DNS CNAME 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

Hmm, quite empty. Suggest some on our new Suggestions page!

Currently working on

  • Add more ways to monetize the site without asking for static donations
  • Keep monetary contributor uploaded files forever (waive 12hr limit)
  • Sanitize SVG formats to strip <script> tags

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.

Interested in using a free custom domain with 0tr.me? See this section for instructions.

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. Our main instance of 0tr.me is powered by โšก๏ธ GalaxyGate.

  • Important note: You'll notice our public stats may seem falsely inflated. This is due to us not programatically counting analytics about 9 months after launch. You'll want to remove the inflation when selfhosting for an accurate count.

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

stripeApi - Stripe.com API key for payments

stripePriceId - Stripe Price ID for Custom URL slug product

KINDE_SECRET - Kinde.com Secret Key for user auth

KINDE_ID - Kinde.com client ID for user auth

Don't forget to exit test mode when you push this to production ๐Ÿ˜Ž

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 Glitch CDN files are subject to copyright by their lawful owner.

buy me a coffee cashapp

0tr.me's People

Contributors

cmdwm avatar tiagorangel2011 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

0tr.me's Issues

Keep URL parameters on redirect

Can the redirect leave URL parameters? E.g.:

https://0tr.me/0VX7QAS?myparam=hello&param2=blahblah ->
https://twitter.com/willmccrudden/status/1639125781380239360?myparam=hello&param2=blahblah

No backend sanitization on slug submission endpoint.

There is no sanitization on the slug submission endpoint, therefore allowing users to inject custom urls to be served by the backend. I suggest using a regex to test all URLs as they are submitted. (such as /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i)

Example:
image

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.