Skip to content

Conversation

@ilemonajames
Copy link

@ilemonajames ilemonajames commented Jul 1, 2025

Summary by CodeRabbit

  • Style

    • Updated platform and project names throughout the app (e.g., "Horizon" to "Fundilla" or "Fundilar").
    • Changed logo and icon images and their alt text in various components for a refreshed branding.
    • Updated app metadata, including title and description, to reflect new branding.
  • Chores

    • Updated environment configuration with new credentials for external services.
    • Added .env to .gitignore to enhance security.
    • Changed project name and updated dependency version range in project settings.
  • Documentation

    • Updated README to reflect the new platform name.
  • Bug Fixes

    • Improved error handling and user feedback during authentication processes.
    • Enhanced user signup flow with better error management and cleanup to prevent orphaned accounts.
    • Expanded data access permissions for linked financial accounts to include transaction details.

@vercel
Copy link

vercel bot commented Jul 1, 2025

@ilemonajames is attempting to deploy a commit to the JS Mastery Pro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Jul 1, 2025

Walkthrough

This update modifies branding across the project, changing names and image assets from "Horizon" to "Fundilla" or "Fundilar" and updating logo image paths from SVG to PNG formats. Environment variable values for external services are refreshed, .env is now git-ignored, and the project name and Next.js dependency version are updated in package.json. The AuthForm submission logic was refactored for improved error handling. The signUp function was enhanced with multi-step processing and cleanup on failure. The Plaid link token request now includes additional products.

Changes

File(s) Change Summary
.env Updated credentials and identifiers for Appwrite, Plaid, and Dwolla services.
.gitignore Added .env to ignored files.
README.md Changed platform name in description from "Horizon" to "Fundilar".
app/(auth)/layout.tsx Updated image source from /icons/auth-image.svg to /icons/100x80 v.png.
app/(root)/layout.tsx Changed logo image from /icons/logo.svg to /icons/logo.png.
app/layout.tsx Updated app title and description from "Horizon" to "Fundilla"; changed icon path to PNG.
components/AuthForm.tsx Refactored onSubmit for improved error handling; updated logo image and alt text; removed heading text.
components/Footer.tsx Updated logout icon alt text from "jsm" to "fundilla".
components/MobileNav.tsx Changed logo image source and alt text from "Horizon" SVG to "Fundilla" PNG.
components/Sidebar.tsx Updated sidebar logo image and alt text from "Horizon" SVG to "Fundilar" PNG; changed sidebar logo text.
package.json Changed project name to "Finapex"; relaxed Next.js dependency version from fixed to caret range.
lib/actions/user.actions.ts Refactored signUp for multi-step user creation with error handling and cleanup; updated createLinkToken to request more products.

Estimated code review effort

3 (~45 minutes)

Poem

🐇
Goodbye Horizon, hello Fundilla,
Our logos now shine in PNG vanilla.
With secrets refreshed and names anew,
The rabbit hops on, as projects do.
From jsm to Finapex, onward we go—
In every commit, our garden will grow!
🌱✨

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-22T00_02_39_468Z-debug-0.log

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ilemonajames
Copy link
Author

ok

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🔭 Outside diff range comments (1)
app/(auth)/layout.tsx (1)

13-18: Space in filename will break static asset path

src="/icons/100x80 v.png" contains a space. Next.js will encode it to %20, which is easy to miss and error-prone when deploying to S3/CDN. Rename the file to a kebab/underscore name and update the import.

-            src="/icons/100x80 v.png"
-            alt="Auth image"
+            src="/icons/auth-image.png"
+            alt="Auth side illustration"
🧹 Nitpick comments (5)
.gitignore (1)

28-31: Ensure sample env file is committed

Adding .env to .gitignore is the right call for security, but now nothing documents required variables. Commit a redacted .env.example (or keep the one already in the repo up-to-date) so new devs & CI know the expected keys.

components/Footer.tsx (1)

32-34: Alt text mismatch & missing sizes with fill

  1. The alt now reads "fundilla" but the image is a logout icon. Prefer something like "Logout" for clarity.
  2. When using fill with next/image, supply a sizes prop to avoid runtime warnings and CLS.
