From ba923e2f9b3956babcb5ccfe444670822db75eac Mon Sep 17 00:00:00 2001 From: royce-mathew Date: Tue, 18 Feb 2025 04:39:29 -0500 Subject: [PATCH] chore: add new templates Added more information on how to fill the .env file --- .env.example | 33 +++++++++++++++++++-------------- src/app/layout.tsx | 6 +++++- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.env.example b/.env.example index 321974e..ce17df2 100644 --- a/.env.example +++ b/.env.example @@ -1,30 +1,35 @@ # Firebase ## Private +### Templates for Documents. +NEXT_PUBLIC_MATH_TEMPLATE_DOC_ID="" # Document ID under the collection "documents" + ### Authorization -AUTH_SECRET="" +AUTH_SECRET="" # You can use the CLI to generate an auth secret: `pnpm exec auth secret` -### Admin Credentials -FIREBASE_PROJECT_ID="" +### Admin Credentials. You can get this from the Firebase Project Settings. +FIREBASE_PROJECT_ID="" FIREBASE_CLIENT_EMAIL="" FIREBASE_PRIVATE_KEY="" -### Google Auth Login +### Google Auth Login. You can get this from the Google Developer Console. AUTH_GOOGLE_ID="" AUTH_GOOGLE_SECRET="" -## Github Auth Login +## Github Auth Login. You can get this from the Github Developer Settings. AUTH_GITHUB_ID="" -AUTH_GITHUB_SECRET="" +AUTH_GITHUB_SECRET="" ### Roblox Related -ROBLOX_COOKIE="" +ROBLOX_COOKIE="" # You can get this from the browser cookies. Only required for devproduct forwarding. # Public -NEXT_PUBLIC_FIREBASE_API_KEY="" -NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="" -NEXT_PUBLIC_FIREBASE_PROJECT_ID="" -NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="" -NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="" -NEXT_PUBLIC_FIREBASE_APP_ID="" -NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID="" \ No newline at end of file +NEXT_PUBLIC_FIREBASE_API_KEY="" # Firebase API Key +NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="" # Firebase Auth Domain +NEXT_PUBLIC_FIREBASE_PROJECT_ID="" # Firebase Project ID +NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="" # Firebase Storage Bucket +NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="" # Firebase Messaging Sender ID +NEXT_PUBLIC_FIREBASE_APP_ID="" # Firebase App ID +NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID="" # Firebase Measurement ID + +NEXT_PUBLIC_ANALYTICS_ID="" # Google Analytics ID \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 4dbe1b5..3ce4ebd 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -103,7 +103,11 @@ export default function RootLayout({ - + {/* Google Analytics */} + {process.env.NODE_ENV === "production" && + process.env.NEXT_PUBLIC_ANALYTICS_ID && ( + + )} ) }