Update package dependencies and enhance application structure

- Added several new dependencies related to the Applesauce library, including 'applesauce-accounts', 'applesauce-common', 'applesauce-core', 'applesauce-loaders', 'applesauce-relay', and 'applesauce-signers', all at version 5.1.0.
- Updated the development script in package.json to specify a port for Vite and added new seed scripts for profiles and activity.
- Removed outdated image files from the public directory to clean up unused assets.
- Enhanced the App.vue structure by integrating shared components like AppHeader and AuthModal for improved user experience.
- Refactored ContentDetailModal and MobileNav components to support new features and improve usability.

These changes improve the overall functionality and maintainability of the application while ensuring it utilizes the latest libraries for better performance.
This commit is contained in:
Dorian
2026-02-12 12:24:58 +00:00
parent c970f5b29f
commit 725896673c
42 changed files with 3767 additions and 1329 deletions

View File

@@ -9,7 +9,7 @@ export const indeeHubFilms: Content[] = [
title: 'God Bless Bitcoin',
description: 'A groundbreaking documentary exploring the intersection of faith, finance, and the future of money through the lens of Bitcoin and its transformative impact on religious communities worldwide.',
thumbnail: '/images/films/posters/god-bless-bitcoin.webp',
backdrop: '/images/films/backdrops/god-bless-bitcoin.webp',
backdrop: '/images/films/backdrops/god-bless-bitcoin.jpg',
type: 'film',
duration: 90,
releaseYear: 2024,
@@ -41,7 +41,7 @@ export const indeeHubFilms: Content[] = [
title: 'Hard Money',
description: 'Understanding sound money principles and the importance of monetary sovereignty in the modern financial system.',
thumbnail: '/images/films/posters/2b0d7349-c010-47a0-b584-49e1bf86ab2f.png',
backdrop: '/images/films/backdrops/2b0d7349-c010-47a0-b584-49e1bf86ab2f.png',
backdrop: '/images/films/backdrops/2b0d7349-c010-47a0-b584-49e1bf86ab2f.jpg',
type: 'film',
categories: ['Documentary', 'Finance', 'Bitcoin'],
nostrEventId: ''
@@ -51,7 +51,7 @@ export const indeeHubFilms: Content[] = [
title: 'Bitcoiners',
description: 'Meet the passionate individuals building the Bitcoin ecosystem and changing the world of money.',
thumbnail: '/images/films/posters/665a4095-73b9-480d-a0a4-b2aafaf2bce4.png',
backdrop: '/images/films/backdrops/665a4095-73b9-480d-a0a4-b2aafaf2bce4.png',
backdrop: '/images/films/backdrops/665a4095-73b9-480d-a0a4-b2aafaf2bce4.jpg',
type: 'film',
categories: ['Documentary', 'Bitcoin'],
nostrEventId: ''
@@ -61,7 +61,7 @@ export const indeeHubFilms: Content[] = [
title: 'Lekker Feeling: A Bitcoin Ekasi Story',
description: 'A heartwarming documentary about Bitcoin adoption in South African townships and its impact on local communities.',
thumbnail: '/images/films/posters/3c113b66-3bb5-4cac-90eb-965ecedc4aa2.png',
backdrop: '/images/films/backdrops/3c113b66-3bb5-4cac-90eb-965ecedc4aa2.png',
backdrop: '/images/films/backdrops/3c113b66-3bb5-4cac-90eb-965ecedc4aa2.jpg',
type: 'film',
categories: ['Documentary', 'Bitcoin'],
nostrEventId: ''
@@ -81,7 +81,7 @@ export const indeeHubFilms: Content[] = [
title: 'The Housing Bubble',
description: 'An examination of the 2008 financial crisis, mortgage-backed securities, and the devastating impact on American families.',
thumbnail: '/images/films/posters/bbdb0178-0b96-4ab5-addf-ba1f029c1cb3.webp',
backdrop: '/images/films/backdrops/bbdb0178-0b96-4ab5-addf-ba1f029c1cb3.webp',
backdrop: '/images/films/backdrops/bbdb0178-0b96-4ab5-addf-ba1f029c1cb3.jpg',
type: 'film',
categories: ['Documentary', 'Finance'],
nostrEventId: ''
@@ -91,7 +91,7 @@ export const indeeHubFilms: Content[] = [
title: 'Menger. Notes on the margin',
description: 'Exploring Austrian economics, Carl Menger\'s revolutionary ideas on subjective value, and the foundations of sound economic thinking.',
thumbnail: '/images/films/posters/584f310b-2269-4b05-a09d-261a0a3c1f78.webp',
backdrop: '/images/films/backdrops/584f310b-2269-4b05-a09d-261a0a3c1f78.webp',
backdrop: '/images/films/backdrops/584f310b-2269-4b05-a09d-261a0a3c1f78.jpg',
type: 'film',
categories: ['Documentary', 'Economics'],
nostrEventId: ''
@@ -211,7 +211,7 @@ export const indeeHubFilms: Content[] = [
title: 'Time Traveling Thieves',
description: 'A mind-bending adventure through time with unexpected twists.',
thumbnail: '/images/films/posters/5bd753b7-9ff1-4966-a1c4-b3b93c62ed5d.webp',
backdrop: '/images/films/backdrops/5bd753b7-9ff1-4966-a1c4-b3b93c62ed5d.webp',
backdrop: '/images/films/backdrops/5bd753b7-9ff1-4966-a1c4-b3b93c62ed5d.jpg',
type: 'film',
categories: ['Sci-Fi', 'Adventure'],
nostrEventId: ''

View File

@@ -1,218 +0,0 @@
/**
* Mock Social Data for Development Mode
* Provides realistic comments, reactions, and profiles without Nostr relays
*/
export interface MockProfile {
name: string
picture: string
about: string
npub: string
pubkey: string
}
export interface MockComment {
id: string
pubkey: string
content: string
created_at: number
kind: 1
tags: string[][]
sig: string
}
export interface MockReaction {
id: string
pubkey: string
content: '+' | '-'
created_at: number
kind: 17
tags: string[][]
sig: string
}
// Mock Nostr profiles
export const mockProfiles: MockProfile[] = [
{
name: 'BitcoinFilmFan',
picture: 'https://api.dicebear.com/7.x/avataaars/svg?seed=BitcoinFilmFan',
about: 'Independent film lover and Bitcoin enthusiast.',
npub: 'npub1mockuser1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
pubkey: 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f60001',
},
{
name: 'CinephileMax',
picture: 'https://api.dicebear.com/7.x/avataaars/svg?seed=CinephileMax',
about: 'Watching everything, one film at a time.',
npub: 'npub1mockuser2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
pubkey: 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f60002',
},
{
name: 'DocuLover',
picture: 'https://api.dicebear.com/7.x/avataaars/svg?seed=DocuLover',
about: 'Documentaries are the highest form of cinema.',
npub: 'npub1mockuser3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
pubkey: 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f60003',
},
{
name: 'SatoshiScreens',
picture: 'https://api.dicebear.com/7.x/avataaars/svg?seed=SatoshiScreens',
about: 'Film meets freedom tech. V4V.',
npub: 'npub1mockuser4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
pubkey: 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f60004',
},
{
name: 'IndieFilmNerd',
picture: 'https://api.dicebear.com/7.x/avataaars/svg?seed=IndieFilmNerd',
about: 'Supporting independent filmmakers everywhere.',
npub: 'npub1mockuser5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
pubkey: 'a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f60005',
},
]
// Comment templates per content ID
const commentTemplates: Record<string, string[]> = {
'god-bless-bitcoin': [
'This documentary completely changed how I think about Bitcoin and faith. Must watch.',
'Incredible storytelling. The parallels between monetary sovereignty and spiritual freedom are powerful.',
'Shared this with my entire church group. Everyone was blown away.',
'Finally a Bitcoin documentary that goes beyond the price charts. Beautiful work.',
],
'thethingswecarry': [
'Such a deeply emotional film. Brought me to tears.',
'The cinematography is stunning. Every frame tells a story.',
'This is what independent cinema should be. Raw and real.',
],
'duel': [
'Edge-of-your-seat tension from start to finish. Brilliant directing.',
'The performances are incredible. You can feel the weight of every decision.',
'Rewatched this three times already. Catches something new each time.',
],
}
// Generic comments for content without specific templates
const genericComments = [
'Really enjoyed this one. Great production quality.',
'IndeeHub keeps finding amazing content. This platform is the future.',
'Watching this made my evening. Highly recommend.',
'The filmmakers clearly put their heart into this. It shows.',
'More people need to see this. Sharing with everyone I know.',
'Just finished watching. Need a moment to process how good that was.',
'This is why I subscribe. Quality content that you can not find elsewhere.',
'Beautiful film. The score and visuals work perfectly together.',
]
/**
* Generate a mock event ID (hex string)
*/
function mockEventId(seed: number): string {
return seed.toString(16).padStart(64, '0')
}
/**
* Generate a mock signature (hex string)
*/
function mockSig(seed: number): string {
return seed.toString(16).padStart(128, 'f')
}
/**
* Get mock comments for a given content ID
*/
export function getMockComments(contentId: string): MockComment[] {
const templates = commentTemplates[contentId] || genericComments
const now = Math.floor(Date.now() / 1000)
// Pick 3-5 comments
const count = 3 + Math.floor(Math.abs(hashCode(contentId)) % 3)
const comments: MockComment[] = []
for (let i = 0; i < count && i < templates.length; i++) {
const profile = mockProfiles[i % mockProfiles.length]
const hoursAgo = (i + 1) * 3 + Math.floor(Math.abs(hashCode(contentId + i)) % 12)
comments.push({
id: mockEventId(hashCode(contentId + 'comment' + i)),
pubkey: profile.pubkey,
content: templates[i % templates.length],
created_at: now - hoursAgo * 3600,
kind: 1,
tags: [['i', `https://indeedhub.com/content/${contentId}`, 'text']],
sig: mockSig(hashCode(contentId + 'sig' + i)),
})
}
return comments.sort((a, b) => b.created_at - a.created_at)
}
/**
* Get mock reactions for a given content ID
*/
export function getMockReactions(contentId: string): MockReaction[] {
const reactions: MockReaction[] = []
const now = Math.floor(Date.now() / 1000)
// Generate between 5-15 reactions
const count = 5 + Math.floor(Math.abs(hashCode(contentId)) % 11)
for (let i = 0; i < count; i++) {
const profile = mockProfiles[i % mockProfiles.length]
// ~80% positive reactions
const isPositive = (hashCode(contentId + 'react' + i) % 10) < 8
reactions.push({
id: mockEventId(hashCode(contentId + 'reaction' + i)),
pubkey: profile.pubkey + i.toString(16).padStart(4, '0'),
content: isPositive ? '+' : '-',
created_at: now - i * 1800,
kind: 17,
tags: [['i', `https://indeedhub.com/content/${contentId}`, 'text']],
sig: mockSig(hashCode(contentId + 'reactsig' + i)),
})
}
return reactions
}
/**
* Get mock reaction counts for a content ID (quick lookup without generating all events)
*/
export function getMockReactionCounts(contentId: string): { positive: number; negative: number; total: number } {
const seed = Math.abs(hashCode(contentId))
const total = 5 + (seed % 11)
const positive = Math.floor(total * 0.8)
const negative = total - positive
return { positive, negative, total: positive - negative }
}
/**
* Get mock comment count for a content ID (quick lookup)
*/
export function getMockCommentCount(contentId: string): number {
const templates = commentTemplates[contentId]
if (templates) {
return 3 + Math.floor(Math.abs(hashCode(contentId)) % Math.min(3, templates.length))
}
return 3 + Math.floor(Math.abs(hashCode(contentId)) % 3)
}
/**
* Get a mock profile by pubkey
*/
export function getMockProfile(pubkey: string): MockProfile | undefined {
return mockProfiles.find((p) => pubkey.startsWith(p.pubkey.slice(0, 20)))
|| mockProfiles[Math.abs(hashCode(pubkey)) % mockProfiles.length]
}
/**
* Simple hash function for deterministic results from strings
*/
function hashCode(str: string): number {
let hash = 0
for (let i = 0; i < str.length; i++) {
const char = str.charCodeAt(i)
hash = ((hash << 5) - hash) + char
hash |= 0 // Convert to 32bit integer
}
return hash
}

60
src/data/testPersonas.ts Normal file
View File

@@ -0,0 +1,60 @@
/** Pre-generated test personas for local development */
export const TEST_PERSONAS = [
{
name: "Alice",
nsec: "nsec1uvp6k7pxn606t76agds6z0jlqudqr4eqet7g7l072mda7skyna8s4deymn",
pubkey: "72a28cbae9d9d3ff83ede49d854353ebec62b2870497e3c9586d7a390c7d5e22",
},
{
name: "Bob",
nsec: "nsec1t6rt4jagk670zvww09pwvyr8kr2kgxxwxezgjyzwsgny08evwfwsegswn2",
pubkey: "ddd9ccd087feaa230e0b7bfe4b2d20d8b9e60226303d1401bc6d32751fa7718c",
},
{
name: "Charlie",
nsec: "nsec1qfd60z5dr4tx5758vuu4y0gla6xnkq8w3fdlcnzvx2wzqhnk832qu7qe4h",
pubkey: "a1a19b736fe43cd6c52c56f22b5bfd62a54847daa041f82f0348a47dabdd6013",
},
{
name: "Diana",
nsec: "nsec1aenwtwuqcay9x4c4fludmddg77lxah6v5dnmrdv9fm8dum3tf5gq4x7m8g",
pubkey: "fe059843e48f7946a01d6053fc0f922cd8fddb1193af5db522b09da76a95da1f",
},
{
name: "Eve",
nsec: "nsec17jumf8q8rdf6tprh95w059gxyu3f5plrg22nauq0yc2sxs6pdq9s8pe0hf",
pubkey: "bc43365a5fb6c0387ac2fa93d6c1698b8aa674aa7ed34730f119c533a71ee817",
},
] as const
export const TASTEMAKER_PERSONAS = [
{
name: "Quentin",
nsec: "nsec1d26yskme360lemexx94njjq3zh296tuxuqqmhneqxrgy4qef3mxs739xcj",
pubkey: "36a615cb10a8ebba24a5817c66a0fdf334d8f8a48757a1ac6cf551f64bb13fab",
},
{
name: "Pauline",
nsec: "nsec1j3ljvyyjucja2qfgevfn856v9xmwwynm6qvyu7qjr4z586n09l2qtxjsha",
pubkey: "3d00a259892c553d9594255f2ba9d36644146fd71a314c8967d7e1f1f402413d",
},
{
name: "Martin",
nsec: "nsec1r958f0vmdrjy0wa6fl2wvyqmyufrfrd2wfspy4tjznp9qcj7u54stfxpjt",
pubkey: "b1ac46e38c20ae704d838ee2b099f1d3cb318ba329c4598ab5f5f4461384ca90",
},
{
name: "Agnes",
nsec: "nsec1j5fp54smy6vxdt69w39y25v9qcsewz8yketxsy7tqq5h650xft0s6jmc5f",
pubkey: "b694d84f6be95807d721ccbbf264883f51a3d5dfbef08ddb841a991ab245c4fe",
},
{
name: "Akira",
nsec: "nsec1r7szu5tastx20fqpnazr0cm7ual97zj3tjf8rratpf4us3n3fvtscpvrle",
pubkey: "7e11744d5da806f5664bf07edf82739eea4fc2db1502fa8c91a73b761aeaad65",
},
] as const
export const TASTEMAKER_PUBKEYS: string[] = TASTEMAKER_PERSONAS.map(
(p) => p.pubkey,
)