Readit News logoReadit News
Posted by u/satvikpendem 3 years ago
Tell HN: I was tired of being a perfectionist so I built an app within 24 hours
Like probably many of you, I'm kind of a perfectionist coder/creator. Recently I'd been bookmarking interesting dark mode sites just because I liked their aesthetic, and because for some of the SaaS I want to make, I wanted to make it dark mode first rather than light mode like most sites, so I was looking for inspiration.

I'd amassed around 20-30 and I told my friends about these cool sites yesterday. They mentioned that me linking to each one was kind of annoying and they wanted to see all of them at once, similar to how Awwwards and other web design inspiration directories worked. I thought a making a dark mode directory was a great idea as I could just link one site to my friends rather than bombarding them with links.

I'd previously worked on other projects but I always spent too long nitpicking every detail. It always took so long that I lost interest after a while and the project was abandoned, or I overengineered the site so much that I didn't even get to the actual app functionality. People say to build an MVP as soon as you can, but for certain people, it can be quite a challenge to constrain yourself.

This time I told myself I'd do everything in 24 hours, as it's not a super complex idea to create. I bought a domain off Google Domains, used Next.js to spin up a React site, and basically converted my bookmarks into a JSON file along with their titles and descriptions. In the React side, I read the JSON file and put the URLs in iframes with another container with the title and description.

One tricky part was that many sites block iframes, so what I had to do was save the entire website into its constituent HTML, CSS, and JS, and I displayed that instead in the iframe.

Overall, I'm happy that I was able to execute on an idea within only a day of working on it. It's not a monetized product or anything, simply a directory, but still, it was fun.

The site is: https://darkmodes.com (I was surprised that the .com domain was actually available!)

Edit: If the link doesn't work, try https://darkmodes.vercel.app, having some domain issues right now.

javawizard · 3 years ago
OP: don't change a goddamn thing. Other commenters' suggestions are great, but that's the point: you built the thing and you released it. Doesn't matter if it's React, large, not static, whatever - it's done and it works.

As someone who finds himself in a perpetual battle against the tendency to be perfectionistic: you are an inspiration.

stoicjumbotron · 3 years ago
100% THIS.

I'm seeing the sentiment shared by other comments way to often regarding over engineering, stack preference, incorrect terminology and what not anytime someone shares something they made. Some feedback might be valid, but most of it is just unnecessary nitpicking. So keep doing what you're doing OP.

matwood · 3 years ago
Agree completely. All the nit-picking is why the hardest part of what the OP did is putting themselves out there. Releasing a project requires a mix of traits that are often at odds, naivety to think you can, humbleness to listen to valid feedback and ego to push down the path you think correct.

No project is ever perfect and getting things out the door is always messy.

satvikpendem · 3 years ago
Thank you. Some of the comments were pretty helpful, they helped me improve performance by lazy loading a lot of the content, so it works a lot better now. I have seen the "critical HN comments" before on some other show HNs so I know what you're talking about though.

Hope me being an inspiration helps fuel you to do a 24 hour type challenge as well! Maybe that could be a good idea to build a directory of people doing such a challenge, I only know of https://24hrstartup.com/ which was live a few years ago but that seems to have only been a one-time event.

websap · 3 years ago
OP can ignore the cynicism from a lot of the commenters here, but can improve the app based on some of the suggestions, to improve the performance and learn some new skills.
rpastuszak · 3 years ago
There’s a difference between explicitly asking for feedback and saying “hey here’s the cool thing I made, check it out!”

HN comments often miss the context of a post and focus on nitpicking or giving unsolicited feedback.

Many of the HN members I met (makers/hackers/students) lurk but rarely post here for that reason.

satvikpendem · 3 years ago
Thanks, I did some performance optimizations by using the library react-lazy-load-image-component, now it loads pretty quickly and will only load iframes when you scroll down.
Falkon1313 · 3 years ago
Nice, but, do you really need Next.js and React for that? What about just taking screenshots and linking them to the sites in simple HTML? Wouldn't that serve the purpose?

I guess you wouldn't really call that an 'app', just a page. But it'd be pretty quick and simple. And if you really want to get away from over-engineering and getting lost in the code details, doing it without any code at all is a good exercise.

Perhaps from there a simple script to take a list of URLs and generate the page's HTML, but still no libraries or frameworks. Scripts like that can live for many years, just being run as needed, serving their purpose with no maintenance or dependency or deprecation issues. Some scripts that I wrote are still running perfectly fine on their own, untouched after 7+ years, while the main application requires a whole team of people constantly maintaining it.

It's good sometimes to get back to basics to put things in perspective.

Things like the leftpad debacle of 2016 should make us think about how we build complex, fragile ecosystems that are constantly changing, and need constant maintenance, often to just do something simple that doesn't need all that complexity in the first place. How simple and quick can you do it? Do you really need code to dynamically scroll down to thing X, or could you just put that thing at the top to start with and not need any code or dependencies?

You're on a good track. We over-complicate things a lot.

hyperman1 · 3 years ago
Any builder is 10x as productive when working with known tooling. Meanwhile, tooling that even makes you 5% more efficient is very rare. So the OP is very right in his technology choices.

