Skip to content

Conversation

@frederickobrien
Copy link
Member

@frederickobrien frederickobrien commented Oct 17, 2025

This got a little bit out of hand. What started as a PR to add Collections (groups of albums) and Mixtapes (groups of songs) has also come to include remote functions and quite a hefty data types rejig.

Listeners can indeed now create, customise, and delete collections and mixtapes, with (for now pretty clunky) popups available on releases and tracks.

This also wound up being a nice excuse to try out Svelte's experimental new remote functions. Early days but I think I really, really like them. In tandem I've introduced Zod for form type checking and that whole side of things feels far more organised. There's still more to do but that can be work for another PR.

I also wound up trying to reorganise the underlying data types to make them easier to reason with. Now Artist, Release, Track, Collection, and Mixtape types can be mixed and maxed to form hydrated versions of themselves:

import type { Artist, Collection, Mixtape, Release, Track } from "./core";

export interface ReleaseHydrated extends Release {
  artist: Artist;
  tracks: Track[];
}

export interface TrackHydrated extends Track {
  release: Release;
  artist: Artist;
}

export interface CollectionHydrated extends Collection {
    releases: ReleaseHydrated[];
}

export interface MixtapeHydrated extends Mixtape {
    tracks: TrackHydrated[]
}

In tandem with this I've moved a few more pieces of data to the global state rather than passing them around everywhere and muddying the waters.

Monster of a PR in the end, daft, but pleased with how Soli's feeling. All the base functionality is now more or less there.

A few screenshots

image image image image image

Followups

  • Make listener routes/pages non-indexed
  • Use Zod and remote functions in the dashboard
  • UI refinements in popup menus (at the moment the same popup appears for tracks regardless of the context, for example)
  • Edit details of existing mixtapes and collections
  • Allow users to reorder mixtape tracks

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for soli-network ready!

Name Link
🔨 Latest commit 9f3a58d
🔍 Latest deploy log https://app.netlify.com/projects/soli-network/deploys/68fe354e54511a00085087a2
😎 Deploy Preview https://deploy-preview-55--soli-network.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for soli-api ready!

Name Link
🔨 Latest commit 9f3a58d
🔍 Latest deploy log https://app.netlify.com/projects/soli-api/deploys/68fe354e87e088000891f148
😎 Deploy Preview https://deploy-preview-55--soli-api.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Oct 17, 2025

Deploy Preview for soli-artists-dashboard canceled.

Name Link
🔨 Latest commit 9f3a58d
🔍 Latest deploy log https://app.netlify.com/projects/soli-artists-dashboard/deploys/68fe354e7f44e50008a4aaa2

frederickobrien and others added 10 commits October 17, 2025 10:41
A step towards where I want to be but still more to do. This separates global state from props enough to make track tables far more reusable, as they should be, but the data model needs to be tidier
Of sorts
@frederickobrien frederickobrien marked this pull request as ready for review October 26, 2025 15:02
@frederickobrien frederickobrien merged commit dbdc871 into main Oct 26, 2025
12 checks passed
@frederickobrien frederickobrien deleted the collections-and-mixtapes branch October 26, 2025 15:06
frederickobrien added a commit that referenced this pull request Oct 26, 2025
Attempting to get things working after #55. Looks like remote functions may have some issues around origin so hopefully this approach is temporary
@frederickobrien
Copy link
Member Author

frederickobrien commented Oct 26, 2025

A few teething issues mostly resolved by #58, #59, and #60. Remote functions don't seem to play nicely with CORS - sometimes the request origin of remote functions hitting the API is (wrongly) null which causes the check to (rightfully) fail.

Setting the origin explicitly seems to have done the trick though it feels a bit gnarly. I've adjusted the local dev setup to seemingly mirror production behaviour, with the base domains changing depending on the environment but the checks always applied.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants