Post

Announcing Subspace — A Star Trek Episode API for Developers and Fans

After starting life as a random episode generator, Subspace has evolved into a full Star Trek Episode API built with ASP.NET Core. In this post, I share the journey from early development to final deployment, the lessons learned, and what's next for the project.

Announcing Subspace — A Star Trek Episode API for Developers and Fans

Announcing Subspace: A New Star Trek Episode API

Today I’m excited (and a little relieved) to announce the launch of my new project: Subspace — an open Star Trek Episode API for developers, fans, and archivists alike.

You can check out the full API documentation here.

A Journey That Started Years Ago…

Subspace didn’t begin life as a full API. Years ago, I threw together a basic random Star Trek episode generator in PHP — something simple that would spit out an episode when you clicked a button. It was fun, but it was also very limited. Recently though, as I’ve been learning more about ASP.NET Core, I decided to use the idea as a bigger challenge: turn that little generator into a fully-fledged, public API.

What started as a simple side project has become a proper production system — one that taught me more about web development, database design, deployment, and all the messy real-world challenges that come with getting a project across the finish line.

Building Subspace: Two Projects, One Solution

From the start, I knew I wanted a clean separation of concerns. I organised the solution into two projects:

  • Subspace.API – the backend API
  • Subspace.Web – a frontend website that hosts the landing page, documentation, and admin area

This structure made it easy to manage the API separately from the site itself — at least at first.
Later, this choice would lead to one of the biggest technical challenges I had to solve (more on that in a minute).

I also took the opportunity to implement some features that I’ve always enjoyed building:

  • An Admin Area – using ASP.NET Core Identity for authentication and access control.
  • Dark Mode Support – not just for the frontend but even for things like Swagger UI and ReDoc for a better developer experience.

Lessons Learned: The Importance of a Shared Project

While everything worked great during development in Debug mode, things fell apart when I tried to publish a Release build.

The problem?
While Subspace.API and Subspace.Web were nicely separated, they were both depending directly on models and data services that technically “belonged” to Subspace.API.
Not good.

When it came time to build and deploy, this created a tangled mess of dependencies that made clean publishing impossible.

What I should have done — and what I ended up doing — was creating a third project, Subspace.Shared, as a Class Library.
I moved all the Data context and Model classes there so that both the API and Web projects could depend on Shared, without depending on each other.

It was a bit of a tedious process — moving files, fixing namespaces, updating references — but once it was done, everything built cleanly and properly.
A hard-earned lesson in proper project structure.

Publishing Day: The Final Adventure

Today was the big day — publishing Subspace live to the world.

Here’s how it went:

  1. Database Prep
    I dumped my local development MariaDB database, ensuring I grabbed all tables, relationships, and data needed for production.

  2. Deployment
    I used scp to upload the published files to my remote Linux server.

  3. Database Import
    I set up the MariaDB database on the server and imported my dump file.

  4. The Fun Part: Errors
    When I launched the site… it crashed immediately.
    After some digging, I realised I didn’t have the correct version of the .NET runtime installed on the server.
    (A classic: “works on my machine” moment.)

  5. Fixing the Runtime
    I updated the server, installed the correct .NET runtime, and the site finally came alive.

  6. Polishing
    I spent some time tweaking dark mode support for Swagger UI, making the documentation nicer to read in both light and dark themes.
    I also set up a redirect so that visitors hitting api.subspaceapi.com would be automatically redirected to subspaceapi.com for simplicity.

Visit Subspace

You can visit Subspace at:

🔗 Subspace

Source code can be found at:

🔗 GitHub

Whether you’re a developer looking to integrate episode data into your app or just a fan who wants a quick reference, Subspace is free and open for you to use.

What’s Next?

Now that the API is live, the next big step is to integrate Subspace with social media.

The goal is to automatically post a daily random Star Trek episode to platforms like Twitter, Mastodon, and Bluesky.
A little bit of fun and maybe a way to help fellow fans rediscover episodes they might have forgotten.

I’ll be sharing more about that integration once it’s live — and no doubt learning even more lessons along the way.

This post is licensed under CC BY 4.0 by the author.