A personal finance application designed to provide users with a clear and simple overview of their spending habits.
What I Spent helps you understand where your money goes. By securely connecting to your bank accounts via Plaid, it automatically imports transactions and provides insights into your spending on a daily, weekly, and monthly basis. Access requires a monthly subscription managed via Stripe.
This starter aims to provide a solid foundation with:
- Secure bank integration using Plaid.
- Subscription management via Stripe.
- Preconfigured shadcn/ui components.
- Best practices for Wasp development baked in.
- Dashboard Summary: See spending for Today, This Week, and This Month at a glance.
- Monthly Comparison Chart: Visualize spending trends over the past months.
- Spending Categories: Understand spending distribution across categories like Food, Shopping, etc.
- Detailed Transaction List: View all imported transactions with details.
- Secure Bank Connection: Easily link bank accounts using Plaid Link.
- Subscription Management: Handle subscriptions securely via Stripe Checkout and Customer Portal.
-
Install Wasp: If you haven't already, install Wasp:
curl -sSL https://get.wasp-lang.dev/installer.sh | shFollow the instructions provided by the installer.
-
Clone or Use Template: Click "Use this template" or clone the repository:
git clone <repository-url> cd <repository-directory>
-
Install Dependencies: Run
wasp start dbwasp db migrate-dev -
Environment Variables (
.env.server):- Create a
.env.serverfile in the project root. - Plaid: Add your Plaid API keys (use Sandbox keys for local
development, obtainable from
Plaid Dashboard):
PLAID_CLIENT_ID=your_plaid_client_id PLAID_SECRET_KEY_SANDBOX=your_plaid_sandbox_secret # PLAID_ENV=sandbox (Optional, depending on client implementation)
- Stripe:
- Get API keys from Stripe Dashboard.
- Create a Product (e.g., "What I Spent Standard") and a Price
(e.g., $4.99/month recurring) in your Stripe Dashboard. Copy the Price
ID (it looks like
price_xxx). - Add the keys and Price ID to
.env.server:
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key STRIPE_PRICE_ID=price_your_stripe_price_id
- Encryption Key: Generate a secret key for encrypting Plaid access
tokens:
Add the generated key to
# Run this in your terminal and copy the output node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
.env.server:ENCRYPTION_KEY=your_generated_32_byte_hex_key
- Database: Ensure your database URL is set (Wasp usually handles this
via
DATABASE_URLin.env.serverif not using the default SQLite or managed Postgres):# Example for external Postgres: # DATABASE_URL="postgresql://user:password@host:port/dbname"
- Client URL: Add the base URL of your frontend application for Stripe
redirects:
CLIENT_URL="http://localhost:3000"
- Create a
-
Database Setup:
- Run migrations:
wasp db migrate-dev
- (Optional) If using Wasp's built-in local Postgres development database
(requires Docker), you might need
wasp db startfirst. This is often not needed if you letwasp startmanage it or use SQLite/external DB.
- Run migrations:
-
Stripe Webhook (Local Testing):
- Install the Stripe CLI.
- Run the following command in a separate terminal to forward webhooks to
your local Wasp app:
stripe listen --forward-to http://localhost:3001/stripe-webhooks
- The command will output a webhook signing secret (looks like
whsec_xxx). Add this to your.env.server:STRIPE_WEBHOOK_SECRET=whsec_your_stripe_webhook_secret
-
Plaid Webhook (Local Testing):
- Install ngrok to expose your local server:
brew install ngrok # macOS # or download from https://ngrok.com/download
- Run ngrok in a separate terminal:
ngrok http 3001
- Copy the HTTPS forwarding URL (e.g.,
https://abc123.ngrok.io) - Update
.env.serverwith the webhook URL:PLAID_WEBHOOK_URL=https://abc123.ngrok.io/plaid-webhooks
- Restart your Wasp server to pick up the new webhook URL
- Install ngrok to expose your local server:
-
Run the App:
wasp start
Visit the running application (usually http://localhost:3000).
Run these commands in separate terminals:
# Terminal 1 - Main app
wasp start
# Terminal 2 - Stripe webhooks
stripe listen --forward-to http://localhost:3001/stripe-webhooks
# Terminal 3 - Plaid webhooks (copy the ngrok URL to .env.server)
ngrok http 3001We welcome contributions! Whether it's:
- 🐛 Bug fixes
- ✨ New features
- 📝 Documentation improvements
- 💡 Suggestions
Feel free to open an issue or submit a pull request.
MIT License - feel free to use this in your own projects!