-<Image src="icons/logout.svg" fill alt="fundilla" />
+<Image
+  src="icons/logout.svg"
+  fill
+  sizes="24px"
+  alt="Logout icon"
/>
README.md (1)

42-43: Brand name inconsistency

Docs now mention “Fundilar”, while the UI/components use “Fundilla”. Pick one spelling to avoid confusion for users & SEO.

components/MobileNav.tsx (1)

37-41: Alt text could be more descriptive

alt="Fundilla" doesn’t say what the image is. Prefer something like “Fundilla logo” for accessibility tools.

app/layout.tsx (1)

15-18: Hard-coding brand strings spreads duplication

Title, description and icon path now say “Fundilla”, but other files disagree (Finapex, Fundilar). Recommend centralising brand constants (e.g. /lib/branding.ts) so a future rename is one-line.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8d5a8e and 3641e98.

⛔ Files ignored due to path filters (4)
  • package-lock.json is excluded by !**/package-lock.json
  • public/icons/100x80 v.png is excluded by !**/*.png
  • public/icons/logo-light.png is excluded by !**/*.png
  • public/icons/logo.png is excluded by !**/*.png
📒 Files selected for processing (11)
  • .env (1 hunks)
  • .gitignore (1 hunks)
  • README.md (1 hunks)
  • app/(auth)/layout.tsx (1 hunks)
  • app/(root)/layout.tsx (1 hunks)
  • app/layout.tsx (1 hunks)
  • components/AuthForm.tsx (1 hunks)
  • components/Footer.tsx (1 hunks)
  • components/MobileNav.tsx (1 hunks)
  • components/Sidebar.tsx (1 hunks)
  • package.json (2 hunks)
🔇 Additional comments (1)
package.json (1)

2-3: Project name deviates from UI brand

"name": "Finapex" doesn’t match “Fundilla/Fundilar” shown in the UI. This will confuse contributors and users of the package registry.

Comment on lines +22 to 23
<Image src="/icons/logo.png" width={30} height={30} alt="logo" />
<div>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Alt text & asset check

alt="logo" is too generic and hurts a11y. Consider renaming to something descriptive such as alt="Fundilla logo".

Also verify the PNG actually exists under public/icons/logo.png; otherwise Next 13 build will fail.


🏁 Script executed:

#!/bin/bash
# Assert the file exists in the repo
fd -t f logo.png | head -n 5

Length of output: 52


Improve image alt text for accessibility

  • ✅ Asset verified: public/icons/logo.png exists.
  • 📝 Update the alt attribute to be more descriptive.

In app/(root)/layout.tsx around lines 22–23, change:

- <Image src="/icons/logo.png" width={30} height={30} alt="logo" />
+ <Image src="/icons/logo.png" width={30} height={30} alt="Fundilla logo" />
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Image src="/icons/logo.png" width={30} height={30} alt="logo" />
<div>
<Image src="/icons/logo.png" width={30} height={30} alt="Fundilla logo" />
<div>
🤖 Prompt for AI Agents
In app/(root)/layout.tsx around lines 22 to 23, update the alt attribute of the
Image component from a generic "logo" to a more descriptive text that clearly
identifies the image, such as "Company logo" or a specific brand name, to
improve accessibility for screen readers.

Comment on lines +37 to 43
src="/icons/logo.png"
width={34}
height={34}
alt="Horizon logo"
alt="Fundilla"
/>
<h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Horizon</h1>
</Link>
Copy link

@coderabbitai coderabbitai bot Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Brand label still shows “Horizon”, breaking the new branding

The <h1> still hard-codes “Horizon” while the logo/alt text switched to “Fundilla”. That will confuse users and quickly looks like an oversight.

-            <h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Horizon</h1>
+            <h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Fundilla</h1>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
src="/icons/logo.png"
width={34}
height={34}
alt="Horizon logo"
alt="Fundilla"
/>
<h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Horizon</h1>
</Link>
src="/icons/logo.png"
width={34}
height={34}
alt="Fundilla"
/>
<h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Fundilla</h1>
</Link>
🤖 Prompt for AI Agents
In components/MobileNav.tsx around lines 37 to 43, the <h1> element still
hardcodes the text "Horizon" which conflicts with the updated branding to
"Fundilla". Update the <h1> text content to "Fundilla" to match the logo alt
text and maintain consistent branding.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hlo

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sujitgabbar220-debug Hello! 👋

Is there anything specific you'd like me to help you with regarding this pull request or the branding consistency issue I flagged in the MobileNav component?

Comment on lines +19 to 26
src="/icons/logo.png"
width={34}
height={34}
alt="Horizon logo"
alt="Fundilla logo"
className="size-[24px] max-xl:size-14"
/>
<h1 className="sidebar-logo">Horizon</h1>
<h1 className="sidebar-logo">Fundilar</h1>
</Link>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Inconsistent brand spellings (“Fundilla” vs “Fundilar”)

The image alt says “Fundilla logo” but the heading says “Fundilar”. Decide on a single canonical brand name and use it everywhere to avoid user-visible typos.

🤖 Prompt for AI Agents
In components/Sidebar.tsx around lines 19 to 26, the brand name is
inconsistently spelled as "Fundilla" in the image alt text and "Fundilar" in the
heading. Choose the correct brand name and update both the alt attribute of the
image and the text inside the h1 element to use the same spelling consistently.

Comment on lines +90 to 96
src="/icons/logo-light.png"
width={140}
height={90}
alt="Fundilla"
/>
<h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Horizon</h1>
{/* <h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Fundillar</h1> */}
</Link>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Multiple issues with the header block

  1. Brand spelling again differs (“Fundilla” in alt, commented “Fundillar”).
  2. Dead commented code clutters the component.
  3. 140 × 90 logo might blow up the layout on mobile; all other places keep the logo ~34 px.

