thevivekshukla

Joined 9 years ago

Karma
5
Submissions
20
Member since
Sep 7
Software Engineer - Website: https://vivekshuk.la - Works @ Daestro: https://daestro.com
View on Hacker News

Recent submissions

Comment · 1 month ago
Svelte/SvelteKit is awesome, easy to learn and good DX. Svelte was my first frontend framework experience. Daestro's console is built on it.
Comment · 2 months ago
Good story. I was hooked.
Comment · 5 months ago
> And Search is just completely unusable now. They built an entire empire off our content. Bloggers, old forums, niche sites. We made the web worth searching in the first place. Now their AI Overviews just scrape our exact answers, strip out the hyperlinks, and repackage it in a blue box without linking back.

I don't like that they throw AI overview on your face when you search, rather they should show AI overview on the right column and search results on the left.

Comment · 8 months ago
RIP
Comment · 9 months ago
Comment · 9 months ago
Comment · 11 months ago
Comment · 1 year ago
Comment · 1 year ago
Comment · 1 year ago
I've been building something with HTMX since the last week, I have not done whole lot of complex things with it but I don't think it will pose any problem when time comes.

I get the premise of HTMX and when and why to use it, it's not solution to everything however it is a blessing for backend developers' who wants to work on frontend.

-> A bit of backstory

For my project Daestro[0], which is bit complex (and big) I chose Rust as backend and Svelte (with Sveltekit) as frontend SPA app. This was my first time working on both. After years of working on Django, I wanted to try statically typed language, after some research and trial, I chose Rust. Sveltekit was obvious because it made sense to me compared to other frameworks and it was super easy to pick up.

After working on Sveltekit for a year, I realised I've been spending a lot of time doing these same thing: 1. You create the api on the backend 2. then you create Zod schema on the frontend for form validation 3. the create +page.ts to initialize the form 4. in +page.svelte you create the actual form and validate it there itself with zod before sending it to the server

Hopping over two code bases just for a simple form, and Daestro has a lot of forms. I was just exhausted with this. Then HTMX started to get a lot of traction, I was watching it from a distant but having worked with Django and it's template, I was dismissive of it and thought having separate frontend is best approach.

-> Why I'm leaning towards HTMX now?

- Askama (rust crate) is a template engine which is compile time checked - Askama supports block fragments[1], which is you can render certain part (block) of template, plus for HTMX usage - Askama's macro almost don't make me miss Svelte's components - Rust has amazing type system, now you can just use it, no need to replicate those on Typescript - same codebase, no more hopping - only one binary to deploy (currently for Daestro I've 3 separate deployments)

-> My rules for using HTMX

You must self-impose a set of rules on how you want to use HTMX, otherwise things can get out of you hand and instead of solving a problem you'll create bigger ones. These are my rules:

- Keep your site Multi-page Application and sprinkle some HTMX to make it SPA like on per page basis - make use of hx-target header to only send the block fragments that is required by HTMX (very easy with Askama) - do not create routes with partial page rendering instead a route must render complete page, and then use block framents to render only what is being asked in hx-target - Do not compromise on security[2]

[0]: https://daestro.com [1]: https://askama.readthedocs.io/en/stable/template_syntax.html... [2]: https://htmx.org/docs/#security

Comment · 1 year ago
Comment · 1 year ago
Wow this is fast.

However I tried rustls with redis for my axum application, for some reason it was not working, even though my self signed ca certificate was updated in my system's local CA store.

After a lot of try I gave up then thought about trying native tls, and it worked in first go.

Comment · 1 year ago
Comment · 1 year ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton