feat(db): mesh data model — meshes, members, invites, audit log

- pgSchema "mesh" with 4 tables isolating the peer mesh domain
- Enums: visibility, transport, tier, role
- audit_log is metadata-only (E2E encryption enforced at broker/client)
- Cascade on mesh delete, soft-delete via archivedAt/revokedAt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-04-04 21:19:32 +01:00
commit d3163a5bff
1384 changed files with 314925 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
import { CollectionType, getContentItems } from "@turbostarter/cms";
import { getPathname, config } from "@turbostarter/i18n";
import { appConfig } from "~/config/app";
import { pathsConfig } from "~/config/paths";
import type { MetadataRoute } from "next";
const url = (path: string) => `${appConfig.url}${path}`;
const getEntry = (path: string) => ({
url: url(
getPathname({
path,
locale: appConfig.locale,
defaultLocale: appConfig.locale,
}),
),
alternates: {
languages: Object.fromEntries(
config.locales.map((locale) => [
locale,
url(
getPathname({
path,
locale,
defaultLocale: appConfig.locale,
}),
),
]),
),
},
});
export default function sitemap(): MetadataRoute.Sitemap {
return [
{
...getEntry(pathsConfig.index),
lastModified: new Date(),
changeFrequency: "monthly",
priority: 1,
},
{
...getEntry(pathsConfig.marketing.pricing),
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.8,
},
{
...getEntry(pathsConfig.marketing.contact),
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.8,
},
{
...getEntry(pathsConfig.marketing.blog.index),
lastModified: new Date(),
changeFrequency: "monthly",
priority: 0.8,
},
...getContentItems({
collection: CollectionType.BLOG,
locale: appConfig.locale,
}).items.map<MetadataRoute.Sitemap[number]>((post) => ({
...getEntry(pathsConfig.marketing.blog.post(post.slug)),
lastModified: new Date(post.lastModifiedAt),
changeFrequency: "monthly",
priority: 0.7,
})),
...getContentItems({
collection: CollectionType.LEGAL,
locale: appConfig.locale,
}).items.map<MetadataRoute.Sitemap[number]>((post) => ({
...getEntry(pathsConfig.marketing.legal(post.slug)),
lastModified: new Date(post.lastModifiedAt),
changeFrequency: "yearly",
priority: 0.5,
})),
];
}