Skip to content

I have reviewed all user-facing HTML files (index.html, `login.html…#1

Open
ilhamnih12 wants to merge 11 commits intomainfrom
Main
Open

I have reviewed all user-facing HTML files (index.html, `login.html…#1
ilhamnih12 wants to merge 11 commits intomainfrom
Main

Conversation

@ilhamnih12
Copy link
Copy Markdown
Owner

, register.html`) and confirmed that all text is in Indonesian and the 'Created by Edinst' copyright notice is present on all pages. The frontend update tasks are complete.

…`, `register.html`) and confirmed that all text is in Indonesian and the 'Created by Edinst' copyright notice is present on all pages. The frontend update tasks are complete.
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 27, 2025

Deploy Preview for dainty-halva-7e6f80 ready!

Name Link
🔨 Latest commit 55e6063
🔍 Latest deploy log https://app.netlify.com/projects/dainty-halva-7e6f80/deploys/68b29a414e89d20008ab7285
😎 Deploy Preview https://deploy-preview-1--dainty-halva-7e6f80.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…lling mechanism in `app.js`. The application will now fetch new messages every 3 seconds.
@netlify
Copy link
Copy Markdown

netlify Bot commented Aug 27, 2025

Deploy Preview for priv-chats ready!

Name Link
🔨 Latest commit 3f83f1f
🔍 Latest deploy log https://app.netlify.com/projects/priv-chats/deploys/68b2a27618cd670007b94b3a
😎 Deploy Preview https://deploy-preview-1--priv-chats.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

…lling mechanism in `app.js`. The application will now fetch new messages every 3 seconds.
- Replaced Supabase with Firebase for authentication and database to enable real-time chat functionality.
- Implemented Firestore real-time listeners (`onSnapshot`) to display messages instantly.
- Updated Netlify serverless function to use the Firebase Admin SDK for sending messages.
- Overhauled the entire UI with a modern design, including new fonts, a new color scheme, and improved layouts for chat and authentication pages.
- Fixed a potential Netlify build issue related to environment variable handling.
Deleted the obsolete `get-messages.js` function. This file was a leftover from the previous Supabase implementation and was causing the Netlify build to fail because its dependency (`@supabase/supabase-js`) was no longer present in `package.json`.
Changed the keys in the credential object from camelCase (e.g., `projectId`) to snake_case (e.g., `project_id`) in `netlify/functions/send-message.js`.

This fixes the `app/invalid-credential` error where the Firebase Admin SDK was not able to find the `project_id` property.
Changed the quotes for the `FIREBASE_PRIVATE_KEY` in `netlify.toml` to triple quotes (`"""`).

This fixes the TOML parsing issue that prevented environment variables from being loaded into the Netlify function's runtime, which was the root cause of the `app/invalid-credential` error.
Removed the Firebase credentials from the `netlify.toml` file. The environment variables will now be managed exclusively through the Netlify UI dashboard for better security and reliability.
Re-added the `.replace(/\n/g, '\n')` call to the `FIREBASE_PRIVATE_KEY` environment variable.

This is necessary because Netlify's UI-based environment variables store multi-line strings with escaped `\n` characters. This change correctly formats the private key before passing it to the Firebase Admin SDK, fixing the `Invalid PEM formatted message` error.
Refactored the Firebase Admin SDK initialization in `send-message.js` to use a single environment variable `FIREBASE_SERVICE_ACCOUNT_JSON`.

This new approach is more robust and avoids all the parsing and formatting issues with the private key that were causing deployment to fail. The function now parses the entire service account credentials from a single JSON string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant