-
Notifications
You must be signed in to change notification settings - Fork 932
Update my repo #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update my repo #103
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,22 +3,22 @@ NEXT_PUBLIC_SITE_URL=http://localhost:3000 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| #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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hello |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DWOLLA_BASE_URL=https://api-sandbox.dwolla.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
4
to
23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hard-coded credentials committed – immediate security leak Real Appwrite, Plaid and Dwolla secrets are now in the repo. 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:
📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 8816891687 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
Meanwhile, I want to emphasize that the security issue with the exposed credentials in the
Please let me know what the number refers to so I can assist you appropriately with both that matter and the security remediation. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DWOLLA_ENV=sandbox | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,7 @@ yarn-error.log* | |
|
|
||
| # local env files | ||
| .env*.local | ||
| .env | ||
|
|
||
| # vercel | ||
| .vercel | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -19,7 +19,7 @@ export default async function RootLayout({ | |||||||||
|
|
||||||||||
| <div className="flex size-full flex-col"> | ||||||||||
| <div className="root-layout"> | ||||||||||
| <Image src="/icons/logo.svg" width={30} height={30} alt="logo" /> | ||||||||||
| <Image src="/icons/logo.png" width={30} height={30} alt="logo" /> | ||||||||||
| <div> | ||||||||||
|
Comment on lines
+22
to
23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainAlt text & asset check
Also verify the PNG actually exists under 🏁 Script executed: #!/bin/bash
# Assert the file exists in the repo
fd -t f logo.png | head -n 5Length of output: 52 Improve image alt text for accessibility
In - <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
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| <MobileNav user={loggedIn} /> | ||||||||||
| </div> | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,58 +41,81 @@ const AuthForm = ({ type }: { type: string }) => { | |
| }, | ||
| }) | ||
|
|
||
| // 2. Define a submit handler. | ||
| const onSubmit = async (data: z.infer<typeof formSchema>) => { | ||
| setIsLoading(true); | ||
|
|
||
|
|
||
| // Updated onSubmit function for AuthForm.tsx | ||
| 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); | ||
| } | ||
| } | ||
|
Comment on lines
+47
to
+106
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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('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 |
||
|
|
||
| return ( | ||
| <section className="auth-form"> | ||
| <header className='flex flex-col gap-5 md:gap-8'> | ||
| <Link href="/" className="cursor-pointer flex items-center gap-1"> | ||
| <Image | ||
| src="/icons/logo.svg" | ||
| width={34} | ||
| height={34} | ||
| alt="Horizon logo" | ||
| 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> | ||
|
Comment on lines
+113
to
119
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Multiple issues with the header block
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 |
||
|
|
||
| <div className="flex flex-col gap-1 md:gap-3"> | ||
|
|
@@ -171,6 +194,6 @@ const AuthForm = ({ type }: { type: string }) => { | |
| )} | ||
| </section> | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| export default AuthForm | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -34,10 +34,10 @@ const MobileNav = ({ user }: MobileNavProps) => { | |||||||||||||||||||||||||||||||
| <SheetContent side="left" className="border-none bg-white"> | ||||||||||||||||||||||||||||||||
| <Link href="/" className="cursor-pointer flex items-center gap-1 px-4"> | ||||||||||||||||||||||||||||||||
| <Image | ||||||||||||||||||||||||||||||||
| src="/icons/logo.svg" | ||||||||||||||||||||||||||||||||
| 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> | ||||||||||||||||||||||||||||||||
|
Comment on lines
+37
to
43
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Brand label still shows “Horizon”, breaking the new branding The - <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
Suggested change
🤖 Prompt for AI AgentsThere was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hlo There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,13 +16,13 @@ const Sidebar = ({ user }: SiderbarProps) => { | |
| <nav className="flex flex-col gap-4"> | ||
| <Link href="/" className="mb-12 cursor-pointer flex items-center gap-2"> | ||
| <Image | ||
| src="/icons/logo.svg" | ||
| 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> | ||
|
Comment on lines
+19
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 |
||
|
|
||
| {sidebarLinks.map((item) => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello