-
-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Composable environment variables (#332)
* Extend Vercel preset * Move VERCEL_PROJECT_PRODUCTION_URL to Server * Remove duplicate keys * Install zod and t3-env in relevant packages * Migrate auth keys * Migrate AI keys * Rename key exports * Migrate Analytics keys * Migrate Core keys * Migrate CMS keys * Migrate Collaboration keys * Migrate Flags keys * Migrate Email keys * Migrate Database keys * Migrate Observability keys * Migrate Payments keys * Migrate Security keys * Migrate Webhooks keys * Migrate more core keys * Migrate Storage keys * Update index.ts * Update index.tsx * Start breaking apart mono-env * Migrate API env * Migrate Web env * Remove Toolbar from Design System and Next Config * Re-implement Vercel Toolbar * Remove repo/env from design-system * Fix typo * Co-locate observability handlers * Switch to loose env mode * Update pnpm-lock.yaml * Fix rate limit keys * Misc fixes * Remove unused web deps * Remove next-secure-headers * Co-locate sentry client config * Remove unused dep * Fix typo * Update client.ts * Update middleware.ts * Build fixes * Start working on app-level documentation * Rework to Apps and Packages * Add next.js config page * Draft Tailwind Config page * Cleanup email * Update email.mdx * Update mint.json * Fix broken links * Draft structure * Cleanup images * Restore structure * Move deployment tips to each page * Start building out app documentation * Split philosophy to new page * More docs updates * More docs updates * Move remaining env vars to next-config package * Update env.ts * Move env to root * More work on env * Finish env docs * Finish "Getting started" * Finish API * Pass in basehub token manually * Build fixes * Update overview.mdx * Finish drafting app docs
- Loading branch information
1 parent
7efa757
commit cac47cb
Showing
168 changed files
with
1,205 additions
and
1,592 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { keys as analytics } from '@repo/analytics/keys'; | ||
import { keys as auth } from '@repo/auth/keys'; | ||
import { keys as database } from '@repo/database/keys'; | ||
import { keys as email } from '@repo/email/keys'; | ||
import { keys as core } from '@repo/next-config/keys'; | ||
import { keys as observability } from '@repo/observability/keys'; | ||
import { keys as payments } from '@repo/payments/keys'; | ||
import { createEnv } from '@t3-oss/env-nextjs'; | ||
|
||
export const env = createEnv({ | ||
extends: [ | ||
auth(), | ||
analytics(), | ||
core(), | ||
database(), | ||
email(), | ||
observability(), | ||
payments(), | ||
], | ||
server: {}, | ||
client: {}, | ||
runtimeEnv: {}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { initializeSentry } from '@repo/next-config/instrumentation'; | ||
import { initializeSentry } from '@repo/observability/instrumentation'; | ||
|
||
export const register = initializeSentry(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,3 @@ | ||
/* | ||
* This file configures the initialization of Sentry on the client. | ||
* The config you add here will be used whenever a users loads a page in their browser. | ||
* https://docs.sentry.io/platforms/javascript/guides/nextjs/ | ||
*/ | ||
import { initializeSentry } from '@repo/observability/client'; | ||
|
||
import { init, replayIntegration } from '@sentry/nextjs'; | ||
|
||
init({ | ||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | ||
|
||
// Adjust this value in production, or use tracesSampler for greater control | ||
tracesSampleRate: 1, | ||
|
||
// Setting this option to true will print useful information to the console while you're setting up Sentry. | ||
debug: false, | ||
|
||
replaysOnErrorSampleRate: 1, | ||
|
||
/* | ||
* This sets the sample rate to be 10%. You may want this to be 100% while | ||
* in development and sample at a lower rate in production | ||
*/ | ||
replaysSessionSampleRate: 0.1, | ||
|
||
// You can remove this option if you're not planning to use the Sentry Session Replay feature: | ||
integrations: [ | ||
replayIntegration({ | ||
// Additional Replay configuration goes in here, for example: | ||
maskAllText: true, | ||
blockAllMedia: true, | ||
}), | ||
], | ||
}); | ||
initializeSentry(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { keys as analytics } from '@repo/analytics/keys'; | ||
import { keys as auth } from '@repo/auth/keys'; | ||
import { keys as collaboration } from '@repo/collaboration/keys'; | ||
import { keys as database } from '@repo/database/keys'; | ||
import { keys as email } from '@repo/email/keys'; | ||
import { keys as flags } from '@repo/feature-flags/keys'; | ||
import { keys as core } from '@repo/next-config/keys'; | ||
import { keys as observability } from '@repo/observability/keys'; | ||
import { keys as security } from '@repo/security/keys'; | ||
import { keys as webhooks } from '@repo/webhooks/keys'; | ||
import { createEnv } from '@t3-oss/env-nextjs'; | ||
|
||
export const env = createEnv({ | ||
extends: [ | ||
auth(), | ||
analytics(), | ||
collaboration(), | ||
core(), | ||
database(), | ||
email(), | ||
flags(), | ||
observability(), | ||
security(), | ||
webhooks(), | ||
], | ||
server: {}, | ||
client: {}, | ||
runtimeEnv: {}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { initializeSentry } from '@repo/next-config/instrumentation'; | ||
import { initializeSentry } from '@repo/observability/instrumentation'; | ||
|
||
export const register = initializeSentry(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,3 @@ | ||
/* | ||
* This file configures the initialization of Sentry on the client. | ||
* The config you add here will be used whenever a users loads a page in their browser. | ||
* https://docs.sentry.io/platforms/javascript/guides/nextjs/ | ||
*/ | ||
import { initializeSentry } from '@repo/observability/client'; | ||
|
||
import { init, replayIntegration } from '@sentry/nextjs'; | ||
|
||
init({ | ||
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, | ||
|
||
// Adjust this value in production, or use tracesSampler for greater control | ||
tracesSampleRate: 1, | ||
|
||
// Setting this option to true will print useful information to the console while you're setting up Sentry. | ||
debug: false, | ||
|
||
replaysOnErrorSampleRate: 1, | ||
|
||
/* | ||
* This sets the sample rate to be 10%. You may want this to be 100% while | ||
* in development and sample at a lower rate in production | ||
*/ | ||
replaysSessionSampleRate: 0.1, | ||
|
||
// You can remove this option if you're not planning to use the Sentry Session Replay feature: | ||
integrations: [ | ||
replayIntegration({ | ||
// Additional Replay configuration goes in here, for example: | ||
maskAllText: true, | ||
blockAllMedia: true, | ||
}), | ||
], | ||
}); | ||
initializeSentry(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.