diff --git a/.env b/.env index 03c44e3..a6006fb 100644 --- a/.env +++ b/.env @@ -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 DWOLLA_BASE_URL=https://api-sandbox.dwolla.com DWOLLA_ENV=sandbox \ No newline at end of file diff --git a/.gitignore b/.gitignore index 0ea48f8..879d3ba 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ yarn-error.log* # local env files .env*.local +.env # vercel .vercel diff --git a/README.md b/README.md index 38d6279..24e8a15 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ If you prefer visual learning, this is the perfect resource for you. Follow our ## 🤖 Introduction -Built with Next.js, Horizon is a financial SaaS platform that connects to multiple bank accounts, displays transactions in real-time, allows users to transfer money to other platform users, and manages their finances altogether. +Built with Next.js, Fundilar is a financial SaaS platform that connects to multiple bank accounts, displays transactions in real-time, allows users to transfer money to other platform users, and manages their finances altogether. If you're getting started and need assistance or face any bugs, join our active Discord community with over **34k+** members. It's a place where people help each other out. diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx index e427477..202cbe0 100644 --- a/app/(auth)/layout.tsx +++ b/app/(auth)/layout.tsx @@ -11,7 +11,7 @@ export default function RootLayout({
Auth image
- logo + logo
diff --git a/app/layout.tsx b/app/layout.tsx index 6c3a90a..bdb4f72 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -12,10 +12,10 @@ const ibmPlexSerif = IBM_Plex_Serif({ }) export const metadata: Metadata = { - title: "Horizon", - description: "Horizon is a modern banking platform for everyone.", + title: "Fundilla", + description: "Fundilla is a modern banking platform for everyone.", icons: { - icon: '/icons/logo.svg' + icon: '/icons/logo.png' } }; diff --git a/components/AuthForm.tsx b/components/AuthForm.tsx index aa0f6f5..76b5396 100644 --- a/components/AuthForm.tsx +++ b/components/AuthForm.tsx @@ -41,58 +41,81 @@ const AuthForm = ({ type }: { type: string }) => { }, }) - // 2. Define a submit handler. - const onSubmit = async (data: z.infer) => { - setIsLoading(true); + + + // Updated onSubmit function for AuthForm.tsx +const onSubmit = async (data: z.infer) => { + 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); + } +} return (
Horizon logo -

Horizon

+ {/*

Fundillar

*/}
@@ -171,6 +194,6 @@ const AuthForm = ({ type }: { type: string }) => { )}
) -} +} export default AuthForm \ No newline at end of file diff --git a/components/Footer.tsx b/components/Footer.tsx index cd9998a..5249989 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -30,7 +30,7 @@ const Footer = ({ user, type = 'desktop' }: FooterProps) => {
- jsm + fundilla
) diff --git a/components/MobileNav.tsx b/components/MobileNav.tsx index 96c9b87..ef2547f 100644 --- a/components/MobileNav.tsx +++ b/components/MobileNav.tsx @@ -34,10 +34,10 @@ const MobileNav = ({ user }: MobileNavProps) => { Horizon logo

Horizon

diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index 1a42e6b..dd813da 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -16,13 +16,13 @@ const Sidebar = ({ user }: SiderbarProps) => {