Sifa professional network API (Fastify, AT Protocol, Jetstream)
sifa.id/
1/**
2 * Post templates for the "Profile of the Day" Bluesky posts.
3 *
4 * Each template contains a `{displayName}` placeholder that gets replaced
5 * with the featured user's display name. The final post appends a handle
6 * mention and link card separately.
7 */
8
9export const FEATURED_TEMPLATES: readonly string[] = [
10 "Today's featured profile on Sifa: {displayName} 👋",
11 "{displayName} is today's Sifa profile of the day 🔍",
12 "Meet {displayName}, today's featured profile on Sifa ✨",
13 'Have you connected with {displayName} yet? Featured on Sifa today 👀',
14 '{displayName} is our Sifa profile of the day 🌟',
15 "Check out {displayName}'s profile on Sifa today 🔗",
16 "Get to know {displayName}, today's featured Sifa profile 🧑💻",
17 '{displayName} is front and center on Sifa today 📌',
18 "Worth a look: {displayName} is today's featured Sifa profile 👇",
19 '{displayName} on Sifa today ☀️',
20 '{displayName} got our attention. Profile of the day on Sifa 👀',
21 "{displayName} is today's Sifa pick 🎯",
22 'One profile, one day: {displayName} on Sifa 📍',
23 "Go explore {displayName}'s profile on Sifa 🔎",
24 '{displayName}. Check out their Sifa profile today 💬',
25 "Who is {displayName}? Today's featured profile on Sifa 🤔",
26 'Featured today on Sifa: {displayName} ✨',
27 "Today we're featuring {displayName} on Sifa 📣",
28 '{displayName} is doing cool stuff. See their Sifa profile 🛠️',
29 'Say hi to {displayName}, featured on Sifa today 👋',
30 'Our pick of the day on Sifa: {displayName} 🎯',
31 'Someone worth following: {displayName}, featured on Sifa 🙌',
32 "{displayName} is today's Sifa profile of the day 🥇",
33 '{displayName} is on the move. See their Sifa profile 🚶',
34 "Check out {displayName}'s path so far on Sifa 📄",
35 'New day, new featured profile. Say hello to {displayName} on Sifa 🌅',
36 'Looking for someone interesting? {displayName} on Sifa today 👀',
37 '{displayName} is featured on the decentralized professional network today 🌐',
38 "{displayName}, today's profile of the day on Sifa. Go take a look 👇",
39 '{displayName} is featured on Sifa today 🔵',
40 'Featuring {displayName} on Sifa today. Worth a visit 🏠',
41 "Today on Sifa, it's all about {displayName} ☀️",
42 "Today's featured Sifa profile: {displayName} 📋",
43 'Building in public, growing in the open. Today: {displayName} 🌱',
44 '{displayName} on Sifa today. Go check it out 👉',
45] as const;
46
47/**
48 * Deterministic hash-based template picker. Same date string always
49 * returns the same template index.
50 */
51export function pickTemplate(dateStr: string): number {
52 let hash = 0;
53 for (let i = 0; i < dateStr.length; i++) {
54 // Simple djb2-style hash
55 hash = (hash * 31 + dateStr.charCodeAt(i)) | 0;
56 }
57 // Ensure positive index
58 return Math.abs(hash) % FEATURED_TEMPLATES.length;
59}
60
61/**
62 * Replaces `{displayName}` in the template string.
63 */
64export function renderTemplate(template: string, displayName: string, _handle: string): string {
65 return template.replace('{displayName}', displayName);
66}