SpacePhotos Svelte Themes

Spacephotos

A simple way to learn about the universe we live in

Space Photos

Space Photos is a simple way to learn more about the universe we live in—or just lose yourself in the fascinating photos (and videos!) of stars, planets, and more.

Concept

NASA’s Astronomy Picture of the Day has been around for over 30 years. It is mostly fine, except for two things: (1) the UI has hardly changed since APOD launched in 1995 (meaning it doesn’t look particularly good on mobile screens), and (2) the API service that scrapes the data from the web version is neither very fast nor very stable.

This project solves both of these problems by (1) introducing a fully responsive, mobile-friendly (and somewhat iOS-like) UI, and (2) storing every single photo asset right in the repo and deploying it statically (along with everything else). The result is a modern web app that is blazing fast (deployed on Cloudflare Pages), runs in every modern browser, and can also be wrapped in a native shell (this is how the iOS app works, supporting native features like haptic feedback and share sheets).

The goal of this project is to prove that many “mobile” apps can easily be implemented just once, as a PWA, reducing the development and maintenance costs. It’s also the first web app I built, so there’s so much more left to learn.

Why PWA

Space Photos started as a native iOS app back in 2018, when Apple’s SDK for iOS was more robust and didn’t require rewriting the entire project every year.

At 4.9 stars, it is the highest-rated APOD app on iOS, compared to every alternative (see for yourself).

But then SwiftUI changed everything: its APIs get introduced and deprecated in every iteration (requiring hundreds of if #available checks); it supports only ~80% of use cases out of the box (and requires an immense effort to handle the rest because of its “declarative” approach); and its performance is lacking (comparison video TBA).

Instead of tolerating Apple’s falling quality standards and questionable App Store policies, I decided to rebuild Space Photos without the dependence on any proprietary, platform-specific frameworks, at the same time bringing the app to every modern web browser.

The native app is still available on the App Store, but it is basically a couple of components to facilitate the use of native features like haptics (because Apple still doesn’t support the standard Vibration API). You can actually install Space Photos on your Home Screen without downloading anything from the App Store, since Space Photos includes a PWA manifest (and Apple was famously prevented from breaking web apps on the Home Screen).

Stack

Space Photos uses Svelte / SvelteKit, TypeScript, and web standards, and I do my best to cover as much as possible with automated tests.

Roadmap

Top categories

Loading Svelte Themes