Skip to content

The Shop at the End of the Galaxy — A Full-Stack Cosmic Marketplace

Published:by Lambo Zhuang

Table of contents

Open Table of contents

🪐 What the Project Does

Users can explore a catalogue of real asteroids, each uniquely rendered as a stylized SVG “space rock” generated deterministically from NASA’s Near-Earth Object API data. Every asteroid has its own CosmoCoin price calculated from its physical properties like size, brightness, velocity, and rarity.

On top of that, users can:

⚙️ The Tech Stack

This project was built as a modern full-stack application, blending the latest frontend and backend technologies into a cohesive developer workflow.

Frontend

Backend

Infrastructure

🌍 Integrating NASA’s API

The app retrieves live data from NASA’s Near-Earth Object API, fetching asteroids approaching Earth within a given date range. We process that data, derive attributes like hazard level and approach velocity, and feed it through a deterministic random generator to create a unique visual for each asteroid.

That means the same asteroid ID always produces the same shape, color, and crater pattern — a blend of math, art, and code.

💡 Architecture at a Glance

The system follows an MVVM (Model–View–ViewModel) pattern, with Zustand serving as the ViewModel layer for the client. GraphQL acts as the single source of truth, bridging NASA’s external API with our MongoDB cache for faster querying and richer filtering.

Cron jobs periodically refresh cached asteroid data, while WebSockets deliver live session updates to the frontend.

🧩 Development & Deployment Workflow

Local development is a breeze:

docker compose up --build

This spins up MongoDB, the backend, and the frontend in watch mode — all hot-reloading automatically.

For production, we deploy using:

docker compose -f docker-compose.caddy.yaml up --build

This stack uses Caddy to handle reverse proxying and HTTPS termination, making deployment simple and secure.

🚀 What Makes It Special

✨ Final Thoughts

The Shop at the End of the Galaxy isn’t just about selling space rocks — it’s about combining playfulness and precision engineering.

From real-time data streams to procedural graphics generation, it showcases how creative web development can turn science into art.

👉 Visit the live demo

📦 View the code on GitHub


Next Post
Pixel World – MVP-Architected Web Application