···189189190190## Architecture
191191192192-Users track movies which are stored as AT Protocol records in their personal data repository (`app.opnshelf.movie` lexicon). The backend subscribes to the AT Protocol firehose via TAP to index public records, enabling discovery and social features while users maintain ownership of their data.
192192+Users track movies which are stored as AT Protocol records in their personal data repository (`xyz.opnshelf.movie` lexicon). The backend subscribes to the AT Protocol firehose via TAP to index public records, enabling discovery and social features while users maintain ownership of their data.
193193194194### Database Schema
195195
···1414import {
1515 $nsid as LIST_COLLECTION,
1616 main as listSchema,
1717-} from "../lexicons/app/opnshelf/list";
1818-import type { Main as ListRecord } from "../lexicons/app/opnshelf/list.defs";
1717+} from "../lexicons/xyz/opnshelf/list";
1818+import type { Main as ListRecord } from "../lexicons/xyz/opnshelf/list.defs";
1919import {
2020 $nsid as LIST_ITEM_COLLECTION,
2121 main as listItemSchema,
2222-} from "../lexicons/app/opnshelf/listItem";
2323-import type { Main as ListItemRecord } from "../lexicons/app/opnshelf/listItem.defs";
2222+} from "../lexicons/xyz/opnshelf/listItem";
2323+import type { Main as ListItemRecord } from "../lexicons/xyz/opnshelf/listItem.defs";
2424import {
2525 $nsid as EPISODE_COLLECTION,
2626 main as episodeSchema,
2727-} from "../lexicons/app/opnshelf/episode";
2828-import type { Main as EpisodeRecord } from "../lexicons/app/opnshelf/episode.defs";
2727+} from "../lexicons/xyz/opnshelf/episode";
2828+import type { Main as EpisodeRecord } from "../lexicons/xyz/opnshelf/episode.defs";
2929import {
3030 $nsid as MOVIE_COLLECTION,
3131 main as movieSchema,
3232-} from "../lexicons/app/opnshelf/movie";
3333-import type { Main as MovieRecord } from "../lexicons/app/opnshelf/movie.defs";
3232+} from "../lexicons/xyz/opnshelf/movie";
3333+import type { Main as MovieRecord } from "../lexicons/xyz/opnshelf/movie.defs";
3434import { ListsService } from "../lists/lists.service";
3535import { MoviesService } from "../movies/movies.service";
3636import { PrismaService } from "../prisma/prisma.service";
-5
backend/src/lexicons/app.ts
···11-/*
22- * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT.
33- */
44-55-export * as opnshelf from './app/opnshelf.js'
···4455import { l } from '@atproto/lex'
6677-const $nsid = 'app.opnshelf.episode'
77+const $nsid = 'xyz.opnshelf.episode'
8899export { $nsid }
10101111/** A tracked show episode record for OpnShelf */
1212type Main = {
1313- $type: 'app.opnshelf.episode'
1313+ $type: 'xyz.opnshelf.episode'
14141515 /**
1616 * TMDB show ID
···4455import { l } from '@atproto/lex'
6677-const $nsid = 'app.opnshelf.list'
77+const $nsid = 'xyz.opnshelf.list'
8899export { $nsid }
10101111/** A movie list for OpnShelf */
1212type Main = {
1313- $type: 'app.opnshelf.list'
1313+ $type: 'xyz.opnshelf.list'
14141515 /**
1616 * Display name of the list
···4455import { l } from '@atproto/lex'
6677-const $nsid = 'app.opnshelf.listItem'
77+const $nsid = 'xyz.opnshelf.listItem'
8899export { $nsid }
10101111/** A media item in a list for OpnShelf */
1212type Main = {
1313- $type: 'app.opnshelf.listItem'
1313+ $type: 'xyz.opnshelf.listItem'
14141515 /**
1616 * Rkey of the parent list
···4455import { l } from '@atproto/lex'
6677-const $nsid = 'app.opnshelf.movie'
77+const $nsid = 'xyz.opnshelf.movie'
8899export { $nsid }
10101111/** A tracked movie record for OpnShelf */
1212type Main = {
1313- $type: 'app.opnshelf.movie'
1313+ $type: 'xyz.opnshelf.movie'
14141515 /**
1616 * TMDB movie ID
···44import {
55 $nsid as LIST_COLLECTION,
66 main as listSchema,
77-} from "../lexicons/app/opnshelf/list";
88-import type { Main as ListRecord } from "../lexicons/app/opnshelf/list.defs";
77+} from "../lexicons/xyz/opnshelf/list";
88+import type { Main as ListRecord } from "../lexicons/xyz/opnshelf/list.defs";
99import {
1010 $nsid as LIST_ITEM_COLLECTION,
1111 main as listItemSchema,
1212-} from "../lexicons/app/opnshelf/listItem";
1313-import type { Main as ListItemRecord } from "../lexicons/app/opnshelf/listItem.defs";
1212+} from "../lexicons/xyz/opnshelf/listItem";
1313+import type { Main as ListItemRecord } from "../lexicons/xyz/opnshelf/listItem.defs";
1414import { MoviesService } from "../movies/movies.service";
1515import { PrismaService } from "../prisma/prisma.service";
1616import { ShowsService } from "../shows/shows.service";
···55import {
66 $nsid as COLLECTION,
77 main as movieSchema,
88-} from "../lexicons/app/opnshelf/movie";
99-import type { Main as MovieRecord } from "../lexicons/app/opnshelf/movie.defs";
88+} from "../lexicons/xyz/opnshelf/movie";
99+import type { Main as MovieRecord } from "../lexicons/xyz/opnshelf/movie.defs";
1010import { PrismaService } from "../prisma/prisma.service";
1111import { ColorExtractionService } from "./color-extraction.service";
1212···346346 collection: COLLECTION,
347347 rkey,
348348 record,
349349- validate: false, // PDS may not have app.opnshelf.movie lexicon
349349+ validate: false, // PDS may not have xyz.opnshelf.movie lexicon
350350 });
351351352352 this.logger.log(
···55import {
66 $nsid as COLLECTION,
77 main as episodeSchema,
88-} from "../lexicons/app/opnshelf/episode";
99-import type { Main as EpisodeRecord } from "../lexicons/app/opnshelf/episode.defs";
88+} from "../lexicons/xyz/opnshelf/episode";
99+import type { Main as EpisodeRecord } from "../lexicons/xyz/opnshelf/episode.defs";
1010import { ColorExtractionService } from "../movies/color-extraction.service";
1111import { PrismaService } from "../prisma/prisma.service";
1212
+4-5
backend/src/users/users.service.ts
···11import { Agent } from "@atproto/api";
22import { Injectable, Logger, NotFoundException } from "@nestjs/common";
33-import { $nsid as EPISODE_COLLECTION } from "../lexicons/app/opnshelf/episode";
44-import { $nsid as LIST_COLLECTION } from "../lexicons/app/opnshelf/list";
55-import { $nsid as LIST_ITEM_COLLECTION } from "../lexicons/app/opnshelf/listItem";
33+import { $nsid as EPISODE_COLLECTION } from "../lexicons/xyz/opnshelf/episode";
44+import { $nsid as LIST_COLLECTION } from "../lexicons/xyz/opnshelf/list";
55+import { $nsid as LIST_ITEM_COLLECTION } from "../lexicons/xyz/opnshelf/listItem";
66+import { $nsid as MOVIE_COLLECTION } from "../lexicons/xyz/opnshelf/movie";
67import { PrismaService } from "../prisma/prisma.service";
78import type {
89 UpdateUserSettingsDto,
910 UserSettingsDto,
1011} from "./dto/user-settings.dto";
1111-1212-const MOVIE_COLLECTION = "app.opnshelf.movie";
13121413interface ATSession {
1514 did: string;