I've seen a COBOL+assembly team run rings around teams with more modern tooling, producing guis that, while ugly as hell, were more productive than a modern HTML based interface. They know their tooling and business inside out, and that more than offset the fact that their tech was 50years stale.

agumonkey · 3 years ago
I've been looking for such teams for a long time. Can I interview them ? or work there ? if the company still exists.
barbarbar · 3 years ago
Yes - It is VERY hard to beat a well made 3270 gui.
satvikpendem · 3 years ago
Yes, I'd call it a site as well, not an app, my mistake.

Ironically it's even easier to host an iframe than an image. I didn't want to really sit there and grab screenshots of every site, plus iframes are interactive which is interesting given that many of these sites use a lot of animations, for better or worse. I also don't have to do any upkeep really, as long as the site is live it will continue to be updated in the iframe since it's accessing the actual site. The only thing I had to do extra was download the site contents for a few of the sites, which block iframe hosting, but it's far fewer than getting screenshots for all of them.

I even thought more deeply about the screenshot approach, going so far as to look into using Puppeteer or Playwright, but I decided against it because that's even more work than doing <iframe src="site.com"/>.

I used Next.js because that's what I know, someone else on Reddit I believe asked if I could do the same in 12 hours with WordPress (or raw HTML, CSS and some scripts as you mention), which yes is possible but I don't know WordPress so I'd have to learn its quirks. The HTML/CSS/scripts version doesn't seem much easier, since that's basically what I'm doing in the React side as well, for-looping through the contents of a JSON file which Next.js handles generating HTML for automatically.

neongreen · 3 years ago
I have some experience with static sites — my personal site was a static Markdown-generated site for about six years. The generator went through several iterations, from a shell script to a Haskell app. My company site (also static) was generated with Haskell and later bits of it used Mustache. I've used a variety of hosts, too — GitHub Pages, Vercel, DigitalOcean.

None of those survived even a year without bitrot.

Sure, once the site was deployed it would work forever regardless of the platform. But this is true with Next.js and Vercel (what the OP is using) as well.

Once I wanted to modify the site and reupload it, something would always break. Incompatible dependency versions. The deploy manifest (for Vercel) doesn't work anymore. Something happened with Bash (I don't remember what exactly was the culprit). Nix doesn't work on my new machine and I specified the deps (imagemagick etc) with Nix because "then it'll never break". Etc.

At least with Next.js you get a bunch of nice stuff out of the box. A Next.js site should in theory be faster than a fully 100% static site. Next.js automatically prefetches links in viewport/on hover, makes sure images are only loaded when they are in the viewport, and inlines Google Font links. Vercel automatically distributes your static files over a CDN.

This is just my experience, but personally I have learned that if I want to make a static site, I will not avoid bitrot no matter what. So at least I might enjoy free CDN-enabled hosting & out-of-the-box performance tricks & a good templating language.

alpaca128 · 3 years ago
> makes sure images are only loaded when they are in the viewport

To be fair that can already be done in pure HTML with the `loading="lazy"` attribute. And browsers will probably do the link preloading as well sooner or later, some already do in specific cases.

NextJS is nice but after all the issues with dependencies and npm I went through I'd hesitate to use it for personal projects.

kalleboo · 3 years ago
I’ve been tasked with maintaining our online stuff (some websites, some backend API for our app, a basic admin page for in-app feedback)

It was originally written in PHP over 10 years ago with bits and pieces added.

Over the years it's gone between hosts, Linux distributions, and many PHP/Apache versions.

I think it only broke due to a PHP depreciation once.

So if you want longevity, I'd say PHP is the best option, even if you just use PHP to generate a static site.

aliqot · 3 years ago
> do you really need Next.js and React for that

Folks like it these days, nothing wrong with doing stuff for fun. Possible that it enabled them to complete the project in 24h this way.

doodlesdev · 3 years ago
This is a project that could be done in less than 30 minutes as a webpage and maybe some JavaScript.
sublinear · 3 years ago
I agree. Mounting a "dist" directory and spinning up nginx is a one-liner command for Docker.

Using a static site generator would be a single for loop.

The rest is a small amount of CSS.

Bonus points if you write the selector necessary to "display: none" all iframes except one at a time. Solves the excessive memory problem. :p

aembleton · 3 years ago
No need to run docker or nginx as it's hosted on vercel. Just push to a github repository

Deleted Comment

reustle · 3 years ago
Bandwidth warning: opening this site downloads 87.9 MB in resources.

Nice work though! I'd suggest moving to screenshots that toggle to an iframe once they're clicked.

satvikpendem · 3 years ago
That's a good idea, maybe even a short gif/video of interacting with the site that turns into an iframe on click. I bet I could squeeze a video into only a few megabytes or fewer.
sam1r · 3 years ago
Thank you for this warning!

Deleted Comment

