- Copy admin-dashboard-web → dashboards/admin-web - Copy tracker-dashboard-web → dashboards/tracker-web - Update pnpm-workspace.yaml to include dashboards/* - Replace file: refs with workspace:* for @bytelyst/* packages - Replace all hardcoded LysnrAI/lysnn.com branding with generic platform refs - Make telemetry use NEXT_PUBLIC_PRODUCT_ID / PRODUCT_ID env vars - Update mock credentials, seed data, invitation codes, placeholders - Update READMEs, e2e tests, unit tests for product-agnostic content - Both dashboards pass tsc --noEmit clean
20 lines
573 B
TypeScript
20 lines
573 B
TypeScript
/**
|
|
* Next.js instrumentation hook — runs once at server startup.
|
|
* Resolves secrets from Azure Key Vault into process.env BEFORE
|
|
* any route handlers or Cosmos client initialization.
|
|
*/
|
|
|
|
import { resolveKeyVaultSecrets, LYSNR_SECRETS } from '@bytelyst/config';
|
|
|
|
export async function register() {
|
|
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
|
await resolveKeyVaultSecrets([
|
|
LYSNR_SECRETS.COSMOS_KEY,
|
|
LYSNR_SECRETS.COSMOS_ENDPOINT,
|
|
LYSNR_SECRETS.JWT_SECRET,
|
|
LYSNR_SECRETS.SEED_SECRET,
|
|
LYSNR_SECRETS.STRIPE_SECRET_KEY,
|
|
]);
|
|
}
|
|
}
|