forked from BasedHardware/omi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmetadata.ts
More file actions
249 lines (235 loc) · 6.85 KB
/
Copy pathmetadata.ts
File metadata and controls
249 lines (235 loc) · 6.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
import { Metadata } from 'next';
import envConfig from '@/src/constants/envConfig';
import { getCategoryMetadata as getUICategoryMetadata } from './category';
export interface CategoryMetadata {
title: string;
description: string;
keywords: string[];
}
export const categoryMetadata: Record<string, CategoryMetadata> = {
productivity: {
title: 'Productivity Apps for OMI Necklace',
description:
'Enhance your daily workflow with OMI productivity apps. From voice-controlled task management to AI-powered note-taking, transform how you work with hands-free efficiency.',
keywords: [
'productivity apps',
'task management',
'note-taking',
'voice control',
'AI assistant',
],
},
entertainment: {
title: 'Entertainment Apps for OMI Necklace',
description:
'Discover entertainment apps for your OMI Necklace. Enjoy music, games, and interactive experiences designed for voice control and ambient computing.',
keywords: [
'entertainment apps',
'music',
'games',
'interactive experiences',
'voice control',
],
},
health: {
title: 'Health & Wellness Apps for OMI Necklace',
description:
'Take control of your wellness journey with OMI health apps. Track fitness, monitor health metrics, and get AI-powered wellness insights through your wearable companion.',
keywords: [
'health apps',
'wellness tracking',
'fitness monitoring',
'health metrics',
'AI wellness',
'wearable health',
'OMI apps',
'digital health companion',
],
},
social: {
title: 'Social Apps for OMI Necklace',
description:
'Stay connected with OMI social apps. Experience new ways to communicate, share, and interact with friends and family through your AI-powered necklace.',
keywords: [
'social apps',
'communication',
'sharing',
'social interaction',
'voice messaging',
],
},
integration: {
title: 'Integration Apps for OMI Necklace',
description:
'Connect your digital world with OMI integration apps. Seamlessly control smart home devices, sync with your favorite services, and automate your life.',
keywords: [
'integration apps',
'smart home',
'automation',
'device control',
'service integration',
],
},
utility: {
title: 'Utility Apps for OMI Necklace',
description:
'Essential utility apps for your OMI Necklace. Access practical tools and helpful functions through voice commands and AI assistance.',
keywords: [
'utility apps',
'tools',
'practical apps',
'voice commands',
'AI assistance',
],
},
lifestyle: {
title: 'Lifestyle Apps for OMI Necklace',
description:
'Enhance your daily life with OMI lifestyle apps. From personal organization to habit tracking, make everyday tasks more intuitive with AI assistance.',
keywords: [
'lifestyle apps',
'personal organization',
'habit tracking',
'daily assistance',
'AI companion',
],
},
};
const productInfo = {
name: 'OMI Necklace',
description: 'AI-powered wearable necklace. Real-time AI voice assistant.',
price: '89',
currency: 'USD',
url: 'https://www.omi.me/products/friend-dev-kit-2',
};
const appStoreInfo = {
ios: 'https://apps.apple.com/us/app/friend-ai-wearable/id6502156163',
android: 'https://play.google.com/store/apps/details?id=com.friend.ios',
};
export function generateBreadcrumbSchema(category?: string) {
const breadcrumbList = {
'@context': 'https://schema.org',
'@type': 'BreadcrumbList',
itemListElement: [
{
'@type': 'ListItem',
position: 1,
name: 'Home',
item: envConfig.WEB_URL,
},
{
'@type': 'ListItem',
position: 2,
name: 'Apps',
item: `${envConfig.WEB_URL}/apps`,
},
],
};
if (category) {
breadcrumbList.itemListElement.push({
'@type': 'ListItem',
position: 3,
name: categoryMetadata[category]?.title || category,
item: `${envConfig.WEB_URL}/apps/category/${category}`,
});
}
return breadcrumbList;
}
export function generateProductSchema() {
return {
'@context': 'https://schema.org',
'@type': 'Product',
name: productInfo.name,
description: productInfo.description,
image: `${envConfig.WEB_URL}/omi-app.png`,
offers: {
'@type': 'Offer',
price: productInfo.price,
priceCurrency: productInfo.currency,
url: productInfo.url,
availability: 'https://schema.org/InStock',
},
brand: {
'@type': 'Brand',
name: 'OMI',
},
};
}
export function generateCollectionPageSchema() {
return {
'@context': 'https://schema.org',
'@type': 'CollectionPage',
name: 'OMI Apps Marketplace',
description: 'Discover and install AI-powered apps for your OMI Necklace.',
url: `${envConfig.WEB_URL}/apps`,
isPartOf: {
'@type': 'WebSite',
name: 'OMI Apps Marketplace',
url: envConfig.WEB_URL,
},
};
}
export function generateOrganizationSchema() {
return {
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'OMI',
url: envConfig.WEB_URL,
logo: `${envConfig.WEB_URL}/omi-app.png`,
sameAs: [
'https://twitter.com/omiHQ',
'https://www.instagram.com/omi.me/',
'https://www.linkedin.com/company/omi-me/',
],
};
}
export function generateAppListSchema(
apps: { name: string; description: string; category: string }[],
) {
return {
'@context': 'https://schema.org',
'@type': 'ItemList',
itemListElement: apps.map((app, index) => ({
'@type': 'ListItem',
position: index + 1,
item: {
'@type': 'SoftwareApplication',
name: app.name,
description: app.description,
applicationCategory: app.category,
operatingSystem: 'iOS, Android',
offers: {
'@type': 'Offer',
price: '0',
priceCurrency: 'USD',
},
},
})),
};
}
export function getBaseMetadata(title: string, description: string): Metadata {
return {
title,
description,
metadataBase: new URL(envConfig.WEB_URL),
other: {
'apple-itunes-app': `app-id=${appStoreInfo.ios.split('/id')[1]}`,
'google-play-app': `app-id=${appStoreInfo.android.split('id=')[1]}`,
},
};
}
export function getCategoryMetadata(category: string): CategoryMetadata {
const uiMetadata = getUICategoryMetadata(category);
return {
title: `${uiMetadata.displayName} Apps for OMI Necklace`,
description: `${uiMetadata.description}. Browse and discover apps designed for voice control and ambient computing.`,
keywords: [
`${category.toLowerCase()} apps`,
'OMI apps',
'voice control',
'AI assistant',
'wearable apps',
...uiMetadata.displayName.toLowerCase().split(' '),
],
};
}