Barazo default frontend
barazo.forum
1/**
2 * Mock data for testing. Realistic AT Protocol forum data
3 * matching barazo-api response schemas.
4 */
5
6import type {
7 AuthSession,
8 AuthUser,
9 AuthorProfile,
10 CategoryTreeNode,
11 CategoryWithTopicCount,
12 CommunityProfile,
13 Topic,
14 Reply,
15 Notification,
16 SearchResult,
17 ModerationReport,
18 FirstPostQueueItem,
19 ModerationLogEntry,
20 ModerationThresholds,
21 ReportedUser,
22 AdminUser,
23 CommunitySettings,
24 CommunityStats,
25 Plugin,
26 PublicSettings,
27 UserPreferences,
28 UserProfile,
29 OnboardingField,
30 MyReport,
31 PageTreeNode,
32 SybilCluster,
33 SybilClusterDetail,
34 TrustSeed,
35 PdsTrustFactor,
36 TrustGraphStatus,
37 BehavioralFlag,
38} from '@/lib/api/types'
39
40const COMMUNITY_DID = 'did:plc:test-community-123'
41const NOW = '2026-02-14T12:00:00.000Z'
42const YESTERDAY = '2026-02-13T12:00:00.000Z'
43const TWO_DAYS_AGO = '2026-02-12T12:00:00.000Z'
44const LAST_WEEK = '2026-02-07T12:00:00.000Z'
45
46// --- Users ---
47
48export const mockUsers = [
49 { did: 'did:plc:user-jay-001', handle: 'jay.bsky.team' },
50 { did: 'did:plc:user-alex-002', handle: 'alex.bsky.team' },
51 { did: 'did:plc:user-sam-003', handle: 'sam.example.com' },
52 { did: 'did:plc:user-robin-004', handle: 'robin.bsky.team' },
53 { did: 'did:plc:user-morgan-005', handle: 'morgan.forum.example' },
54] as const
55
56// --- Author Profiles (for enriched Topic/Reply responses) ---
57
58export const mockAuthorProfiles: AuthorProfile[] = [
59 {
60 did: mockUsers[0]!.did,
61 handle: mockUsers[0]!.handle,
62 displayName: 'Jay',
63 avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg',
64 },
65 { did: mockUsers[1]!.did, handle: mockUsers[1]!.handle, displayName: 'Alex', avatarUrl: null },
66 { did: mockUsers[2]!.did, handle: mockUsers[2]!.handle, displayName: 'Sam', avatarUrl: null },
67 { did: mockUsers[3]!.did, handle: mockUsers[3]!.handle, displayName: 'Robin', avatarUrl: null },
68 { did: mockUsers[4]!.did, handle: mockUsers[4]!.handle, displayName: 'Morgan', avatarUrl: null },
69]
70
71// --- Auth ---
72
73export const mockAuthSession: AuthSession = {
74 accessToken: 'mock-access-token-xyz',
75 expiresAt: '2026-02-15T13:00:00.000Z',
76 did: 'did:plc:user-jay-001',
77 handle: 'jay.bsky.team',
78 displayName: 'Jay',
79 avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg',
80 role: 'user',
81}
82
83export const mockAuthUser: AuthUser = {
84 did: 'did:plc:user-jay-001',
85 handle: 'jay.bsky.team',
86 displayName: 'Jay',
87 avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg',
88 role: 'user',
89}
90
91// --- Categories ---
92
93export const mockCategories: CategoryTreeNode[] = [
94 {
95 id: 'cat-general',
96 slug: 'general',
97 name: 'General Discussion',
98 description: 'Talk about anything related to the community',
99 parentId: null,
100 sortOrder: 0,
101 communityDid: COMMUNITY_DID,
102 maturityRating: 'safe',
103 createdAt: TWO_DAYS_AGO,
104 updatedAt: TWO_DAYS_AGO,
105 children: [],
106 },
107 {
108 id: 'cat-dev',
109 slug: 'development',
110 name: 'Development',
111 description: 'Technical discussions, code, and project updates',
112 parentId: null,
113 sortOrder: 1,
114 communityDid: COMMUNITY_DID,
115 maturityRating: 'safe',
116 createdAt: TWO_DAYS_AGO,
117 updatedAt: TWO_DAYS_AGO,
118 children: [
119 {
120 id: 'cat-frontend',
121 slug: 'frontend',
122 name: 'Frontend',
123 description: 'UI, UX, and frontend frameworks',
124 parentId: 'cat-dev',
125 sortOrder: 0,
126 communityDid: COMMUNITY_DID,
127 maturityRating: 'safe',
128 createdAt: TWO_DAYS_AGO,
129 updatedAt: TWO_DAYS_AGO,
130 children: [],
131 },
132 {
133 id: 'cat-backend',
134 slug: 'backend',
135 name: 'Backend',
136 description: 'APIs, databases, and server infrastructure',
137 parentId: 'cat-dev',
138 sortOrder: 1,
139 communityDid: COMMUNITY_DID,
140 maturityRating: 'safe',
141 createdAt: TWO_DAYS_AGO,
142 updatedAt: TWO_DAYS_AGO,
143 children: [],
144 },
145 ],
146 },
147 {
148 id: 'cat-feedback',
149 slug: 'feedback',
150 name: 'Feedback & Ideas',
151 description: 'Suggestions and feature requests',
152 parentId: null,
153 sortOrder: 2,
154 communityDid: COMMUNITY_DID,
155 maturityRating: 'safe',
156 createdAt: TWO_DAYS_AGO,
157 updatedAt: TWO_DAYS_AGO,
158 children: [
159 {
160 id: 'cat-fb-features',
161 slug: 'feature-requests',
162 name: 'Feature Requests',
163 description: 'Suggest new features and improvements',
164 parentId: 'cat-feedback',
165 sortOrder: 0,
166 communityDid: COMMUNITY_DID,
167 maturityRating: 'safe',
168 createdAt: TWO_DAYS_AGO,
169 updatedAt: TWO_DAYS_AGO,
170 children: [],
171 },
172 {
173 id: 'cat-fb-bugs',
174 slug: 'bug-reports',
175 name: 'Bug Reports',
176 description: 'Report bugs and unexpected behavior',
177 parentId: 'cat-feedback',
178 sortOrder: 1,
179 communityDid: COMMUNITY_DID,
180 maturityRating: 'safe',
181 createdAt: TWO_DAYS_AGO,
182 updatedAt: TWO_DAYS_AGO,
183 children: [],
184 },
185 ],
186 },
187 {
188 id: 'cat-atproto',
189 slug: 'atproto',
190 name: 'AT Protocol',
191 description: 'AT Protocol ecosystem, standards, and tooling',
192 parentId: null,
193 sortOrder: 3,
194 communityDid: COMMUNITY_DID,
195 maturityRating: 'safe',
196 createdAt: TWO_DAYS_AGO,
197 updatedAt: TWO_DAYS_AGO,
198 children: [
199 {
200 id: 'cat-atp-lexicons',
201 slug: 'lexicons',
202 name: 'Lexicons',
203 description: 'Schema definitions and data model discussions',
204 parentId: 'cat-atproto',
205 sortOrder: 0,
206 communityDid: COMMUNITY_DID,
207 maturityRating: 'safe',
208 createdAt: TWO_DAYS_AGO,
209 updatedAt: TWO_DAYS_AGO,
210 children: [],
211 },
212 {
213 id: 'cat-atp-identity',
214 slug: 'identity',
215 name: 'Identity',
216 description: 'DIDs, handles, and portable identity',
217 parentId: 'cat-atproto',
218 sortOrder: 1,
219 communityDid: COMMUNITY_DID,
220 maturityRating: 'safe',
221 createdAt: TWO_DAYS_AGO,
222 updatedAt: TWO_DAYS_AGO,
223 children: [],
224 },
225 ],
226 },
227 {
228 id: 'cat-meta',
229 slug: 'meta',
230 name: 'Meta',
231 description: 'About this community',
232 parentId: null,
233 sortOrder: 4,
234 communityDid: COMMUNITY_DID,
235 maturityRating: 'safe',
236 createdAt: TWO_DAYS_AGO,
237 updatedAt: TWO_DAYS_AGO,
238 children: [],
239 },
240]
241
242export const mockCategoryWithTopicCount: CategoryWithTopicCount = {
243 ...mockCategories[0]!,
244 topicCount: 12,
245}
246
247// --- Topics ---
248
249export const mockTopics: Topic[] = [
250 {
251 uri: `at://${mockUsers[0]!.did}/forum.barazo.topic.post/3kf1abc`,
252 rkey: '3kf1abc',
253 authorDid: mockUsers[0]!.did,
254 author: mockAuthorProfiles[0]!,
255 title: 'Welcome to Barazo Forums',
256 content: 'This is the first topic on our new federated forum platform.',
257 category: 'general',
258 site: null,
259 tags: ['welcome', 'introduction'],
260 communityDid: COMMUNITY_DID,
261 cid: 'bafyreib1',
262 replyCount: 5,
263 reactionCount: 12,
264 isAuthorDeleted: false,
265 isModDeleted: false,
266 isPinned: false,
267 isLocked: false,
268 pinnedScope: null,
269 pinnedAt: null,
270 categoryMaturityRating: 'safe',
271 lastActivityAt: NOW,
272 publishedAt: TWO_DAYS_AGO,
273 indexedAt: TWO_DAYS_AGO,
274 },
275 {
276 uri: `at://${mockUsers[1]!.did}/forum.barazo.topic.post/3kf2def`,
277 rkey: '3kf2def',
278 authorDid: mockUsers[1]!.did,
279 author: mockAuthorProfiles[1]!,
280 title: 'Building with the AT Protocol',
281 content: 'A deep dive into building applications on the AT Protocol.',
282 category: 'development',
283 site: null,
284 tags: ['atproto', 'tutorial'],
285 communityDid: COMMUNITY_DID,
286 cid: 'bafyreib2',
287 replyCount: 8,
288 reactionCount: 23,
289 isAuthorDeleted: false,
290 isModDeleted: false,
291 isPinned: false,
292 isLocked: false,
293 pinnedScope: null,
294 pinnedAt: null,
295 categoryMaturityRating: 'safe',
296 lastActivityAt: YESTERDAY,
297 publishedAt: TWO_DAYS_AGO,
298 indexedAt: TWO_DAYS_AGO,
299 },
300 {
301 uri: `at://${mockUsers[2]!.did}/forum.barazo.topic.post/3kf3ghi`,
302 rkey: '3kf3ghi',
303 authorDid: mockUsers[2]!.did,
304 author: mockAuthorProfiles[2]!,
305 title: 'Feature Request: Dark Mode Improvements',
306 content: 'I would love to see more theme customization options.',
307 category: 'feedback',
308 site: null,
309 tags: ['feature-request', 'ui'],
310 communityDid: COMMUNITY_DID,
311 cid: 'bafyreib3',
312 replyCount: 3,
313 reactionCount: 7,
314 isAuthorDeleted: false,
315 isModDeleted: false,
316 isPinned: false,
317 isLocked: false,
318 pinnedScope: null,
319 pinnedAt: null,
320 categoryMaturityRating: 'safe',
321 lastActivityAt: YESTERDAY,
322 publishedAt: YESTERDAY,
323 indexedAt: YESTERDAY,
324 },
325 {
326 uri: `at://${mockUsers[3]!.did}/forum.barazo.topic.post/3kf4jkl`,
327 rkey: '3kf4jkl',
328 authorDid: mockUsers[3]!.did,
329 author: mockAuthorProfiles[3]!,
330 title: 'Understanding Portable Identity',
331 content: 'How does identity work across federated services?',
332 category: 'general',
333 site: null,
334 tags: ['identity', 'federation'],
335 communityDid: COMMUNITY_DID,
336 cid: 'bafyreib4',
337 replyCount: 15,
338 reactionCount: 31,
339 isAuthorDeleted: false,
340 isModDeleted: false,
341 isPinned: false,
342 isLocked: false,
343 pinnedScope: null,
344 pinnedAt: null,
345 categoryMaturityRating: 'safe',
346 lastActivityAt: NOW,
347 publishedAt: YESTERDAY,
348 indexedAt: YESTERDAY,
349 },
350 {
351 uri: `at://${mockUsers[4]!.did}/forum.barazo.topic.post/3kf5mno`,
352 rkey: '3kf5mno',
353 authorDid: mockUsers[4]!.did,
354 author: mockAuthorProfiles[4]!,
355 title: 'Self-Hosting Guide',
356 content: 'Step-by-step guide to running your own Barazo instance.',
357 category: 'meta',
358 site: null,
359 tags: ['self-hosting', 'guide'],
360 communityDid: COMMUNITY_DID,
361 cid: 'bafyreib5',
362 replyCount: 2,
363 reactionCount: 9,
364 isAuthorDeleted: false,
365 isModDeleted: false,
366 isPinned: false,
367 isLocked: false,
368 pinnedScope: null,
369 pinnedAt: null,
370 categoryMaturityRating: 'safe',
371 lastActivityAt: NOW,
372 publishedAt: NOW,
373 indexedAt: NOW,
374 },
375]
376
377// --- Tombstone Topics (deleted) ---
378
379export const mockAuthorDeletedTopic: Topic = {
380 uri: `at://${mockUsers[2]!.did}/forum.barazo.topic.post/3kf6del`,
381 rkey: '3kf6del',
382 authorDid: mockUsers[2]!.did,
383 title: '[Deleted by author]',
384 content: '',
385 category: 'general',
386 site: null,
387 tags: null,
388 communityDid: COMMUNITY_DID,
389 cid: 'bafyreib6',
390 replyCount: 0,
391 reactionCount: 0,
392 isAuthorDeleted: true,
393 isModDeleted: false,
394 isPinned: false,
395 isLocked: false,
396 pinnedScope: null,
397 pinnedAt: null,
398 categoryMaturityRating: 'safe',
399 lastActivityAt: YESTERDAY,
400 publishedAt: YESTERDAY,
401 indexedAt: YESTERDAY,
402}
403
404export const mockModDeletedTopic: Topic = {
405 uri: `at://${mockUsers[3]!.did}/forum.barazo.topic.post/3kf7del`,
406 rkey: '3kf7del',
407 authorDid: mockUsers[3]!.did,
408 title: '[Removed by moderator]',
409 content: '',
410 category: 'general',
411 site: null,
412 tags: null,
413 communityDid: COMMUNITY_DID,
414 cid: 'bafyreib7',
415 replyCount: 0,
416 reactionCount: 0,
417 isAuthorDeleted: false,
418 isModDeleted: true,
419 isPinned: false,
420 isLocked: false,
421 pinnedScope: null,
422 pinnedAt: null,
423 categoryMaturityRating: 'safe',
424 lastActivityAt: NOW,
425 publishedAt: NOW,
426 indexedAt: NOW,
427}
428
429// --- Replies ---
430
431const TOPIC_URI = mockTopics[0]!.uri
432const TOPIC_CID = mockTopics[0]!.cid
433
434// --- Search Results ---
435
436export const mockSearchResults: SearchResult[] = [
437 {
438 type: 'topic',
439 uri: mockTopics[0]!.uri,
440 rkey: mockTopics[0]!.rkey,
441 authorDid: mockTopics[0]!.authorDid,
442 authorHandle: mockUsers[0]!.handle,
443 title: 'Welcome to Barazo Forums',
444 content: 'This is the first topic on our new federated forum platform.',
445 category: 'general',
446 communityDid: COMMUNITY_DID,
447 replyCount: 5,
448 reactionCount: 12,
449 publishedAt: TWO_DAYS_AGO,
450 rank: 0.95,
451 rootUri: null,
452 rootTitle: null,
453 },
454 {
455 type: 'topic',
456 uri: mockTopics[1]!.uri,
457 rkey: mockTopics[1]!.rkey,
458 authorDid: mockTopics[1]!.authorDid,
459 authorHandle: mockUsers[1]!.handle,
460 title: 'Building with the AT Protocol',
461 content: 'A deep dive into building applications on the AT Protocol.',
462 category: 'development',
463 communityDid: COMMUNITY_DID,
464 replyCount: 8,
465 reactionCount: 23,
466 publishedAt: TWO_DAYS_AGO,
467 rank: 0.82,
468 rootUri: null,
469 rootTitle: null,
470 },
471 {
472 type: 'reply',
473 uri: `at://${mockUsers[1]!.did}/forum.barazo.reply.post/3kf6aaa`,
474 rkey: '3kf6aaa',
475 authorDid: mockUsers[1]!.did,
476 authorHandle: mockUsers[1]!.handle,
477 title: null,
478 content: 'Welcome! Excited to see this forum take shape.',
479 category: null,
480 communityDid: COMMUNITY_DID,
481 replyCount: null,
482 reactionCount: 4,
483 publishedAt: TWO_DAYS_AGO,
484 rank: 0.71,
485 rootUri: mockTopics[0]!.uri,
486 rootTitle: 'Welcome to Barazo Forums',
487 },
488]
489
490// --- Notifications ---
491
492export const mockNotifications: Notification[] = [
493 {
494 id: 'notif-1',
495 type: 'reply',
496 userDid: mockUsers[0]!.did,
497 actorDid: mockUsers[1]!.did,
498 actorHandle: mockUsers[1]!.handle,
499 subjectUri: mockTopics[0]!.uri,
500 subjectTitle: 'Welcome to Barazo Forums',
501 subjectAuthorDid: mockUsers[0]!.did,
502 subjectAuthorHandle: mockUsers[0]!.handle,
503 message: 'alex.bsky.team replied to your topic',
504 read: false,
505 createdAt: NOW,
506 },
507 {
508 id: 'notif-2',
509 type: 'reaction',
510 userDid: mockUsers[0]!.did,
511 actorDid: mockUsers[2]!.did,
512 actorHandle: mockUsers[2]!.handle,
513 subjectUri: mockTopics[0]!.uri,
514 subjectTitle: 'Welcome to Barazo Forums',
515 subjectAuthorDid: mockUsers[0]!.did,
516 subjectAuthorHandle: mockUsers[0]!.handle,
517 message: 'sam.example.com reacted to your topic',
518 read: false,
519 createdAt: YESTERDAY,
520 },
521 {
522 id: 'notif-3',
523 type: 'mention',
524 userDid: mockUsers[0]!.did,
525 actorDid: mockUsers[3]!.did,
526 actorHandle: mockUsers[3]!.handle,
527 subjectUri: `at://${mockUsers[3]!.did}/forum.barazo.reply.post/3kf6ddd`,
528 subjectTitle: null,
529 subjectAuthorDid: mockUsers[3]!.did,
530 subjectAuthorHandle: mockUsers[3]!.handle,
531 message: 'robin.bsky.team mentioned you in a reply',
532 read: true,
533 createdAt: YESTERDAY,
534 },
535 {
536 id: 'notif-4',
537 type: 'moderation',
538 userDid: mockUsers[0]!.did,
539 actorDid: mockUsers[4]!.did,
540 actorHandle: mockUsers[4]!.handle,
541 subjectUri: mockTopics[0]!.uri,
542 subjectTitle: 'Welcome to Barazo Forums',
543 subjectAuthorDid: mockUsers[0]!.did,
544 subjectAuthorHandle: mockUsers[0]!.handle,
545 message: 'Your topic was pinned by a moderator',
546 read: true,
547 createdAt: TWO_DAYS_AGO,
548 },
549]
550
551// --- Replies ---
552
553export const mockReplies: Reply[] = [
554 {
555 uri: `at://${mockUsers[1]!.did}/forum.barazo.reply.post/3kf6aaa`,
556 rkey: '3kf6aaa',
557 authorDid: mockUsers[1]!.did,
558 author: mockAuthorProfiles[1]!,
559 content: 'Welcome! Excited to see this forum take shape.',
560 rootUri: TOPIC_URI,
561 rootCid: TOPIC_CID,
562 parentUri: TOPIC_URI,
563 parentCid: TOPIC_CID,
564 communityDid: COMMUNITY_DID,
565 cid: 'bafyreir1',
566 depth: 1,
567 reactionCount: 4,
568 isAuthorDeleted: false,
569 isModDeleted: false,
570 createdAt: TWO_DAYS_AGO,
571 indexedAt: TWO_DAYS_AGO,
572 },
573 {
574 uri: `at://${mockUsers[2]!.did}/forum.barazo.reply.post/3kf6bbb`,
575 rkey: '3kf6bbb',
576 authorDid: mockUsers[2]!.did,
577 author: mockAuthorProfiles[2]!,
578 content:
579 'Thanks for starting this community! The AT Protocol integration is really interesting.',
580 rootUri: TOPIC_URI,
581 rootCid: TOPIC_CID,
582 parentUri: `at://${mockUsers[1]!.did}/forum.barazo.reply.post/3kf6aaa`,
583 parentCid: 'bafyreir1',
584 communityDid: COMMUNITY_DID,
585 cid: 'bafyreir2',
586 depth: 2,
587 reactionCount: 2,
588 isAuthorDeleted: false,
589 isModDeleted: false,
590 createdAt: YESTERDAY,
591 indexedAt: YESTERDAY,
592 },
593 {
594 uri: `at://${mockUsers[0]!.did}/forum.barazo.reply.post/3kf6ccc`,
595 rkey: '3kf6ccc',
596 authorDid: mockUsers[0]!.did,
597 author: mockAuthorProfiles[0]!,
598 content: 'Agreed! Portable identity changes everything.',
599 rootUri: TOPIC_URI,
600 rootCid: TOPIC_CID,
601 parentUri: `at://${mockUsers[2]!.did}/forum.barazo.reply.post/3kf6bbb`,
602 parentCid: 'bafyreir2',
603 communityDid: COMMUNITY_DID,
604 cid: 'bafyreir3',
605 depth: 3,
606 reactionCount: 1,
607 isAuthorDeleted: false,
608 isModDeleted: false,
609 createdAt: YESTERDAY,
610 indexedAt: YESTERDAY,
611 },
612 {
613 uri: `at://${mockUsers[3]!.did}/forum.barazo.reply.post/3kf6ddd`,
614 rkey: '3kf6ddd',
615 authorDid: mockUsers[3]!.did,
616 author: mockAuthorProfiles[3]!,
617 content: 'One question: how does content moderation work across federated instances?',
618 rootUri: TOPIC_URI,
619 rootCid: TOPIC_CID,
620 parentUri: TOPIC_URI,
621 parentCid: TOPIC_CID,
622 communityDid: COMMUNITY_DID,
623 cid: 'bafyreir4',
624 depth: 1,
625 reactionCount: 6,
626 isAuthorDeleted: false,
627 isModDeleted: false,
628 createdAt: NOW,
629 indexedAt: NOW,
630 },
631 {
632 uri: `at://${mockUsers[4]!.did}/forum.barazo.reply.post/3kf6eee`,
633 rkey: '3kf6eee',
634 authorDid: mockUsers[4]!.did,
635 author: mockAuthorProfiles[4]!,
636 content:
637 'Great question! Each community has its own moderation policies, but the AT Protocol labeling system allows cross-community signals.',
638 rootUri: TOPIC_URI,
639 rootCid: TOPIC_CID,
640 parentUri: `at://${mockUsers[3]!.did}/forum.barazo.reply.post/3kf6ddd`,
641 parentCid: 'bafyreir4',
642 communityDid: COMMUNITY_DID,
643 cid: 'bafyreir5',
644 depth: 2,
645 reactionCount: 8,
646 isAuthorDeleted: false,
647 isModDeleted: false,
648 createdAt: NOW,
649 indexedAt: NOW,
650 },
651]
652
653// --- Tombstone Replies (deleted) ---
654
655export const mockAuthorDeletedReply: Reply = {
656 uri: `at://${mockUsers[2]!.did}/forum.barazo.reply.post/3kf6fff`,
657 rkey: '3kf6fff',
658 authorDid: mockUsers[2]!.did,
659 content: '',
660 rootUri: TOPIC_URI,
661 rootCid: TOPIC_CID,
662 parentUri: TOPIC_URI,
663 parentCid: TOPIC_CID,
664 communityDid: COMMUNITY_DID,
665 cid: 'bafyreir6',
666 depth: 1,
667 reactionCount: 0,
668 isAuthorDeleted: true,
669 isModDeleted: false,
670 createdAt: YESTERDAY,
671 indexedAt: YESTERDAY,
672}
673
674export const mockModDeletedReply: Reply = {
675 uri: `at://${mockUsers[3]!.did}/forum.barazo.reply.post/3kf6ggg`,
676 rkey: '3kf6ggg',
677 authorDid: mockUsers[3]!.did,
678 content: '[Removed by moderator]',
679 rootUri: TOPIC_URI,
680 rootCid: TOPIC_CID,
681 parentUri: TOPIC_URI,
682 parentCid: TOPIC_CID,
683 communityDid: COMMUNITY_DID,
684 cid: 'bafyreir7',
685 depth: 1,
686 reactionCount: 0,
687 isAuthorDeleted: false,
688 isModDeleted: true,
689 createdAt: NOW,
690 indexedAt: NOW,
691}
692
693// --- Deep Thread Replies (15 levels deep, for testing nested threading on mobile) ---
694
695const DEEP_TOPIC_URI = `at://${mockUsers[0]!.did}/forum.barazo.topic.post/3kf1abc`
696const DEEP_TOPIC_CID = 'bafyreit1'
697
698const deepThreadContent: string[] = [
699 'Has anyone tried running Barazo on a Raspberry Pi?',
700 'I actually have it running on a Pi 4 with 8GB RAM. Works surprisingly well.',
701 'What about the database? PostgreSQL on a Pi seems heavy.',
702 'SQLite would be lighter but you lose concurrent writes. PostgreSQL is fine with proper tuning.',
703 'What pg settings did you change? I keep running out of shared memory.',
704 'Set shared_buffers to 256MB and work_mem to 16MB. Also reduce max_connections to 20.',
705 'That helped a lot, thanks! But now the firehose consumer is lagging behind.',
706 'The firehose needs dedicated resources. Consider running it as a separate service.',
707 'Separate service means another container though. The Pi is already running 4.',
708 'You could use a lightweight process manager instead of Docker for some services.',
709 'PM2 or systemd? I tried PM2 but it added 100MB of memory overhead.',
710 'systemd is the way to go. Zero overhead and it handles restarts natively.',
711 'Good call. One more question -- how do you handle SSL termination?',
712 'Caddy is perfect for this. Auto-HTTPS with minimal config and low resource usage.',
713 'This whole thread is gold. Someone should turn this into a self-hosting guide.',
714]
715
716/**
717 * A deeply nested reply thread (15 levels) for testing deep threading behavior,
718 * especially on mobile viewports where indentation becomes a concern.
719 * Each reply is a child of the previous one, forming a single chain.
720 * Uses the same topic as mockReplies (mockTopics[0]).
721 */
722export const mockDeepReplies: Reply[] = deepThreadContent.map((content, i) => {
723 const depth = i + 1
724 const userIndex = i % mockUsers.length
725 const rkey = `3kf7${String(i + 1).padStart(3, '0')}`
726 const prevRkey = i > 0 ? `3kf7${String(i).padStart(3, '0')}` : null
727 const prevUserIndex = i > 0 ? (i - 1) % mockUsers.length : null
728
729 const parentUri =
730 i === 0
731 ? DEEP_TOPIC_URI
732 : `at://${mockUsers[prevUserIndex!]!.did}/forum.barazo.reply.post/${prevRkey}`
733 const parentCid = i === 0 ? DEEP_TOPIC_CID : `bafydeep${i}`
734
735 return {
736 uri: `at://${mockUsers[userIndex]!.did}/forum.barazo.reply.post/${rkey}`,
737 rkey,
738 authorDid: mockUsers[userIndex]!.did,
739 author: mockAuthorProfiles[userIndex]!,
740 content,
741 rootUri: DEEP_TOPIC_URI,
742 rootCid: DEEP_TOPIC_CID,
743 parentUri,
744 parentCid,
745 communityDid: COMMUNITY_DID,
746 cid: `bafydeep${depth}`,
747 depth,
748 reactionCount: Math.max(0, 15 - depth),
749 isAuthorDeleted: false,
750 isModDeleted: false,
751 createdAt: new Date(Date.parse(TWO_DAYS_AGO) + i * 3600000).toISOString(),
752 indexedAt: new Date(Date.parse(TWO_DAYS_AGO) + i * 3600000).toISOString(),
753 }
754})
755
756// --- Community Settings ---
757
758export const mockCommunitySettings: CommunitySettings = {
759 id: 'community-1',
760 initialized: true,
761 communityDid: COMMUNITY_DID,
762 adminDid: mockUsers[0]!.did,
763 communityName: 'Barazo Test Community',
764 maturityRating: 'safe',
765 reactionSet: ['like', 'love', 'laugh', 'surprise', 'sad'],
766 communityDescription: 'A test community for development',
767 communityLogoUrl: null,
768 faviconUrl: null,
769 headerLogoUrl: null,
770 showCommunityName: true,
771 primaryColor: '#31748f',
772 accentColor: '#c4a7e7',
773 jurisdictionCountry: null,
774 ageThreshold: 16,
775 maxReplyDepth: 9999,
776 requireLoginForMature: true,
777 createdAt: TWO_DAYS_AGO,
778 updatedAt: NOW,
779}
780
781// --- Community Stats ---
782
783export const mockCommunityStats: CommunityStats = {
784 topicCount: 42,
785 replyCount: 187,
786 userCount: 156,
787 categoryCount: 6,
788 reportCount: 3,
789 recentTopics: 8,
790 recentReplies: 23,
791 recentUsers: 5,
792}
793
794// --- Moderation Reports ---
795
796export const mockReports: ModerationReport[] = [
797 {
798 id: 'report-1',
799 reporterDid: mockUsers[2]!.did,
800 reporterHandle: mockUsers[2]!.handle,
801 targetUri: mockTopics[2]!.uri,
802 targetAuthorDid: mockUsers[3]!.did,
803 targetAuthorHandle: mockUsers[3]!.handle,
804 targetContent: 'This content contains misleading information about the protocol.',
805 targetTitle: 'Feature Request: Dark Mode Improvements',
806 reasonType: 'misleading',
807 reason: 'This post contains inaccurate technical claims',
808 potentiallyIllegal: false,
809 status: 'pending',
810 resolution: null,
811 resolvedAt: null,
812 resolvedByDid: null,
813 communityDid: COMMUNITY_DID,
814 createdAt: NOW,
815 },
816 {
817 id: 'report-2',
818 reporterDid: mockUsers[4]!.did,
819 reporterHandle: mockUsers[4]!.handle,
820 targetUri: `at://${mockUsers[1]!.did}/forum.barazo.reply.post/3kf6spam`,
821 targetAuthorDid: mockUsers[1]!.did,
822 targetAuthorHandle: mockUsers[1]!.handle,
823 targetContent: 'Buy cheap products at example.com! Best deals ever!',
824 targetTitle: null,
825 reasonType: 'spam',
826 reason: 'Obvious spam with commercial links',
827 potentiallyIllegal: false,
828 status: 'pending',
829 resolution: null,
830 resolvedAt: null,
831 resolvedByDid: null,
832 communityDid: COMMUNITY_DID,
833 createdAt: YESTERDAY,
834 },
835 {
836 id: 'report-3',
837 reporterDid: mockUsers[0]!.did,
838 reporterHandle: mockUsers[0]!.handle,
839 targetUri: `at://${mockUsers[3]!.did}/forum.barazo.reply.post/3kf6ill`,
840 targetAuthorDid: mockUsers[3]!.did,
841 targetAuthorHandle: mockUsers[3]!.handle,
842 targetContent: 'Content that may violate local laws regarding hate speech.',
843 targetTitle: null,
844 reasonType: 'harassment',
845 reason: 'Potentially illegal hate speech content',
846 potentiallyIllegal: true,
847 status: 'pending',
848 resolution: null,
849 resolvedAt: null,
850 resolvedByDid: null,
851 communityDid: COMMUNITY_DID,
852 createdAt: NOW,
853 },
854]
855
856// --- First Post Queue ---
857
858export const mockFirstPostQueue: FirstPostQueueItem[] = [
859 {
860 id: 'fpq-1',
861 authorDid: 'did:plc:new-user-001',
862 authorHandle: 'newbie.bsky.social',
863 contentUri: 'at://did:plc:new-user-001/forum.barazo.reply.post/3kf7aaa',
864 contentType: 'reply',
865 title: null,
866 content: 'Hello everyone! I am new here and excited to join this community.',
867 accountAge: '2 days',
868 crossCommunityCount: 0,
869 bannedFromOtherCommunities: 1,
870 status: 'pending',
871 communityDid: COMMUNITY_DID,
872 createdAt: NOW,
873 },
874 {
875 id: 'fpq-2',
876 authorDid: 'did:plc:new-user-002',
877 authorHandle: 'newcomer.example.com',
878 contentUri: 'at://did:plc:new-user-002/forum.barazo.topic.post/3kf7bbb',
879 contentType: 'topic',
880 title: 'Introduction: Newcomer here!',
881 content: 'Hi, I found this forum through Bluesky and wanted to introduce myself.',
882 accountAge: '5 days',
883 crossCommunityCount: 3,
884 bannedFromOtherCommunities: 0,
885 status: 'pending',
886 communityDid: COMMUNITY_DID,
887 createdAt: YESTERDAY,
888 },
889]
890
891// --- Moderation Log ---
892
893export const mockModerationLog: ModerationLogEntry[] = [
894 {
895 id: 'log-1',
896 actionType: 'pin',
897 moderatorDid: mockUsers[0]!.did,
898 moderatorHandle: mockUsers[0]!.handle,
899 targetUri: mockTopics[0]!.uri,
900 targetDid: null,
901 targetHandle: null,
902 reason: 'Welcome topic should be visible',
903 communityDid: COMMUNITY_DID,
904 createdAt: NOW,
905 },
906 {
907 id: 'log-2',
908 actionType: 'warn',
909 moderatorDid: mockUsers[0]!.did,
910 moderatorHandle: mockUsers[0]!.handle,
911 targetUri: null,
912 targetDid: mockUsers[3]!.did,
913 targetHandle: mockUsers[3]!.handle,
914 reason: 'Repeated off-topic posting',
915 communityDid: COMMUNITY_DID,
916 createdAt: YESTERDAY,
917 },
918 {
919 id: 'log-3',
920 actionType: 'delete',
921 moderatorDid: mockUsers[4]!.did,
922 moderatorHandle: mockUsers[4]!.handle,
923 targetUri: `at://${mockUsers[1]!.did}/forum.barazo.reply.post/3kf6spam`,
924 targetDid: mockUsers[1]!.did,
925 targetHandle: mockUsers[1]!.handle,
926 reason: 'Spam content',
927 communityDid: COMMUNITY_DID,
928 createdAt: TWO_DAYS_AGO,
929 },
930]
931
932// --- Moderation Thresholds ---
933
934export const mockModerationThresholds: ModerationThresholds = {
935 autoBlockReportCount: 5,
936 warnThreshold: 3,
937 firstPostQueueCount: 3,
938 newAccountRateLimit: 3,
939 linkPostingHold: true,
940 topicCreationDelay: true,
941 burstDetectionPostCount: 5,
942 burstDetectionMinutes: 10,
943}
944
945// --- Reported Users ---
946
947export const mockReportedUsers: ReportedUser[] = [
948 {
949 did: mockUsers[3]!.did,
950 handle: mockUsers[3]!.handle,
951 reportCount: 4,
952 latestReportAt: NOW,
953 bannedFromOtherCommunities: 2,
954 },
955 {
956 did: mockUsers[1]!.did,
957 handle: mockUsers[1]!.handle,
958 reportCount: 2,
959 latestReportAt: YESTERDAY,
960 bannedFromOtherCommunities: 0,
961 },
962]
963
964// --- Admin Users ---
965
966export const mockAdminUsers: AdminUser[] = [
967 {
968 did: mockUsers[0]!.did,
969 handle: mockUsers[0]!.handle,
970 displayName: 'Jay Admin',
971 avatarUrl: null,
972 role: 'admin',
973 isBanned: false,
974 bannedAt: null,
975 banReason: null,
976 bannedFromOtherCommunities: 0,
977 topicCount: 15,
978 replyCount: 42,
979 reportCount: 0,
980 firstSeenAt: TWO_DAYS_AGO,
981 lastActiveAt: NOW,
982 },
983 {
984 did: mockUsers[1]!.did,
985 handle: mockUsers[1]!.handle,
986 displayName: 'Alex Moderator',
987 avatarUrl: null,
988 role: 'moderator',
989 isBanned: false,
990 bannedAt: null,
991 banReason: null,
992 bannedFromOtherCommunities: 0,
993 topicCount: 8,
994 replyCount: 31,
995 reportCount: 2,
996 firstSeenAt: TWO_DAYS_AGO,
997 lastActiveAt: YESTERDAY,
998 },
999 {
1000 did: mockUsers[2]!.did,
1001 handle: mockUsers[2]!.handle,
1002 displayName: 'Sam Member',
1003 avatarUrl: null,
1004 role: 'member',
1005 isBanned: false,
1006 bannedAt: null,
1007 banReason: null,
1008 bannedFromOtherCommunities: 0,
1009 topicCount: 3,
1010 replyCount: 12,
1011 reportCount: 0,
1012 firstSeenAt: YESTERDAY,
1013 lastActiveAt: NOW,
1014 },
1015 {
1016 did: mockUsers[3]!.did,
1017 handle: mockUsers[3]!.handle,
1018 displayName: 'Robin Troublemaker',
1019 avatarUrl: null,
1020 role: 'member',
1021 isBanned: false,
1022 bannedAt: null,
1023 banReason: null,
1024 bannedFromOtherCommunities: 2,
1025 topicCount: 5,
1026 replyCount: 18,
1027 reportCount: 4,
1028 firstSeenAt: TWO_DAYS_AGO,
1029 lastActiveAt: NOW,
1030 },
1031 {
1032 did: mockUsers[4]!.did,
1033 handle: mockUsers[4]!.handle,
1034 displayName: 'Morgan Banned',
1035 avatarUrl: null,
1036 role: 'member',
1037 isBanned: true,
1038 bannedAt: YESTERDAY,
1039 banReason: 'Repeated spam violations',
1040 bannedFromOtherCommunities: 3,
1041 topicCount: 1,
1042 replyCount: 2,
1043 reportCount: 5,
1044 firstSeenAt: TWO_DAYS_AGO,
1045 lastActiveAt: YESTERDAY,
1046 },
1047]
1048
1049// --- Plugins ---
1050
1051export const mockPlugins: Plugin[] = [
1052 {
1053 id: 'barazo-plugin-search',
1054 name: 'barazo-plugin-search',
1055 displayName: 'Full-Text Search',
1056 version: '1.0.0',
1057 description: 'Full-text search for topics and replies with optional semantic search.',
1058 source: 'core',
1059 enabled: true,
1060 category: 'search',
1061 dependencies: [],
1062 dependents: [],
1063 settingsSchema: {
1064 enableSemanticSearch: {
1065 type: 'boolean',
1066 label: 'Enable semantic search',
1067 description: 'Use embeddings for semantic search alongside full-text.',
1068 default: false,
1069 },
1070 embeddingProvider: {
1071 type: 'select',
1072 label: 'Embedding provider',
1073 description: 'Provider for generating embeddings.',
1074 default: '',
1075 options: ['', 'openai', 'ollama', 'openrouter'],
1076 },
1077 },
1078 settings: { enableSemanticSearch: false, embeddingProvider: '' },
1079 installedAt: LAST_WEEK,
1080 },
1081 {
1082 id: 'barazo-plugin-markdown',
1083 name: 'barazo-plugin-markdown',
1084 displayName: 'Markdown Editor',
1085 version: '1.2.0',
1086 description: 'Rich text editor with Markdown support, code highlighting, and preview.',
1087 source: 'core',
1088 enabled: true,
1089 category: 'editor',
1090 dependencies: [],
1091 dependents: ['barazo-plugin-code-highlight'],
1092 settingsSchema: {
1093 enablePreview: {
1094 type: 'boolean',
1095 label: 'Enable live preview',
1096 default: true,
1097 },
1098 },
1099 settings: { enablePreview: true },
1100 installedAt: LAST_WEEK,
1101 },
1102 {
1103 id: 'barazo-plugin-code-highlight',
1104 name: 'barazo-plugin-code-highlight',
1105 displayName: 'Code Highlighting',
1106 version: '0.9.1',
1107 description: 'Syntax highlighting for code blocks using Shiki.',
1108 source: 'official',
1109 enabled: true,
1110 category: 'editor',
1111 dependencies: ['barazo-plugin-markdown'],
1112 dependents: [],
1113 settingsSchema: {
1114 theme: {
1115 type: 'select',
1116 label: 'Code theme',
1117 default: 'flexoki',
1118 options: ['flexoki', 'github-dark', 'github-light', 'one-dark-pro'],
1119 },
1120 },
1121 settings: { theme: 'flexoki' },
1122 installedAt: LAST_WEEK,
1123 },
1124 {
1125 id: 'barazo-plugin-analytics',
1126 name: 'barazo-plugin-analytics',
1127 displayName: 'Community Analytics',
1128 version: '0.5.0',
1129 description: 'Topic trends, user engagement metrics, and growth analytics.',
1130 source: 'community',
1131 enabled: false,
1132 category: 'analytics',
1133 dependencies: [],
1134 dependents: [],
1135 settingsSchema: {
1136 trackingInterval: {
1137 type: 'number',
1138 label: 'Tracking interval (minutes)',
1139 description: 'How often to aggregate analytics data.',
1140 default: 60,
1141 },
1142 },
1143 settings: { trackingInterval: 60 },
1144 installedAt: YESTERDAY,
1145 },
1146 {
1147 id: 'barazo-plugin-webhooks',
1148 name: 'barazo-plugin-webhooks',
1149 displayName: 'Webhook Notifications',
1150 version: '0.2.0-beta',
1151 description: 'Send webhook notifications on new topics, replies, and moderation actions.',
1152 source: 'experimental',
1153 enabled: false,
1154 category: 'integrations',
1155 dependencies: [],
1156 dependents: [],
1157 settingsSchema: {
1158 webhookUrl: {
1159 type: 'string',
1160 label: 'Webhook URL',
1161 description: 'URL to send webhook payloads to.',
1162 default: '',
1163 },
1164 },
1165 settings: { webhookUrl: '' },
1166 installedAt: YESTERDAY,
1167 },
1168]
1169
1170// --- User Preferences ---
1171
1172export const mockUserPreferences: UserPreferences = {
1173 maturityLevel: 'sfw',
1174 declaredAge: null,
1175 mutedWords: ['spam', 'offensive'],
1176 blockedDids: [],
1177 blockedProfiles: [],
1178 mutedDids: [],
1179 crossPostBluesky: true,
1180 crossPostFrontpage: false,
1181 updatedAt: NOW,
1182}
1183
1184// --- Onboarding Fields ---
1185
1186export const mockOnboardingFields: OnboardingField[] = [
1187 {
1188 id: 'field-tos',
1189 communityDid: COMMUNITY_DID,
1190 fieldType: 'tos_acceptance',
1191 label: 'Terms of Service',
1192 description: 'You must accept our community rules to participate.',
1193 isMandatory: true,
1194 sortOrder: 0,
1195 source: 'admin',
1196 config: { tosUrl: 'https://example.com/tos' },
1197 createdAt: TWO_DAYS_AGO,
1198 updatedAt: TWO_DAYS_AGO,
1199 },
1200 {
1201 id: 'field-intro',
1202 communityDid: COMMUNITY_DID,
1203 fieldType: 'custom_text',
1204 label: 'Introduce yourself',
1205 description: 'Tell us a bit about yourself and why you joined.',
1206 isMandatory: false,
1207 sortOrder: 1,
1208 source: 'admin',
1209 config: null,
1210 createdAt: TWO_DAYS_AGO,
1211 updatedAt: TWO_DAYS_AGO,
1212 },
1213 {
1214 id: 'platform:age_confirmation',
1215 communityDid: COMMUNITY_DID,
1216 fieldType: 'age_confirmation',
1217 label: 'Age Declaration',
1218 description:
1219 'Please select your age bracket. This determines which content is available to you.',
1220 isMandatory: true,
1221 sortOrder: -1,
1222 source: 'platform',
1223 config: null,
1224 createdAt: TWO_DAYS_AGO,
1225 updatedAt: TWO_DAYS_AGO,
1226 },
1227]
1228
1229// --- My Reports (user's own reports) ---
1230
1231export const mockMyReports: MyReport[] = [
1232 {
1233 id: 1,
1234 reporterDid: 'did:plc:user-jay-001',
1235 targetUri: 'at://did:plc:user-alex-002/forum.barazo.topic.post/abc123',
1236 targetDid: 'did:plc:user-alex-002',
1237 reasonType: 'spam',
1238 description: 'This is spam content',
1239 status: 'pending',
1240 resolutionType: null,
1241 resolvedBy: null,
1242 resolvedAt: null,
1243 appealReason: null,
1244 appealedAt: null,
1245 appealStatus: 'none',
1246 createdAt: NOW,
1247 },
1248 {
1249 id: 2,
1250 reporterDid: 'did:plc:user-jay-001',
1251 targetUri: 'at://did:plc:user-sam-003/forum.barazo.topic.post/def456',
1252 targetDid: 'did:plc:user-sam-003',
1253 reasonType: 'harassment',
1254 description: 'Targeted harassment',
1255 status: 'resolved',
1256 resolutionType: 'warned',
1257 resolvedBy: 'did:plc:mod-001',
1258 resolvedAt: YESTERDAY,
1259 appealReason: null,
1260 appealedAt: null,
1261 appealStatus: 'none',
1262 createdAt: TWO_DAYS_AGO,
1263 },
1264 {
1265 id: 3,
1266 reporterDid: 'did:plc:user-jay-001',
1267 targetUri: 'at://did:plc:user-robin-004/forum.barazo.topic.reply/ghi789',
1268 targetDid: 'did:plc:user-robin-004',
1269 reasonType: 'misleading',
1270 description: 'Misleading information',
1271 status: 'resolved',
1272 resolutionType: 'dismissed',
1273 resolvedBy: 'did:plc:mod-001',
1274 resolvedAt: YESTERDAY,
1275 appealReason: null,
1276 appealedAt: null,
1277 appealStatus: 'none',
1278 createdAt: LAST_WEEK,
1279 },
1280 {
1281 id: 4,
1282 reporterDid: 'did:plc:user-jay-001',
1283 targetUri: 'at://did:plc:user-morgan-005/forum.barazo.topic.post/jkl012',
1284 targetDid: 'did:plc:user-morgan-005',
1285 reasonType: 'violation',
1286 description: 'Rule violation',
1287 status: 'pending',
1288 resolutionType: null,
1289 resolvedBy: null,
1290 resolvedAt: null,
1291 appealReason: 'I believe this was wrongly dismissed',
1292 appealedAt: YESTERDAY,
1293 appealStatus: 'pending',
1294 createdAt: LAST_WEEK,
1295 },
1296]
1297
1298// --- User Profiles (public, keyed by handle) ---
1299
1300export const mockUserProfiles: Record<string, UserProfile> = {
1301 'jay.bsky.team': {
1302 did: 'did:plc:user-jay-001',
1303 handle: 'jay.bsky.team',
1304 displayName: 'Jay',
1305 avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg',
1306 bannerUrl: null,
1307 bio: 'Community admin and AT Protocol enthusiast.',
1308 role: 'admin',
1309 firstSeenAt: TWO_DAYS_AGO,
1310 lastActiveAt: NOW,
1311 accountCreatedAt: TWO_DAYS_AGO,
1312 followersCount: 150,
1313 followsCount: 75,
1314 atprotoPostsCount: 230,
1315 hasBlueskyProfile: true,
1316 communityCount: 2,
1317 labels: [{ val: 'adult-content', src: 'did:plc:user-jay-001', isSelfLabel: true }],
1318 activity: {
1319 topicCount: 15,
1320 replyCount: 42,
1321 reactionsReceived: 89,
1322 votesReceived: 34,
1323 },
1324 globalActivity: {
1325 topicCount: 25,
1326 replyCount: 60,
1327 reactionsReceived: 120,
1328 votesReceived: 55,
1329 },
1330 },
1331 'alex.bsky.team': {
1332 did: 'did:plc:user-alex-002',
1333 handle: 'alex.bsky.team',
1334 displayName: 'Alex',
1335 avatarUrl: null,
1336 bannerUrl: null,
1337 bio: null,
1338 role: 'moderator',
1339 firstSeenAt: TWO_DAYS_AGO,
1340 lastActiveAt: YESTERDAY,
1341 accountCreatedAt: TWO_DAYS_AGO,
1342 followersCount: 30,
1343 followsCount: 20,
1344 atprotoPostsCount: 45,
1345 hasBlueskyProfile: true,
1346 communityCount: 1,
1347 labels: [],
1348 activity: {
1349 topicCount: 8,
1350 replyCount: 31,
1351 reactionsReceived: 45,
1352 votesReceived: 12,
1353 },
1354 },
1355}
1356
1357// --- Public Settings ---
1358
1359export const mockPublicSettings: PublicSettings = {
1360 communityDid: COMMUNITY_DID,
1361 communityName: 'Barazo Test Community',
1362 maturityRating: 'safe',
1363 maxReplyDepth: 9999,
1364 communityDescription: 'A test community for development',
1365 communityLogoUrl: null,
1366 faviconUrl: null,
1367 headerLogoUrl: null,
1368 showCommunityName: true,
1369}
1370
1371// --- Community Profile (own profile in a community) ---
1372
1373export const mockCommunityProfile: CommunityProfile = {
1374 did: 'did:plc:user-jay-001',
1375 handle: 'jay.bsky.team',
1376 displayName: 'Jay',
1377 avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg',
1378 bannerUrl: null,
1379 bio: 'Community admin and AT Protocol enthusiast.',
1380 communityDid: COMMUNITY_DID,
1381 hasOverride: false,
1382 source: {
1383 displayName: 'Jay',
1384 avatarUrl: 'https://cdn.bsky.social/avatar/jay.jpg',
1385 bannerUrl: null,
1386 bio: 'Community admin and AT Protocol enthusiast.',
1387 },
1388}
1389
1390// --- Pages ---
1391
1392export const mockPages: PageTreeNode[] = [
1393 {
1394 id: 'page-about',
1395 slug: 'about',
1396 title: 'About This Community',
1397 content: '# About\n\nWelcome to our community forum.',
1398 status: 'published',
1399 metaDescription: 'Learn about our community forum.',
1400 parentId: null,
1401 sortOrder: 0,
1402 communityDid: COMMUNITY_DID,
1403 createdAt: TWO_DAYS_AGO,
1404 updatedAt: YESTERDAY,
1405 children: [],
1406 },
1407 {
1408 id: 'page-privacy',
1409 slug: 'privacy-policy',
1410 title: 'Privacy Policy',
1411 content: '# Privacy Policy\n\nYour privacy matters to us.',
1412 status: 'published',
1413 metaDescription: 'How we handle your data.',
1414 parentId: null,
1415 sortOrder: 1,
1416 communityDid: COMMUNITY_DID,
1417 createdAt: TWO_DAYS_AGO,
1418 updatedAt: TWO_DAYS_AGO,
1419 children: [],
1420 },
1421 {
1422 id: 'page-terms',
1423 slug: 'terms-of-service',
1424 title: 'Terms of Service',
1425 content: '# Terms of Service\n\nBy using this forum, you agree to these terms.',
1426 status: 'published',
1427 metaDescription: 'Terms and conditions for using this forum.',
1428 parentId: null,
1429 sortOrder: 2,
1430 communityDid: COMMUNITY_DID,
1431 createdAt: TWO_DAYS_AGO,
1432 updatedAt: TWO_DAYS_AGO,
1433 children: [],
1434 },
1435 {
1436 id: 'page-cookie',
1437 slug: 'cookie-policy',
1438 title: 'Cookie Policy',
1439 content: '## Overview\n\nBarazo uses a minimal number of cookies...',
1440 status: 'published',
1441 metaDescription: 'How Barazo uses cookies.',
1442 parentId: null,
1443 sortOrder: 3,
1444 communityDid: COMMUNITY_DID,
1445 createdAt: TWO_DAYS_AGO,
1446 updatedAt: TWO_DAYS_AGO,
1447 children: [],
1448 },
1449 {
1450 id: 'page-draft',
1451 slug: 'upcoming-features',
1452 title: 'Upcoming Features',
1453 content: '# Coming Soon\n\nStay tuned for new features.',
1454 status: 'draft',
1455 metaDescription: null,
1456 parentId: null,
1457 sortOrder: 4,
1458 communityDid: COMMUNITY_DID,
1459 createdAt: YESTERDAY,
1460 updatedAt: YESTERDAY,
1461 children: [],
1462 },
1463]
1464
1465// --- Sybil Detection ---
1466
1467const TWO_HOURS_AGO = '2026-02-14T10:00:00.000Z'
1468
1469export const mockSybilClusters: SybilCluster[] = [
1470 {
1471 id: 1,
1472 clusterHash: 'abc123def456',
1473 memberCount: 8,
1474 internalEdgeCount: 24,
1475 externalEdgeCount: 3,
1476 suspicionRatio: 0.89,
1477 status: 'flagged',
1478 detectedAt: TWO_HOURS_AGO,
1479 reviewedBy: null,
1480 reviewedAt: null,
1481 },
1482 {
1483 id: 2,
1484 clusterHash: 'ghi789jkl012',
1485 memberCount: 5,
1486 internalEdgeCount: 12,
1487 externalEdgeCount: 7,
1488 suspicionRatio: 0.62,
1489 status: 'monitoring',
1490 detectedAt: YESTERDAY,
1491 reviewedBy: 'did:plc:user-jay-001',
1492 reviewedAt: NOW,
1493 },
1494 {
1495 id: 3,
1496 clusterHash: 'mno345pqr678',
1497 memberCount: 3,
1498 internalEdgeCount: 4,
1499 externalEdgeCount: 8,
1500 suspicionRatio: 0.33,
1501 status: 'dismissed',
1502 detectedAt: LAST_WEEK,
1503 reviewedBy: 'did:plc:user-jay-001',
1504 reviewedAt: YESTERDAY,
1505 },
1506]
1507
1508export const mockSybilClusterDetail: SybilClusterDetail = {
1509 ...mockSybilClusters[0]!,
1510 members: [
1511 {
1512 did: 'did:plc:sybil-001',
1513 handle: 'sybil1.bsky.social',
1514 displayName: 'Sybil Account 1',
1515 roleInCluster: 'core',
1516 trustScore: 0.12,
1517 reputationScore: 0.15,
1518 accountAge: '3 days',
1519 communitiesActiveIn: 1,
1520 },
1521 {
1522 did: 'did:plc:sybil-002',
1523 handle: 'sybil2.bsky.social',
1524 displayName: 'Sybil Account 2',
1525 roleInCluster: 'core',
1526 trustScore: 0.14,
1527 reputationScore: 0.18,
1528 accountAge: '3 days',
1529 communitiesActiveIn: 1,
1530 },
1531 {
1532 did: 'did:plc:sybil-003',
1533 handle: 'sybil3.example.com',
1534 displayName: 'Sybil Account 3',
1535 roleInCluster: 'peripheral',
1536 trustScore: 0.31,
1537 reputationScore: 0.28,
1538 accountAge: '7 days',
1539 communitiesActiveIn: 2,
1540 },
1541 {
1542 did: 'did:plc:sybil-004',
1543 handle: 'sybil4.bsky.social',
1544 displayName: 'Sybil Account 4',
1545 roleInCluster: 'core',
1546 trustScore: 0.1,
1547 reputationScore: 0.12,
1548 accountAge: '2 days',
1549 communitiesActiveIn: 1,
1550 },
1551 {
1552 did: 'did:plc:sybil-005',
1553 handle: 'sybil5.bsky.social',
1554 displayName: 'Sybil Account 5',
1555 roleInCluster: 'peripheral',
1556 trustScore: 0.25,
1557 reputationScore: 0.22,
1558 accountAge: '5 days',
1559 communitiesActiveIn: 1,
1560 },
1561 {
1562 did: 'did:plc:sybil-006',
1563 handle: 'sybil6.example.com',
1564 displayName: 'Sybil Account 6',
1565 roleInCluster: 'core',
1566 trustScore: 0.11,
1567 reputationScore: 0.14,
1568 accountAge: '3 days',
1569 communitiesActiveIn: 1,
1570 },
1571 {
1572 did: 'did:plc:sybil-007',
1573 handle: 'sybil7.bsky.social',
1574 displayName: 'Sybil Account 7',
1575 roleInCluster: 'peripheral',
1576 trustScore: 0.29,
1577 reputationScore: 0.26,
1578 accountAge: '6 days',
1579 communitiesActiveIn: 2,
1580 },
1581 {
1582 did: 'did:plc:sybil-008',
1583 handle: 'sybil8.bsky.social',
1584 displayName: 'Sybil Account 8',
1585 roleInCluster: 'core',
1586 trustScore: 0.13,
1587 reputationScore: 0.16,
1588 accountAge: '3 days',
1589 communitiesActiveIn: 1,
1590 },
1591 ],
1592}
1593
1594export const mockTrustSeeds: TrustSeed[] = [
1595 {
1596 id: 1,
1597 did: 'did:plc:seed-001',
1598 handle: 'trusted-mod.bsky.social',
1599 displayName: 'Trusted Moderator',
1600 communityId: null,
1601 reason: 'Founding community moderator',
1602 implicit: false,
1603 createdAt: LAST_WEEK,
1604 },
1605 {
1606 id: 2,
1607 did: 'did:plc:seed-002',
1608 handle: 'verified-expert.bsky.social',
1609 displayName: 'Verified Expert',
1610 communityId: COMMUNITY_DID,
1611 reason: 'Subject matter expert with verified credentials',
1612 implicit: false,
1613 createdAt: TWO_DAYS_AGO,
1614 },
1615 {
1616 id: 3,
1617 did: 'did:plc:user-jay-001',
1618 handle: 'jay.bsky.team',
1619 displayName: 'Jay',
1620 communityId: null,
1621 reason: null,
1622 implicit: true,
1623 createdAt: LAST_WEEK,
1624 },
1625 {
1626 id: 4,
1627 did: 'did:plc:user-alex-002',
1628 handle: 'alex.bsky.team',
1629 displayName: 'Alex',
1630 communityId: null,
1631 reason: null,
1632 implicit: true,
1633 createdAt: LAST_WEEK,
1634 },
1635 {
1636 id: 5,
1637 did: 'did:plc:user-sam-003',
1638 handle: 'sam.example.com',
1639 displayName: 'Sam',
1640 communityId: COMMUNITY_DID,
1641 reason: null,
1642 implicit: true,
1643 createdAt: TWO_DAYS_AGO,
1644 },
1645]
1646
1647export const mockPdsTrustFactors: PdsTrustFactor[] = [
1648 {
1649 pdsHost: 'bsky.social',
1650 trustFactor: 1.0,
1651 isDefault: true,
1652 updatedAt: LAST_WEEK,
1653 },
1654 {
1655 pdsHost: 'northsky.app',
1656 trustFactor: 1.0,
1657 isDefault: true,
1658 updatedAt: LAST_WEEK,
1659 },
1660 {
1661 pdsHost: 'custom-pds.example',
1662 trustFactor: 0.7,
1663 isDefault: false,
1664 updatedAt: TWO_DAYS_AGO,
1665 },
1666]
1667
1668export const mockTrustGraphStatus: TrustGraphStatus = {
1669 lastComputedAt: TWO_HOURS_AGO,
1670 totalNodes: 1500,
1671 totalEdges: 4200,
1672 computationDurationMs: 3200,
1673 clustersFlagged: 2,
1674 nextScheduledAt: '2026-02-14T16:00:00.000Z',
1675}
1676
1677export const mockBehavioralFlags: BehavioralFlag[] = [
1678 {
1679 id: 1,
1680 flagType: 'burst_voting',
1681 affectedDids: ['did:plc:sybil-001', 'did:plc:sybil-002', 'did:plc:sybil-004'],
1682 details: '3 accounts cast 47 votes within a 2-minute window on the same set of 5 topics.',
1683 detectedAt: TWO_HOURS_AGO,
1684 status: 'pending',
1685 },
1686 {
1687 id: 2,
1688 flagType: 'content_similarity',
1689 affectedDids: ['did:plc:sybil-005', 'did:plc:sybil-006'],
1690 details:
1691 '2 accounts posted near-identical replies across 3 different topics with 94% text similarity.',
1692 detectedAt: YESTERDAY,
1693 status: 'pending',
1694 },
1695]