diff --git a/.env.example b/.env.example index b6fa8374..31348766 100644 --- a/.env.example +++ b/.env.example @@ -58,5 +58,3 @@ NX_POSTMARK_API_TOKEN= # for now, they are still required. ######################################################################## NX_PLAID_SECRET= -NX_FINICITY_APP_KEY= -NX_FINICITY_PARTNER_SECRET= diff --git a/README.md b/README.md index 99a64fbf..257948e0 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ ## Backstory -We spent the better part of 2021/2022 building a personal finance + wealth management app called Maybe. Very full-featured, including an "Ask an Advisor" feature which connected users with an actual CFP/CFA to help them with their finances (all included in your subscription). +We spent the better part of 2021/2022 building a personal finance + wealth management app called, Maybe. Very full-featured, including an "Ask an Advisor" feature which connected users with an actual CFP/CFA to help them with their finances (all included in your subscription). -The business end of things didn't work out and so we shut things down mid-2023. +The business end of things didn't work out, and so we shut things down mid-2023. -We spent the better part of $1,000,000 building the app (employees + contractors, data providers/services, infrastructure, etc). +We spent the better part of $1,000,000 building the app (employees + contractors, data providers/services, infrastructure, etc.). We're now reviving the product as a fully open-source project. The goal is to let you run the app yourself, for free, and use it to manage your own finances and eventually offer a hosted version of the app for a small monthly fee. @@ -37,7 +37,7 @@ And dozens upon dozens of smaller features. This is the current state of building the app. We're actively working to make this process much more streamlined! -*You'll need Docker installed to run the app locally.* +_You'll need Docker installed to run the app locally._ [Docker Desktop](https://www.docker.com/products/docker-desktop/) is an easy way to get started. First, copy the `.env.example` file to `.env`: @@ -53,14 +53,14 @@ To enable transactional emails, you'll need to create a [Postmark](https://postm Maybe uses [Teller](https://teller.io/) for connecting financial accounts. To get started with Teller, you'll need to create an account. Once you've created an account: - Add your Teller application id to your `.env` file (`NEXT_PUBLIC_TELLER_APP_ID`). -- Download your authentication certificates from Teller, create a `certs` folder in the root of the project, and place your certs in that directory. You should have both a `certificate.pem` and `private_key.pem`. **NEVER** check these files into source control, the `.gitignore` file will prevent the `certs/` directory from being added, but please double check. +- Download your authentication certificates from Teller, create a `certs` folder in the root of the project, and place your certs in that directory. You should have both a `certificate.pem` and `private_key.pem`. **NEVER** check these files into source control, the `.gitignore` file will prevent the `certs/` directory from being added, but please double-check. - Set your `NEXT_PUBLIC_TELLER_ENV` and `NX_TELLER_ENV` to your desired environment. The default is `sandbox` which allows for testing with mock data. The login credentials for the sandbox environment are `username` and `password`. To connect to real financial accounts, you'll need to use the `development` environment. - Webhooks are not implemented yet, but you can populate the `NX_TELLER_SIGNING_SECRET` with the value from your Teller account. - We highly recommend checking out the [Teller docs](https://teller.io/docs) for more info. Then run the following yarn commands: -``` +```shell yarn install yarn run dev:services:all yarn prisma:migrate:dev @@ -95,7 +95,7 @@ To contribute, please see our [contribution guide](https://github.com/maybe-fina ## High-priority issues -The biggest focus at the moment is on getting the app functional without some previously key external services (namely Plaid and Finicity). +The biggest focus at the moment is on getting the app functional without some previously key external services (namely Plaid). You can view the current [high-priority issues here](https://github.com/maybe-finance/maybe/issues?q=is:issue+is:open+label:%22high+priority%22). Those are the most impactful issues to tackle first. diff --git a/apps/client/pages/_app.tsx b/apps/client/pages/_app.tsx index d1fb65c9..8b8c1c4a 100644 --- a/apps/client/pages/_app.tsx +++ b/apps/client/pages/_app.tsx @@ -33,16 +33,18 @@ Sentry.init({ // Providers and components only relevant to a logged-in user const WithAuth = function ({ children }: PropsWithChildren) { - const { data: session } = useSession() + const { data: session, status } = useSession() const router = useRouter() useEffect(() => { + if (status === 'loading') return + if (!session) { router.push('/login') } - }, [session, router]) + }, [session, status, router]) - if (session) { + if (session && status === 'authenticated') { return ( diff --git a/apps/client/pages/login.tsx b/apps/client/pages/login.tsx index aabcc715..a2c2dc2b 100644 --- a/apps/client/pages/login.tsx +++ b/apps/client/pages/login.tsx @@ -12,6 +12,7 @@ export default function LoginPage() { const [password, setPassword] = useState('') const [isValid, setIsValid] = useState(false) const [errorMessage, setErrorMessage] = useState(null) + const [isLoading, setIsLoading] = useState(false) const { data: session } = useSession() const router = useRouter() @@ -26,6 +27,7 @@ export default function LoginPage() { e.preventDefault() setErrorMessage(null) setPassword('') + setIsLoading(true) const response = await signIn('credentials', { email, @@ -35,9 +37,17 @@ export default function LoginPage() { if (response && response.error) { setErrorMessage(response.error) + setIsLoading(false) + setIsValid(false) } } + const onPasswordChange = (e: React.ChangeEvent) => { + setErrorMessage(null) + setPassword(e.target.value) + setIsValid(e.target.value.length > 0) + } + return ( <>