Consider:

-            <Image 
-              src="/icons/logo-light.png"
-              width={140}
-              height={90}
-              alt="Fundilla"
-            />
-            {/* <h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Fundillar</h1> */}
+            <Image 
+              src="/icons/logo-light.png"
+              width={34}
+              height={34}
+              alt="Fundilla logo"
+            />
+            <h1 className="text-26 font-ibm-plex-serif font-bold text-black-1">Fundilla</h1>
🤖 Prompt for AI Agents
In components/AuthForm.tsx around lines 90 to 96, the header block has
inconsistent brand spelling between the alt text ("Fundilla") and the
commented-out heading ("Fundillar"), contains dead commented code, and uses a
large 140x90 logo size that may disrupt mobile layout. Fix this by unifying the
brand spelling consistently across alt text and any visible text, removing the
commented-out heading entirely to clean up the code, and resizing the logo to
approximately 34 pixels in height to match other instances and maintain
responsive design.

"dwolla-v2": "^3.4.0",
"lucide-react": "^0.374.0",
"next": "14.2.3",
"next": "^14.2.29",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Loosening Next.js version may introduce breaking changes

Changing next to ^14.2.29 allows any 14.x minor/patch release. While usually safe, a minor bump can still ship breaking behaviour. Pin to the exact version or add a controlled update policy.

🤖 Prompt for AI Agents
In package.json at line 25, the Next.js version is specified with a caret (^),
allowing automatic updates to any 14.x minor or patch release, which may
introduce breaking changes. To fix this, change the version to the exact version
"14.2.29" without the caret to pin it precisely, or implement a controlled
update policy to manage version upgrades safely.

Comment on lines 4 to 23
#APPWRITE
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT=662cd3d0000d7d095714
APPWRITE_DATABASE_ID=662cd599000b133bfcd3
APPWRITE_USER_COLLECTION_ID=662cd5bb002792396b02
APPWRITE_BANK_COLLECTION_ID=662cd610000e0e283eb4
APPWRITE_TRANSACTION_COLLECTION_ID=662cd5fb000ceb06e8a6
NEXT_APPWRITE_KEY=c78d74bfcb9364a868b588056cdb00bd7328ad2629f9d97682a877f8662776289426ab7a5dcc1ca6cb4c6946b5a341ca73cd09f18dd0c01a11454aa75cf85a3cc4b0cc5f5cbc8872368aab3d24a13ff35ca45fac080bf0d8f575d84dec72ad0446b13752978c44d379ca85bdb690b7aa0523b44d9058a6da51c474ba54aef2d7
NEXT_PUBLIC_APPWRITE_PROJECT=682ff311003bf6d4cdfc
APPWRITE_DATABASE_ID=682ff352001a95f2126c
APPWRITE_USER_COLLECTION_ID=68300f260032a585c91b
APPWRITE_BANK_COLLECTION_ID=68300f9f0001d878cde3
APPWRITE_TRANSACTION_COLLECTION_ID=682ff3d1001f7fc0be59
NEXT_APPWRITE_KEY=standard_654ea0773601948c1f65be78cd3cc97f34309ae701e533cef6b89450b648ee4b4536c06fc4acc904e87256db46660afac2fdc759f555d12d803e83cd8590cea7c2cfda5b0b9786c5983f7e9e03c5899d84ff52dc6e17bcc3f01484cb8e2407debe8945b9fe702afe40344c66b2ea1938defcc52a4651bce6d77fb6e38809e674

#PLAID
PLAID_CLIENT_ID=662e1e5fdca064001c3e0086
PLAID_SECRET=be405988983be57fe34bef8e9038b3
PLAID_CLIENT_ID=683351e645aadd0023b5cec4
PLAID_SECRET=93f87ee12cbbbaf3c7f08a206913b5
PLAID_ENV=sandbox
PLAID_PRODUCTS=auth,transactions,identity
PLAID_COUNTRY_CODES=US,CA

#DWOLLA
DWOLLA_KEY=qAN5xkFYOSQeUNpN7GSPcGPHH8nSpVrPKSL8Ye5mSSP5AzddNt
DWOLLA_SECRET=FI50i6NbUQ90106Bt1n9bH6aCNWhcs8Rliy7VRqrXgNbKtLy00
DWOLLA_KEY=bmAjEwHJYNTpW1HiHXPXsfQKeEyiRhvIIvZFmvHMLT6iZCcASY
DWOLLA_SECRET=2SlZNMBI0t9PkpbukqRHNF7wWoMdcdSRPW3cIEcT5Z4LXFJrDs
DWOLLA_BASE_URL=https://api-sandbox.dwolla.com
Copy link

@coderabbitai coderabbitai bot Jul 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Hard-coded credentials committed – immediate security leak

Real Appwrite, Plaid and Dwolla secrets are now in the repo.
Even though .env was added to .gitignore, committing it once exposes the keys permanently (git history & any fork/clone). Rotate every key that appears here and delete the file from the repo history (git filter-repo / BFG) before merging.

Replace the committed file with a public template and keep real secrets only in local/CI vaults:

-#APPWRITE
-NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
-NEXT_PUBLIC_APPWRITE_PROJECT=682ff311003bf6d4cdfc
-APPWRITE_DATABASE_ID=682ff352001a95f2126c
-APPWRITE_USER_COLLECTION_ID=68300f260032a585c91b
-APPWRITE_BANK_COLLECTION_ID=68300f9f0001d878cde3
-APPWRITE_TRANSACTION_COLLECTION_ID=682ff3d1001f7fc0be59
-NEXT_APPWRITE_KEY=standard_654ea0773601948c1f65be78cd3cc97f34309ae701e533cef6b89450b648ee4b4536c06fc4acc904e87256db46660afac2fdc759f555d12d803e83cd8590cea7c2cfda5b0b9786c5983f7e9e03c5899d84ff52dc6e17bcc3f01484cb8e2407debe8945b9fe702afe40344c66b2ea1938defcc52a4651bce6d77fb6e38809e674
-
-#PLAID
-PLAID_CLIENT_ID=683351e645aadd0023b5cec4
-PLAID_SECRET=93f87ee12cbbbaf3c7f08a206913b5
-
-#DWOLLA
-DWOLLA_KEY=bmAjEwHJYNTpW1HiHXPXsfQKeEyiRhvIIvZFmvHMLT6iZCcASY
-DWOLLA_SECRET=2SlZNMBI0t9PkpbukqRHNF7wWoMdcdSRPW3cIEcT5Z4LXFJrDs
+### EXAMPLE ONLY – DO NOT COMMIT REAL SECRETS ###
+#APPWRITE
+NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
+NEXT_PUBLIC_APPWRITE_PROJECT=<project_id>
+APPWRITE_DATABASE_ID=<db_id>
+APPWRITE_USER_COLLECTION_ID=<collection_id>
+APPWRITE_BANK_COLLECTION_ID=<collection_id>
+APPWRITE_TRANSACTION_COLLECTION_ID=<collection_id>
+NEXT_APPWRITE_KEY=<server_key>
+
+#PLAID
+PLAID_CLIENT_ID=<client_id>
+PLAID_SECRET=<secret>
+
+#DWOLLA
+DWOLLA_KEY=<key>
+DWOLLA_SECRET=<secret>

Action items:

  1. Revoke & regenerate all exposed keys immediately.
  2. Purge the file from git history.
  3. Commit a *.env.example (placeholders) only.
  4. Rely on vault/CI secrets injection for deployments.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#APPWRITE
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT=662cd3d0000d7d095714
APPWRITE_DATABASE_ID=662cd599000b133bfcd3
APPWRITE_USER_COLLECTION_ID=662cd5bb002792396b02
APPWRITE_BANK_COLLECTION_ID=662cd610000e0e283eb4
APPWRITE_TRANSACTION_COLLECTION_ID=662cd5fb000ceb06e8a6
NEXT_APPWRITE_KEY=c78d74bfcb9364a868b588056cdb00bd7328ad2629f9d97682a877f8662776289426ab7a5dcc1ca6cb4c6946b5a341ca73cd09f18dd0c01a11454aa75cf85a3cc4b0cc5f5cbc8872368aab3d24a13ff35ca45fac080bf0d8f575d84dec72ad0446b13752978c44d379ca85bdb690b7aa0523b44d9058a6da51c474ba54aef2d7
NEXT_PUBLIC_APPWRITE_PROJECT=682ff311003bf6d4cdfc
APPWRITE_DATABASE_ID=682ff352001a95f2126c
APPWRITE_USER_COLLECTION_ID=68300f260032a585c91b
APPWRITE_BANK_COLLECTION_ID=68300f9f0001d878cde3
APPWRITE_TRANSACTION_COLLECTION_ID=682ff3d1001f7fc0be59
NEXT_APPWRITE_KEY=standard_654ea0773601948c1f65be78cd3cc97f34309ae701e533cef6b89450b648ee4b4536c06fc4acc904e87256db46660afac2fdc759f555d12d803e83cd8590cea7c2cfda5b0b9786c5983f7e9e03c5899d84ff52dc6e17bcc3f01484cb8e2407debe8945b9fe702afe40344c66b2ea1938defcc52a4651bce6d77fb6e38809e674
#PLAID
PLAID_CLIENT_ID=662e1e5fdca064001c3e0086
PLAID_SECRET=be405988983be57fe34bef8e9038b3
PLAID_CLIENT_ID=683351e645aadd0023b5cec4
PLAID_SECRET=93f87ee12cbbbaf3c7f08a206913b5
PLAID_ENV=sandbox
PLAID_PRODUCTS=auth,transactions,identity
PLAID_COUNTRY_CODES=US,CA
#DWOLLA
DWOLLA_KEY=qAN5xkFYOSQeUNpN7GSPcGPHH8nSpVrPKSL8Ye5mSSP5AzddNt
DWOLLA_SECRET=FI50i6NbUQ90106Bt1n9bH6aCNWhcs8Rliy7VRqrXgNbKtLy00
DWOLLA_KEY=bmAjEwHJYNTpW1HiHXPXsfQKeEyiRhvIIvZFmvHMLT6iZCcASY
DWOLLA_SECRET=2SlZNMBI0t9PkpbukqRHNF7wWoMdcdSRPW3cIEcT5Z4LXFJrDs
DWOLLA_BASE_URL=https://api-sandbox.dwolla.com
### EXAMPLE ONLY – DO NOT COMMIT REAL SECRETS ###
#APPWRITE
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT=<project_id>
APPWRITE_DATABASE_ID=<db_id>
APPWRITE_USER_COLLECTION_ID=<collection_id>
APPWRITE_BANK_COLLECTION_ID=<collection_id>
APPWRITE_TRANSACTION_COLLECTION_ID=<collection_id>
NEXT_APPWRITE_KEY=<server_key>
#PLAID
PLAID_CLIENT_ID=<client_id>
PLAID_SECRET=<secret>
PLAID_ENV=sandbox
PLAID_PRODUCTS=auth,transactions,identity
PLAID_COUNTRY_CODES=US,CA
#DWOLLA
DWOLLA_KEY=<key>
DWOLLA_SECRET=<secret>
DWOLLA_BASE_URL=https://api-sandbox.dwolla.com
🤖 Prompt for AI Agents
In the .env file from lines 4 to 23, real sensitive credentials for Appwrite,
Plaid, and Dwolla are hard-coded and committed, causing a security leak.
Immediately revoke and regenerate all exposed keys, then remove the .env file
from the git history using tools like git filter-repo or BFG. Replace the
committed .env with a .env.example file containing placeholder values only, and
ensure real secrets are managed securely via local environment variables or
CI/CD vaults without committing them to the repository.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8816891687

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sujitgabbar220-debug I see you've provided the number "8816891687" but I'm not sure what this refers to. Could you clarify what this number represents? Is it:

  • A phone number for contact regarding the security issue?
  • An incident/ticket ID?
  • Some other reference number?

Meanwhile, I want to emphasize that the security issue with the exposed credentials in the .env file is critical and needs immediate attention. The API keys for Appwrite, Plaid, and Dwolla that are currently committed to the repository should be:

  1. Revoked immediately from their respective service dashboards
  2. Regenerated with new credentials
  3. Removed from git history using tools like git filter-repo
  4. Replaced with a template file containing placeholder values

Please let me know what the number refers to so I can assist you appropriately with both that matter and the security remediation.

I-Onazi and others added 2 commits July 20, 2025 16:20
redefined submit function in authform and added error handling to sig…
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
lib/actions/user.actions.ts (1)

56-128: Use the correct Appwrite user‐deletion method

The deleteIdentity() call only removes a login provider, not the user record. On failure you need to delete the entire account. Update the cleanup to call the proper delete() endpoint (or, if using the Users service, users.delete(...)) instead:

• lib/actions/user.actions.ts line 116
– Replace
ts await account.deleteIdentity(newUserAccount.$id);
– With one of:
ts await account.delete(newUserAccount.$id);
or, if you’re using the Users service:
ts const users = new Users(client); await users.delete(newUserAccount.$id);

This ensures the full user record is removed on signup rollback.

♻️ Duplicate comments (1)
components/AuthForm.tsx (1)

113-118: Previous review comments still apply to this code

The issues previously identified remain unaddressed:

  • Brand name inconsistency ("Fundilla" vs "Fundillar")
  • Dead commented code cluttering the component
  • Oversized logo (140×90) that may disrupt mobile layouts
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3641e98 and cc7ff2a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • components/AuthForm.tsx (2 hunks)
  • lib/actions/user.actions.ts (3 hunks)
🧬 Code Graph Analysis (2)
components/AuthForm.tsx (1)
lib/actions/user.actions.ts (2)
  • signUp (56-128)
  • signIn (35-53)
lib/actions/user.actions.ts (3)
lib/appwrite.ts (3)
  • account (20-22)
  • account (33-35)
  • database (36-38)
lib/actions/dwolla.actions.ts (1)
  • createDwollaCustomer (54-64)
lib/utils.ts (2)
  • extractCustomerIdFromUrl (172-180)
  • parseStringify (79-79)
🧰 Additional context used
🧬 Code Graph Analysis (2)
components/AuthForm.tsx (1)
lib/actions/user.actions.ts (2)
  • signUp (56-128)
  • signIn (35-53)
lib/actions/user.actions.ts (3)
lib/appwrite.ts (3)
  • account (20-22)
  • account (33-35)
  • database (36-38)
lib/actions/dwolla.actions.ts (1)
  • createDwollaCustomer (54-64)
lib/utils.ts (2)
  • extractCustomerIdFromUrl (172-180)
  • parseStringify (79-79)
