A dashboard to track all your financial accounts in one place using Plaid API and Coinbase integration. Features include bank account balance tracking, cryptocurrency holdings, daily updates, and email notifications.
- Node.js (v18 or higher)
- npm or yarn
- A Plaid account (Development or Production)
- (Optional) Amazon SES account for email notifications
- Create a Plaid account
- Once logged in, go to the Keys section
- Copy your
client_id
and the appropriatesecret
(sandbox/development/production) - Note: For real bank connections, you'll need Development or Production credentials
- Go to Coinbase Developer Portal
- Click "New OAuth2 Application"
- Fill in the application details:
- Name: Personal Finance Dashboard (or your preferred name)
- Website URL: http://localhost:3000
- Redirect URLs: http://localhost:3000/api/crypto/oauth/callback
- Copy your
client_id
andclient_secret
- Note: The redirect URL must match exactly what you set in your
.env
file
-
Clone this repository:
git clone <repository-url> cd personal-finance-dashboard
-
Install dependencies:
npm install
-
Copy the example environment file:
cp .env.example .env
-
Update
.env
with your credentials:# Plaid API credentials PLAID_CLIENT_ID="your_client_id" PLAID_SECRET="your_secret" PLAID_ENV="development" # or "sandbox" or "production" # Coinbase API credentials COINBASE_CLIENT_ID="your_coinbase_client_id" COINBASE_CLIENT_SECRET="your_coinbase_client_secret" COINBASE_REDIRECT_URI="http://localhost:3000/api/crypto/oauth/callback" # Database DATABASE_URL="file:./dev.db" # Next Auth (generate a secret with: openssl rand -base64 32) NEXTAUTH_SECRET="your_generated_secret" NEXTAUTH_URL="http://localhost:3000"
- Initialize the database:
npx prisma db push
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser
-
For Bank Accounts:
- Click the "Connect Bank Account" button in the dashboard
- Follow the Plaid Link flow to connect your bank accounts
- Your accounts should appear in the dashboard immediately
-
For Coinbase:
- Click the "Connect Coinbase" button in the dashboard
- You'll be redirected to Coinbase to authorize the application
- After authorization, your Coinbase accounts and balances will appear in the dashboard
- Balances are automatically refreshed periodically
-
Refresh the page to see updated balances for all accounts
If you want to receive daily balance updates via email, follow these additional steps:
Add the following to your .env
file to enable email notifications:
EMAIL_HOST=email-smtp.us-east-1.amazonaws.com
EMAIL_PORT=587
EMAIL_USER=your_ses_smtp_username
EMAIL_PASSWORD=your_ses_smtp_password
EMAIL_FROM=your_verified_email@domain.com
-
Make the refresh script executable:
chmod +x scripts/refresh-data.sh
-
Create a logs directory:
mkdir logs
-
Test the script:
./scripts/refresh-data.sh
-
Open your crontab:
crontab -e
-
Add the following line to run the script daily at 6 AM:
0 6 * * * /full/path/to/scripts/refresh-data.sh >> /full/path/to/logs/refresh.log 2>&1
Replace
/full/path/to
with your actual project path. -
Save and exit the editor
-
Verify your cron job:
crontab -l
-
Check the logs for any errors:
tail -f logs/refresh.log
-
Common issues:
ITEM_LOGIN_REQUIRED
: You need to re-authenticate with your bankINVALID_CREDENTIALS
: Your bank credentials need updatingINSTITUTION_DOWN
: The bank's systems are temporarily unavailable
/src
- Application source code/app
- Next.js app router components/components
- Reusable React components/lib
- Utility functions and configurations
/scripts
- Automation scripts/prisma
- Database schema and migrations
Prisma Studio provides a modern interface to view and edit your database data:
-
Start Prisma Studio:
npx prisma studio
-
Open http://localhost:5555 in your browser
-
You can:
- View all your connected bank accounts
- See historical balance records
- Manage Plaid connections
- Export data as CSV
- Filter and sort records
Note: Be cautious when manually editing data as it might affect the application's functionality.
npm run dev
- Start development servernpm run build
- Build for productionnpm start
- Start production server./scripts/refresh-data.sh
- Manually run balance update
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.