5 ms·
One thing that folks may find interesting about this project on a technical level is that it's fully stateless including the backend that's responsible for inte
by qrohlf 4y ago
One thing that folks may find interesting about this project on a technical level is that it's fully stateless including the backend that's responsible for interacting with Stripe Checkout, processing payments, and sending emails with receipts and links to re-download patterns.
The thing that makes that possible is that I'm using a seedable PRNG for the pattern generation and have a custom serialization format for all of the possible pattern parameters. This means that any pattern can be represented by a single short string like `w:1440!h:900!x:random!v:0.63!c:0.06!s:9gjk5s!f:sp!i:0.30` and reproduced with 100% accuracy.
That means instead of a database, I can just store the entire purchased pattern directly within the Stripe transaction within the `client_id` field using this compressed representation. Then it's just a matter of reading it back from the Stripe API when I get the "purchase completed" webhooks in order to build the correct attachments and send the customer their assets via email. This keeps my own service totally stateless & database-free, and also has the very nice property of allowing me to quickly and easily access the pattern by copy-pasting the client-id from the Stripe dashboard if I ever need to grab it for customer service reasons!
- mr-karan 4y agoQuite a cool approach. Although only one downside I see here is that you're just relying on Stripe to let you access order history? What if they don't let you access this data via APIs for data older than a certain time period? Or is that not much of a concern here?
- josiahpeters 4y agoI know that people are beating you up over the price, but this is great. 1. Someone could generate the same asset for themselves using your open source library. Which is great for someone who has time over budget. 2. You are providing value in your packaging of that time savings. 3. You created a very cheap way to offer this using server less and stateless. Props to you for making something that is financially sustainable for a long time. Number 3 is the most interesting of the above. That’s no easy feat and I applaud you for it.
- savolai 4y agoIt says you can use the library on your website if the website is open source. When does a WordPress website qualify as open source, or not? Or is the talk about gplv3 just trying to scare people because it's unclear to them what this requirement actually means? Not criticizing your business model, just curious. Thanks for the tool, liked the aesthetics.
- worldmerge 4y agoThat's so cool!!!
- eek2121 4y agoMy issue is that: a) You (or bots) keep posting this here. b) You are using an open source library without saying as much. It is fine to share your creation, however at this point it has become spam. Spam where you haven't even credited the source.
- lelandfe 4y ago> It is fine to share your creation, however at this point it has become spam Ah, yes, behold the spam: https://hn.algolia.com/?q=trianglify https://hn.algolia.com/?q=trianglify Looks like it gets shared 0-1 times a year. > you haven't even credited the source The source is, uh, themselves. So who cares? But they’ve attributed themselves prominently, anyway. Click FAQ: > Trianglify.io is a tool I wrote to generate low-poly backgrounds, textures, and vectors. It's based on an open-source library, Trianglify, which I also wrote.
- xialvjun 4y agoIsn't it another JsonWebToken?
- y42 4y agoCould you provide more details about this Stripe-process? Sometimes I write little tools like that and I think about monetarizing, but I'm just to focussed on the actual tool (you may call it lazy) so I don't want to take care of all this "bureaucracy-overhead" when handling the trade and things. (Or just tell me: Go ahead and learn it, if you want to earn money :|)
- jokethrowaway 4y agostripe integration is pretty smooth the only annoyance is vat taxes / sales tax I moved from stripe to paddle to avoid that pain