🔇 Additional comments (1)
lib/actions/user.actions.ts (1)

163-163: Good addition of transaction access

Adding the 'transactions' product enables the application to retrieve transaction data from linked accounts, which is essential for banking functionality.

Comment on lines +47 to +106
const onSubmit = async (data: z.infer<typeof formSchema>) => {
setIsLoading(true);

try {
if(type === 'sign-up') {
const userData = {
firstName: data.firstName!,
lastName: data.lastName!,
address1: data.address1!,
city: data.city!,
state: data.state!,
postalCode: data.postalCode!,
dateOfBirth: data.dateOfBirth!,
ssn: data.ssn!,
email: data.email,
password: data.password
}

try {
// Sign up with Appwrite & create plaid token
const newUser = await signUp(userData);

if(type === 'sign-up') {
const userData = {
firstName: data.firstName!,
lastName: data.lastName!,
address1: data.address1!,
city: data.city!,
state: data.state!,
postalCode: data.postalCode!,
dateOfBirth: data.dateOfBirth!,
ssn: data.ssn!,
email: data.email,
password: data.password
}

const newUser = await signUp(userData);

if (newUser) {
setUser(newUser);
} else {
throw new Error('Failed to create user');
}
} catch (signUpError) {
console.error('Sign up failed:', signUpError);
// Show error message to user
alert('Sign up failed. Please try again.');
return;
}
}

if(type === 'sign-in') {
const response = await signIn({
email: data.email,
password: data.password,
})

if(response) router.push('/')
if(type === 'sign-in') {
try {
const response = await signIn({
email: data.email,
password: data.password,
});

if(response) {
router.push('/');
} else {
throw new Error('Sign in failed');
}
} catch (error) {
console.log(error);
} finally {
setIsLoading(false);
} catch (signInError) {
console.error('Sign in failed:', signInError);
// Show error message to user
alert('Sign in failed. Please check your credentials.');
return;
}
}
} catch (error) {
console.error('Authentication error:', error);
alert('An error occurred. Please try again.');
} finally {
setIsLoading(false);
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace alert() with proper UI notifications

The error handling structure is much improved, but using alert() for error messages provides poor UX. Consider using a toast notification library or custom error components for better user experience.

-        alert('Sign up failed. Please try again.');
+        // Use a toast notification or error state
+        toast.error('Sign up failed. Please try again.');
-        alert('Sign in failed. Please check your credentials.');
+        // Use a toast notification or error state
+        toast.error('Sign in failed. Please check your credentials.');

Additionally, the outer catch block (lines 100-103) appears redundant since all error paths are already handled in the nested try-catch blocks. Consider removing it to simplify the code structure.

🤖 Prompt for AI Agents
In components/AuthForm.tsx from lines 47 to 106, replace all alert() calls used
for error messages with a proper UI notification system such as a toast
notification library or custom error components to improve user experience.
Also, remove the outer catch block around lines 100-103 since all errors are
already handled in the nested try-catch blocks, simplifying the code structure.

@sujitgabbar220-debug
Copy link

sujitgabbar220-debug commented Sep 13, 2025 via email

@sujitgabbar220-debug
Copy link

sujitgabbar220-debug commented Sep 13, 2025 via email

DWOLLA_KEY=qAN5xkFYOSQeUNpN7GSPcGPHH8nSpVrPKSL8Ye5mSSP5AzddNt
DWOLLA_SECRET=FI50i6NbUQ90106Bt1n9bH6aCNWhcs8Rliy7VRqrXgNbKtLy00
DWOLLA_KEY=bmAjEwHJYNTpW1HiHXPXsfQKeEyiRhvIIvZFmvHMLT6iZCcASY
DWOLLA_SECRET=2SlZNMBI0t9PkpbukqRHNF7wWoMdcdSRPW3cIEcT5Z4LXFJrDs

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello

#APPWRITE
NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT=662cd3d0000d7d095714
APPWRITE_DATABASE_ID=662cd599000b133bfcd3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello

@sujitgabbar220-debug
Copy link

sujitgabbar220-debug commented Sep 13, 2025 via email

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.

3 participants