A fun and educational web application that helps you understand the power of compound interest by showing how much money you could earn by investing in VTSAX instead of buying that impulse purchase. Featuring Augie's sassy commentary and Chewy product suggestions!
Try the calculator with different amounts to see Augie's investment advice in action:
- $100 โ See how it could grow to $259 (conservative) or $285 (optimistic)
- $500 โ Watch Augie suggest treats you could buy with the future value
- $1,000 โ Get inspired by JL Collins quotes about long-term investing
- Investment Calculator: Calculate 10-year projections for VTSAX investments with conservative and optimistic scenarios
- Real VTSAX Data: Fetches current 10-year average returns from Vanguard (with fallback)
- Augie's Commentary: Dynamic messages from Augie suggesting what treats/toys you could buy instead
- Chewy Integration: Shows real pet products you could purchase with the same amount
- Responsive Design: Works beautifully on desktop and mobile devices
- Edge Case Handling: Graceful handling of API failures, validation errors, and zero-item scenarios
- Node.js (version 16 or higher)
- npm or yarn
-
Clone or navigate to the project directory:
cd simple-path-calculator -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:3000
npm run buildThe built files will be in the dist directory.
simple-path-calculator/
โโโ src/
โ โโโ components/
โ โ โโโ InputForm.tsx # User input form for amount
โ โ โโโ ProjectionResults.tsx # Investment projection display
โ โ โโโ AugieMessage.tsx # Augie's commentary and product suggestions
โ โโโ utils/
โ โ โโโ finance.ts # Compound interest calculations
โ โ โโโ vanguardData.ts # VTSAX data fetching
โ โ โโโ chewyApi.ts # Chewy product data (mock implementation)
โ โโโ App.tsx # Main application component
โ โโโ main.tsx # Application entry point
โ โโโ index.css # Global styles
โโโ public/ # Static assets
โโโ package.json
โโโ vite.config.ts
โโโ README.md
The application attempts to fetch real VTSAX data but includes fallback values. To use real data:
-
Option 1: Financial API
- Sign up for Alpha Vantage or similar financial data API
- Add your API key to environment variables:
REACT_APP_FINANCIAL_API_KEY=your_api_key_here
-
Option 2: Custom Backend
- Create a backend service to scrape Vanguard data
- Update the
fetchVTSAXData()function insrc/utils/vanguardData.ts
Currently uses mock data. To integrate with real Chewy products:
-
Option 1: Chewy Affiliate API
- Apply for Chewy's affiliate program
- Update
src/utils/chewyApi.tswith real API calls
-
Option 2: Pet Product API
- Use a pet product aggregator API
- Update the
fetchFromPetProductAPI()function
- Place Augie's photo in the
public/directory - Update the
AugieMessage.tsxcomponent:<img src="/augie-photo.jpg" alt="Augie" className="augie-photo" />
The application uses CSS custom properties for easy theming. Key variables in src/index.css:
:root {
--primary-color: #667eea;
--secondary-color: #764ba2;
--success-color: #38a169;
--error-color: #e53e3e;
--text-color: #2d3748;
--background-color: #f7fafc;
}The app uses the compound interest formula:
FV = P ร (1 + r)^t
Where:
FV= Future ValueP= Principal (initial investment)r= Annual return ratet= Time period (10 years)
- Conservative: VTSAX 10-year return - 1%
- Optimistic: VTSAX 10-year return + 1%
- Fetches affordable pet products within the user's budget
- Calculates how many items can be purchased
- Displays sassy message with product suggestions
- Shows special message for amounts too small to buy anything
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production build
The project follows React best practices:
- Functional components with hooks
- TypeScript for type safety
- Modular component structure
- Comprehensive error handling
This project is licensed under the ISC License.
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test them locally
- Commit your changes:
git commit -m 'Add amazing feature' - Push to your branch:
git push origin feature/amazing-feature - Open a Pull Request
git clone https://github.com/your-username/simple-path-calculator.git
cd simple-path-calculator
npm install
npm run dev- ๐ Add more Augie photos or animations
- ๐ Integrate real-time VTSAX data from APIs
- ๐ Add more pet product categories
- ๐ก Include more JL Collins quotes
- ๐ฑ Improve mobile responsiveness
- ๐จ Enhance the UI/UX design
This application is for educational purposes only. Past performance does not guarantee future results. Always consult with a qualified financial advisor before making investment decisions.
Augie is the star of this application, providing witty commentary and practical advice about spending money on things that really matter - like treats and toys for good dogs!
Made with โค๏ธ for Augie and smart financial decisions