Skip to content

Sample State

Gary Jiang edited this page Nov 10, 2023 · 7 revisions
{
  "entities": {
    "users": {
      "byId": {
        "1": {
          "id": 1,
          "username": "user123",
          "email": "[email protected]",
          "birthDate": "1990-01-01",
          "gender": "male",
          "optinMarketing": true,
          "playlists": [1, 2],
          "likedSongs": [1, 3],
          "likedAlbums": [2],
          "likedPlaylists": [1],
          "followedArtists": [1],
          "followedUsers": [2]
        }
        // other users...
      },
      "allIds": [1]
    },
    "playlists": {
      "byId": {
        "1": {
          "id": 1,
          "title": "Workout Mix",
          "songs": [1, 2, 3],
          "createdByUserId": 1,
          "isPublic": true
        }
        // other playlists...
      },
      "allIds": [1]
    },
    "songs": {
      "byId": {
        "1": {
          "id": 1,
          "title": "Track Title 1",
          "albumId": 1,
          "artistId": 1,
          "length": "3:30",
          "albumTrackNum": 1,
          "explicit": false
        }
        // other songs...
      },
      "allIds": [1]
    },
    "albums": {
      "byId": {
        "1": {
          "id": 1,
          "title": "Album Title 1",
          "artistId": 1,
          "songs": [1, 5, 7],
          "genre": "Pop",
          "coverImg": "url-to-cover-img",
          "releaseDate": "2023-01-01",
          "recordCompany": "Record Company Name"
        }
        // other albums...
      },
      "allIds": [1]
    },
    "artists": {
      "byId": {
        "1": {
          "id": 1,
          "artistName": "Artist Name 1",
          "genre": "Pop",
          "verified": true,
          "aboutBlurb": "Artist Bio",
          "aboutImg": "url-to-img",
          "globalRanking": 100,
          "monthlyListeners": 100000,
          "albums": [1, 2],
          "songs": [1, 4],
          "followers": [1]
        }
        // other artists...
      },
      "allIds": [1]
    }
  },
  "session": {
    "currentUserId": 1,
    "isAuthenticated": true
  },
  "ui": {
    "currentPlaying": {
      "songId": 1,
      "isPlaying": true,
      "volume": 80
    }
  },
  "errors": {}
}
Clone this wiki locally