Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Sudopad – Private link sharing board for friends (sudopad.com)
43 points by ishanr on June 29, 2022 | hide | past | favorite | 31 comments



Hi HN,

My closest friend only uses email and over the years I have grown tired of writing a heading and a body every time to share something with him.

So I built this very simple link sharing board which generates boards with uuids and as long as you know the uuid, you can see the links on the page and add new links.

It is built with Imba (which was fantastic) and Supabase as the DB. Deployed on Netlify.

Sharing in case there is someone else who might find this useful.


If you were to share via the browser itself to your email client, it would likely auto-populate the subject and body with information. Been doing that for well over a decade, probably much longer as I've accepted it as normal when sharing links.


> share via the browser itself to your email client

How do you do that?


Every major desktop browser has sharing functions built into it. For example, in Firefox, you can add an 'Email Link' option to the UI next to your taskbar that looks like an envelope, and go from there. Some browsers don't have this functionality exposed in the OOBE and you need to add it to the UI, but a good chunk of them have it by default.

Both iOS and Android also feature extensive sharing functionality in their major browsers, and these go far beyond just email with apps that integrate the sharing API into them, e.g. I can share a URL directly to a contact on Element, bypassing email entirely, but likewise, on the same menu I can choose to email it to someone.


Aah yes that is pretty cool. Puts the link in the body and the title in the subject.

Well should have used that more!

I do like a board which I can search later though and also multiple boards for different friends and family etc.


Board is admittedly very useful! This is exactly what I've had in mind for tracking a 'reading list' of sorts in reference to a conversation I've had with someone for both our reference.


Yes exactly. Our company works remotely so often times I want to share something that I have read with my friends and talk about it later.

Do you see yourself using sudopad then?

Anything which would make it even better?


Absolutely! I think being able to host it locally on our own server resources and domain would be nice for not having the uptime in the hands of a third-party. Not that I don't trust that it'll be there, but as a way of guaranteeing availability and long-term permanence of data, is quite important.

Offline browser caching would be nice, even if that needs to happen via a browser extension, which might make sharing even easier, especially if you could pick a pad to add it to.


Huh. That is so strange. Your ideas about the browser extension is exactly what I have in mind. Ill post a link on sudopad once it is ready. I was going to build a Firefox extension first since that's what I use. Does that work for you?


Great minds think alike. ;- )

A Firefox extension would be beautiful and very much appreciated, mate.


nice!

are you willing to share the Imba code for us to learn from? and how was the debugging experience on Chrome? Was there a large barrier to go from compiled down JS code to Imba source?


There were a few places where the compiled down JS to Imba was a bit hard. But when it got tricky I could just compile that single file and see the results. Overall it was pretty straight forward but also my app is pretty simple.

And here is one of the components:

import supabase, { UNIQUE_VIOLATION_CODE } from '../constants' import normalizeUrl from 'normalize-url' import './links-list'

tag pad-page

  loading = false
  links
  err\string
  newUrl\string

  def routed
    fetchLinks!


  def fetchLinks
    loading = true

    let {data, error} = await supabase.rpc('select_links_from_pad', { pad_id_input: route.params.id })
      .order('created_at', {ascending: false})

    loading = false

    if error
      log error.message
      return

    links = data
    imba.commit!

  def addLink
    if newUrl
      const {data, error} = await supabase.rpc('insert_link_into_pad', {
        pad_id_input: route.params.id,
        url_input: normalizeUrl(newUrl, {defaultProtocol: 'https:'})
      })

      if error..code == UNIQUE_VIOLATION_CODE
        err = 'link already added'
        setTimeout(&, 3000) do
          err = ''
          imba.commit!
      elif error
        return

      newUrl = ''
      links.unshift(data)

  <self>
    <div[mt:5]>
      <label[mr:3]> 'add a link'
      <input
        [bg:red4 c:white]=err
        type='url'
        bind=newUrl
        @keydown.enter=addLink
      >
      <button[ml:1] @click=addLink> 'Add'
      if err
        <p[c:red5]> err

    <links-list loading=loading links=links>


I hope this console error message will be helpful to you, as it wasn't really for me:

The resource from “https://shynet-lhkb.onrender.com/ingress/f29fe2d5-5f78-456e-... was blocked due to MIME type mismatch (X-Content-Type-Options: nosniff).

Also, console reports another issue:

SyntaxError: invalid regexp group client-SMJMSZTC.js:2:145487

FYI, the sudopad.com domain unfortunately displays nothing at all in my browser.


Oh that is actually shynet self hosted analytics which is privacy friendly. https://github.com/milesmcc/shynet

But I think I'll just remove it for now.

Update: removed


added: it seems the error may be with the framework "lmba" that you are using as the console reports these (other) issues at the lmba.io page (which also returns completely blank):

unreachable code after return statement[Learn More] index-LZXNJ15B.js:16:21954

TypeError: window.customElements is undefined[Learn More] index-LZXNJ15B.js:8:23994

But thanks for the idea, I might like to code something similar without using frameworks. I still miss the del.icio.us thingamajig sometimes


Interesting. Can you kindly let me know your browser and os?


Sure, no prob. I belive I was using a somewhat niche browser on an old 32 bit machine, which could be out of the scope for what you would like to support :):

User Agent: Mozilla/5.0 (X11; Linux i686; rv:68.0) Gecko/20100101 Goanna/4.8 Firefox/68.0 PaleMoon/29.4.0.2

(I'm certainly not requiring that you should support such niche tech, it's just a very old laptop that has a better form factor than my more recent ones, so I tend to prefer it for various situations)


I often have to pass a link over the phone, in covnersation. It would be great if the uuid were short--as short as possible.


Pad url aliases would be nice to have. But I would have to gate it behind a login so that there are no clashes. Would you be ok signing up with a magic link for such a feature? Then you could name your pad with however short of a name you want. Without a login, even a short UUID would be random characters and hard to speak over the phone.


Love the minimalistic side of it, resist adding new features :D not saving the pads in localstorage will push people to actually share the pads so that they don't lose the links they added


Ya that's a nice side effect I didn't think of. Thanks. I also use browser bookmarks a lot so I just bookmark one board for a friend and another for family.


This is a nice clean app. Loving the simplicity. Have you considered adding an edit function? It would help to fix links that no longer work or fix a typo, etc.


Yes adding it would be trivial. Right now I just add the new link with a note. Would it help your usecase?


I think it would. Having the ability to edit entries could prove useful under different situations. I see that it notifies you if you try to add a duplicate; That's pretty cool. I enjoy this project quite a bit, and it has sparked some interest in bookmark sharing in general. Thank you for this.


Thank you. I'll add the edit functionality shortly. I'm glad simple bookmark sharing is something that you like. After building it for just my friend, I see more and more use cases for it. Someone is already using it to share links with their classes.


Nice app, haven’t heard of Imba before!

They have a really cool effect on their homepage, curious how it works.

https://imba.io/


Thank you.

Imba is a real pleasure to work with. I have only good things to say about it. It brought back the joy in web programming for me.


Why wouldn't you just use a Google Doc or Slack for this?


You could. Maybe not slack but google doc you can. But it just feels not built for this purpose. Along with the extension I'm developing this would let you share with 1 click and get notified in realtime if you want etc. It's a more purpose built app I guess.


hello, it will be nice if we can include a short line for url description or title?


Well why not. I can definitely see it can be useful. I just added it. Should be live. It's text field. So you can also write long notes if you want. It's up to you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: