Hacker News new | ask | show | jobs
Show HN: SimpleKV – an extremely simple, anonymous key-value store (simplekv.com)
24 points by re6tor 1555 days ago
9 comments

Perhaps the response should not return raw HTML:

# curl https://simplekv.com/path/to/key2

<html><body><h1>Well, this seems safe...</h1></body></html>

Thanks for your feedback! I see input sanitation as a double-edged sword: it could potentially prevent some misuse of the service (since it's 100% anonymous), but then ultimately you're the "owner" of your keys (though they're in reality public) and you should be able to write whatever you want in them.

I guess this argument could also be applied to Pastebin? Should it be returning raw HTML if asked to?

The "Content-Type" HTTP header is "text/html; charset=utf-8", you could make it "text/plain; charset=utf-8" to prevent HTML from being parsed.
That makes total sense, cheers!
Have you looked up cloudflare kv store? It might just be what you want https://developers.cloudflare.com/workers/runtime-apis/kv/
I was looking for something like this numerous times when working on network automation. Is it open source?
I'll open source it in the coming weeks. Feel free to e-mail me: simplekv at protonmail dot com
Interesting to see how you implemented this. I've created a similar service like this for internal use at a startup I'm working on. The basic idea is the same but I also implemented key deletion (HTTP DELETE) on top of read and write.

I read in one of the comments you're using Flask on the backend, are you storing the key/values in a SQL database? My backend is written in Go and data is serialized to disk in a binary format.

edit: I just saw that you also implemented a delete feature, my bad for not reading all the examples carefully ;-)

Are you planning to accept donations to keep this sustainable? This is actually really exciting, nobody has done anything like this in a long time, the last similar project seems to have gone down.

I'm using Jami's OpenDHT which provides a web gateway API to get and set things, maybe something like that could serve as a backend?

Thank you for your feedback! For now, I wanted to gauge interest and/or traction in such a service. I will definitely add a Donate button in it once the backend starts to max out the VPS where it lives.

As for the backend, it's a Flask-based API. I'll look into your suggestion though!

Would it be possible to require a key within a different url parameter? That way, one would need to know both the name and the api key of the field to edit/delete it? A key would be generated and returned in response to the initial creation request.
I'll see how to integrate such a feature in SimpleKV so that it keeps being simple. I like the idea a lot, thanks!
Good MVP. I wonder where this will lead.
Thanks! My use case was very specific, but the concept is so simple I was wondering what people would do with it.
Be careful. These things tend to morph, mutate and become turing-complete. If it grows an emacs step back quietly and slowly. Just remember to feed it plenty of parentheses and you'll be fine.
Nice concept, very useful for some test cases
Very nice! Thanks for sharing!