diff --git a/nextjs-end/.env b/nextjs-end/.env index 9da8141a..b2e6bcbf 100644 --- a/nextjs-end/.env +++ b/nextjs-end/.env @@ -3,4 +3,5 @@ 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="" \ No newline at end of file +NEXT_PUBLIC_FIREBASE_APP_ID="" +GEMINI_API_KEY="" \ No newline at end of file diff --git a/nextjs-end/.idx/dev.nix b/nextjs-end/.idx/dev.nix index afdd177b..45c49093 100644 --- a/nextjs-end/.idx/dev.nix +++ b/nextjs-end/.idx/dev.nix @@ -3,11 +3,18 @@ packages = [ pkgs.nodejs_20 ]; + env = { + GOOGLE_PROJECT = ""; + NEXT_TELEMETRY_DISABLED = "1"; + }; idx.workspace = { onStart = { npm-install = "npm ci --no-audit --prefer-offline --no-progress --timing"; default.openFiles = [".env"]; }; + onCreate = { + firebase-use = "firebase use "; + }; }; idx.extensions = [ ]; diff --git a/nextjs-end/.idx/setup.mjs b/nextjs-end/.idx/setup.mjs new file mode 100644 index 00000000..e69de29b diff --git a/nextjs-end/idx-template.json b/nextjs-end/idx-template.json index d4b30f37..cdab444d 100644 --- a/nextjs-end/idx-template.json +++ b/nextjs-end/idx-template.json @@ -15,13 +15,19 @@ "required": true }, { - "id": "apiKey", - "name": "Firebase API Key", + "id": "firebaseAppId", + "name": "Firebase Web App API Key", "type": "string", "required": true }, { - "id": "apiKey", + "id": "firebaseApiKey", + "name": "Firebase Web App ID", + "type": "string", + "required": true + }, + { + "id": "geminiApiKey", "name": "Gemini API Key", "type": "string", "required": true diff --git a/nextjs-end/idx-template.nix b/nextjs-end/idx-template.nix index 1d8dac67..89708abe 100644 --- a/nextjs-end/idx-template.nix +++ b/nextjs-end/idx-template.nix @@ -6,8 +6,8 @@ ]; bootstrap = '' npx -y giget gh:firebase/friendlyeats-web/nextjs-end#jamesdaniels_fixServiceWorkers "$WS_NAME" - rm "$WS_NAME/idx-template.json" - rm "$WS_NAME/idx-template.nix" + rm "$WS_NAME/idx-template".{nix|json} + sed -e 's//${projectId}/' ${.idx/dev.nix} > "$WS_NAME/.idx/dev.nix" mv "$WS_NAME" "$out" ''; } \ No newline at end of file diff --git a/nextjs-start/.env b/nextjs-start/.env index adbeda66..b2e6bcbf 100644 --- a/nextjs-start/.env +++ b/nextjs-start/.env @@ -4,3 +4,4 @@ NEXT_PUBLIC_FIREBASE_PROJECT_ID="" NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="" NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="" NEXT_PUBLIC_FIREBASE_APP_ID="" +GEMINI_API_KEY="" \ No newline at end of file