Snapp | Selfhosted Url Shortner reddit / selfhosted ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-06 23:38 The idea started as >what can i do with all this svelte learning? > >and what the hell are *runes* now? so since i don't like the url shortner I tried before - and I had to try some stuff for unrelated work on Bootstrap and Tabler that i never used before - I decided to try and make one. I don't really know if there are major flaw on my workflow, as I am studing Javascript Frameworks as a hobby and this is my first try at something a little more complex (where complexity is related to structuring a release for third users). Also, this is completely accessible and selfhostable (online version is actually for my own use). [So here it is!](https://snapp.li) / [GitHub Rep](https://github.com/urania-dev/snapp) Feel free to tray, and give a feedback if you find it useful. Stack is: * Nodejs * SvelteKit * Bootstrap * Tabler & Tabler-Icons * MaxMind (for anonymous metrics) * SQLite * Prisma (so you can choose another DB simply changing provider and DB\_URL) I already found out that some minor fixes are need, but would really appreciate a feedback on this. :) ​ ---------------------------------------------------------------------- CrashOverride93 · 2023-12-07 00:33 I was trying with Shlink as it was the most I liked from 5 I have tried, but couldn't make it work with Cloudflare (CORS). Let give Snapp a try! I would suggest you to include some screenshots of the interface on the website, or GitHub repo. Or maybe a ready to use demo instance. Thank you for this alternative 😉🤝 ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 00:37 In the morning I will put some screenshot. Maybe a little presentation on the website too. Everything looks like tablet in a very basic way, tbh. I never hosted on Cloudflare tho 😅 Thank you very much for your feedback :) ---------------------------------------------------------------------- thewizkid95 · 2023-12-07 00:38 Damn this is a good fuckin idea. Keeping an eye on this, great job! ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 00:39 Thank you! Let me know if you try It! Tomorrow morning i'll put some screen and demo online, as already suggested! ---------------------------------------------------------------------- chin_waghing · 2023-12-07 00:49 The CORS issues made me want to cry. Landed up just writing an nginx config that did what I wanted ---------------------------------------------------------------------- jeffjose · 2023-12-07 00:56 Heads up - I'm running into CORS issues as well. I just ran the exact docker command (s/docker/podman). ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 01:00 Am i missing something svelteside? Have you set public_url on container? Those were the only stuff coming to my mind. I run it with docker and traefik and works pretty well. 😅🤔 ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 01:02 Thank you! Can I fix the image some how? Have you set public_url in docker container? Running on home server behind traefik It doesnt seems to encounter this problem :/ ---------------------------------------------------------------------- m16hty · 2023-12-07 02:01 I will try this tomorrow for sure! Very nice idea. ---------------------------------------------------------------------- jeffjose · 2023-12-07 02:21 I can take a look at it a bit more closely sometime later. The general idea is you dont have the proper origins set for sveltekit ---------------------------------------------------------------------- blaine07 · 2023-12-07 02:38 I have Shlink working through Cloudflare; what am I missing? ---------------------------------------------------------------------- Vampire_Duchess · 2023-12-07 04:13 is there a version for ARM for raspberry pi 4/nano pi devices? got this ``` WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested ``` thanks ---------------------------------------------------------------------- ComplexBlacksmith · 2023-12-07 06:25 Some things to add; QRCode shortlinks, UTM parameter builder ---------------------------------------------------------------------- marbonmb · 2023-12-07 07:19 You can use the compatibility layer as workaround! It will be slower but working :) ---------------------------------------------------------------------- jimmygle · 2023-12-07 07:32 How is this different than Kutt? ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 07:47 Quicker would be download repository, It Is a very small and basic product :) ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 07:48 Just know the name, i think kutt offers more feature ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 07:49 UTM parameter arent just params? Anyway i made the qrcode in a Dev version, but It give me problems in Building ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 07:50 So It Is Just the origin env? I can add It in the docker image If anyone would confirm this i'll do It :) ---------------------------------------------------------------------- CrashOverride93 · 2023-12-07 08:59 How the god you got it working with Cloudflare? I'm not using Traefik, but CF Tunnels. ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 09:20 try now, should be compliant to cors ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 09:20 try now, should be compliant to cors ---------------------------------------------------------------------- chin_waghing · 2023-12-07 11:25 Yeah, I had it behind Google IAP however, so I dont think that was helping anyone. ---------------------------------------------------------------------- adelaide_flowerpot · 2023-12-07 12:27 I miss Yourls ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 15:17 should be solved even for non http homelabs, let me know if it works ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 15:18 Now it should be able to run on non http homelabs with NODE\_ENV=development, as Lucia uses secure cookies, and should be able to reach ORIGIN as set with PUBLIC\_URL in env. ---------------------------------------------------------------------- nashosted · 2023-12-07 18:25 Just sent out a newsletter. Congrats on your new project. It looks great! ---------------------------------------------------------------------- ComplexBlacksmith · 2023-12-07 18:44 > UTM parameter arent just params? They are. But non-techie users might need an interface to build them from. ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 18:56 Released a new version, with demo included and fixed cors and http (non https) auth. **The demo will be resetting every 24H.** # [**https://demo.snapp.li**](https://demo.snapp.li) ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 18:56 is some of you were already trying to navigate and encountered repetitive reboot, it was me, it's not balanced of course, and noticed some minor fixes were needed on creating a new url :) ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 18:58 # [https://demo.snapp.li](https://demo.snapp.li) here you go :) ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 19:08 Let's face it from the other point of view, i don't know what would be required, to be completely honest. i also never understood if they are supposed to be like \[shortlink\]/?params=123 or like a middleware shortlink \[shortlink\] > \[shortlink\]?utm\_campaign=a&utm\_social=whatsapp > actual link and this flow represent just the whatsapp shortlink (as it has the short link form and not a longer version of the short-code that would render useless shortening in first place... ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-07 19:19 Thank you very much, let me know if you run into problems :) ---------------------------------------------------------------------- damnelectric · 2023-12-07 22:35 Any plans to add functionality to create a short URL via API call? The look and feel of Snapp is amazing compared to other solutions I've tried, but API support is a large requirement for my use case. Looks like technically you could replicate the browser POST call but currently the response doesn't include the shortcode (if your not passing a specific one) Only other suggestion I'd have (if its not there already) would be a limit on storing metric data (e.g. only store data for past X days) just to save on storage space. ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-08 09:05 QRcode are up and running :) you can now generate a qrcode from a shortcode ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-08 11:16 i will look into the API interace for create and edit, meanwhile i integrated umami and optimized the limit of storing metric data, by setting ENV METRIC\_RETENTION\_DAYS it can be customized, or disabled for no limit. also it can be put to zero to erase every day. ​ Thank you for your feedback and suggestion! ---------------------------------------------------------------------- Hot_Chemical_2376 · 2023-12-08 23:26 REST API interface is up :)