boplicity · 3 years ago
Dark Mode thought: As someone who uses an OLED screen, I want dark mode to feature true black. This makes a huge difference for me. I get quite annoyed with any dark mode that is mostly "dark grey" as opposed to just black. I want all of those dark pixels emitting no light at all. This is much easier on the eyes, and takes full advantages of the wonders of OLED. This is especially important for mobile, where many, many people now have OLED screens.
satvikpendem · 3 years ago
I use an OLED as well (an LG C1 48 inch TV as a monitor actually lol) so I made the background black as, like you, I think #000000 looks good on an OLED. However, it can look quite a bit harsher than softer colors such as on the Linear or Radix examples. It's okay if you're making a brutalist site like mine is (with bold, big text) but it doesn't really look that good for other site designs.

All that being said, I use the browser extension Dark Reader to crank up backgrounds to #000000, but I think most people would be annoyed at pure black.

wruza · 3 years ago
Last week I received a badly written, details-lacking requirement to create a site that would take an amount and present a page to pay a tip, either one of fixed %, or a custom sum (including url signing, design and actual backend that talks to a payment processor and a client registry). Two hours of express, querySelectors and a page of css later I deployed it to DO Apps (add half an hour if it were a vps with a certbot) and moved on.

I’m looong tired of setting up a scaffold, configuring configs, building builds, componentizing components, zealoting paradigms. If a way is correct, it must be built-in, no-overhead. Feed it to someone else if it takes half an hour only to set up.

imtringued · 3 years ago
I did that, then I switched to godot and the godot project is further along despite the fact that the site now needs to download 20MB (18MB is the engine itself). Who cares? The only thing that matters is that it works and that people don't have to install it on their computer.

A game engine is a good fit for what I'm doing (simulation and 2D visualization) so why bother assembling it out of a dozen hand picked fragile JS libraries just to shave off seconds on something that will be used for tens of minutes once it is started up?

tmtvl · 3 years ago
Giving yourself, say, 20 hours to build a kind of an application seems like a good way to learn quick iteration techniques. Coding challenges like Advent of Code or game jams like Ludum Dare can really push one to take a whole new approach to coding.

Also, light themes are superior.

qorrect · 3 years ago
> Also, light themes are superior.

What did you just say to me ? /s

Emigre_ · 3 years ago
It’s really cool that you did this. It’s like a personal exercise to develop a particular aspect of yourself, in this case ‘focus’.

Did you know there is a similar challenge between comic-book creators called the ‘24h-comic challenge’? The idea is to produce a 24-pages-long comic book in 24 hours. Creators like Scott McCloud or Neil Gaiman have participated.

https://en.m.wikipedia.org/wiki/24-hour_comic

satvikpendem · 3 years ago
Thanks, hadn't heard of the comic challenge but it's interesting, not surprising many creative industries have similar challenges. I also know of NaNoWriMo, National Novel Writing Month, where people write an entire novel in one month. I think time-boxing effort is a great idea in order to ship stuff, like you said.
itsuka · 3 years ago
I wonder the legality aspect of hosting someone's else code as preview. If this is a problem, I think you can use a video preview like any other award websites. godly.website is one example that comes to mind. IIRC, they have responsive videos and good information density.

I hope this comment is not taken as a criticism, which you have received a lot already in this thread. I myself use Next.js (and Cloudflare stack) in almost all of my projects and I feel very productive with it.

Just throwing an idea here: since the viewer of your website may need to copy other website's design, it would be nice if you can save them a few clicks/keystrokes by providing a color palette. One thing I learned recently from creating a personal tools like yours (with additional types, elements, motion pattern, and tech stack) is that we can extract colors from any page easily using CSS Overview panel in Chromium Dev Tools.

Lastly, I just want to congratulate you on shipping!

satvikpendem · 3 years ago
That's a good idea about the color palette, I'll add that in there. Do you know of a way to automatically extract the palette or would you do it manually?

Regarding the legality, I did look into it, it seems like iframing other websites should be legal based on what I read, but if anyone contacts me to take down their site, I'll do that.

itsuka · 3 years ago
> it seems like iframing other websites should be legal based on what I read

I think embedding other websites in iframe may fall into a gray area. This is my reasoning: even though the target website can include X-Frame-Options: DENY in their header, a lot of them don't, and it opens their websites for abuse, whether intentional (from your POV, e.g. clickjacking), or unintentional (e.g. a DDOS attack on your website may also affect the target websites). Because of this, I have been careful not to embed cross-domain websites in iframe.

The issue that I was trying to bring up is actually not about iframes, but rather, other website code and assets that you copied and hosted in /sites/ directory. As you know, websites and their assets (logo, font, etc) are copyrighted materials - so we can't (directly) use it without the owner's permission. I don't know if this usage would fall under Fair Use though.

As previously mentioned, I'm not versed in legal stuff.

> Do you know of a way to automatically extract the palette or would you do it manually?

CSS Overview panel does the job. It groups colors by usage, such as by background and by text, and it also gives you the contrast level for each. I'm sure you can find other tools for extracting colors. Most recently, "HTML To Figma" by Builder.io is the one that gains a lot of hype. It basically converts any web page into figma layers that you can edit. From there, you can extract all of the design tokens, including colors.

I don't know any tools that can automatically extract and label a color palette with 100% precision. If you care about accuracy, I think you still need to do a bit of curation / manual work.