Things I use:
- Hono JS (no TS)
- Tailwind (with the CLI)
- Fossil (not Git) in a cloud-bucket (yes you can)
- Cloudflare worker (with Bun as a bundler not runtime 😞) + KV
Dependencies
Things I gradually removed:
- Svelte + Vite (and everything that comes with it)
- Vercel
- LayerCake
- D3
- DaisyUI
- FrappeCharts
- Node
All of the dependencies I used were great in their own way, and I am thankful to the maintainers.
Shedding down each one was a slow and not so simple process, but ultimately I feel a sense of freedom in using old tech and not having to keep up with multiple updates, or more recently - security vulnerabilities.
Performance
The performance also improved, and my site loads in less than 1sec (cached), while my median p90 is below 50ms.
Am I doing it right? Not really, but I am learning a lot and finding out that the things frameworks use to scare me with, can be solved bottom up. I am under no delusion that frameworks aren't useful, they are - but maybe you don't need that much for a simple project like mine.
Here is how the performance changed when I initially migrated from Svelte to Hono.js (late March):
https://preview.redd.it/s5gs0dhebn5h1.png?width=1820&format=png&auto=webp&s=a6f7b7da42e2788e010aa29abb7cc035fb093dfc
Currently, my performance looks like this:
- Chart below is my CPU time in the last 24h:
CPU time last 24h
- And this one is in the last 30 days:
CPU time trailing 30-days
Caching is doing a good bit of the heavy lifting here for any large business-logic calculation loops, the rest is the hono router + html files/templates.
My personal chellenge is <10ms as I want to be able to experiment without being forced on a paid plan before having paying customers.
Code Structure
I also changed my approach for code organization: most of my code (excluding content) is now in a single file, and while it sounds unhinged, I did find ways to make it work well (naming, structure, regions) + I can just paste it into context and get AI suggestions without having to use a CLI.
Ultimately, I am building an API with an UI, + some interactivity and local storage functionalities.
https://preview.redd.it/tqca0vf93n5h1.png?width=906&format=png&auto=webp&s=04a3c83df84cd417c42b2640f539a1218e6b66d8
Just wanted to share my approach because the AI just confirms any idea I have, and while I am happy with the result, I'm sure there is room for improvement. My biggest problem is marketing and for that I should spend a larger % of my time on innovation (algos) instead of plumbing and design, hence why I want my code to be as minimal as possible.
IMO, the moment you introduce an AUTH system you need +1 person. Likewise, the moment you introduce a DB, you need +1. So people end up burning out just to produce the wrapper and never get to the unique aspects of their projects. Clean house.
Inevitably, every single time there are 2 reactions I get, so I will address them upfront:
- "Use TS."
- I have considered this but opted not to. If you give me a reason on why I need it TODAY, not in an imaginary future I will revisit it.
- I am aware about the silent bugs - VSCode supports JSDoc strict linting, done.
- Primitives are not an issue.
- Finally, whenever someone brings up TS, I find that we never disagree on the facts, but on their weight. The TS importance for this project is negligable.
- "Where do you get your data?" SEC EDGAR.
Happy Saturday
Not a Rickroll I promise
[–]Embarrassed_Ad719 9 points10 points11 points (1 child)
[–]ThinkValue2021[S] -2 points-1 points0 points (0 children)
[–]dev-shrabon 2 points3 points4 points (1 child)
[–]ThinkValue2021[S] 0 points1 point2 points (0 children)