A modern web application that projects your future life based on current lifestyle choices, combining health, climate, and financial data with AI-powered storytelling and personalized recommendations.
- Life Projection Engine: Advanced algorithms calculate health, climate, and financial projections based on user inputs
- AI Storytelling: Gemini AI generates personalized narratives about your future self in 2049
- Interactive Visualizations: Dynamic charts showing 25-year projections and trends
- Scenario Comparison: Save and compare different lifestyle choices side by side
- Goal Tracking: Set personal improvement targets with progress monitoring
- Life expectancy calculations based on sleep, diet, and exercise habits
- Health score tracking over time
- Personalized benefits and risk factor analysis
- Research-based multipliers for lifestyle impacts
- Annual CO₂ footprint calculation from commute and lifestyle choices
- Tree equivalent visualizations for environmental impact
- Cumulative environmental impact over 25 years
- Actionable climate improvement suggestions
- Compound interest calculations for savings growth
- 25-year wealth accumulation projections
- Monthly contribution tracking
- Investment growth visualizations
- Personalized Stories: Gemini AI crafts engaging narratives about your future life
- Smart Suggestions: AI analyzes your lifestyle and provides improvement recommendations
- Goal Setting: Intelligent goal suggestions based on your current habits
- Modern Design: Animated backgrounds, floating cards, and interactive elements
- Responsive Layout: Optimized for desktop and mobile devices
- Real-time Updates: Instant feedback and dynamic visualizations
- Share Results: Generate shareable links for your projections
- Frontend: Next.js 14 with App Router, React 18, TypeScript
- Styling: Tailwind CSS v4, shadcn/ui components, custom animations
- Charts: Recharts for data visualization
- AI Integration: Google Gemini API for storytelling and suggestions
- State Management: React hooks and context
- Data Storage: In-memory storage for scenarios and shared results
- Sleep impact: Based on sleep research showing optimal 7-9 hours
- Diet multipliers: Vegetarian/vegan (+2-3 years), balanced diet (+1 year)
- Exercise benefits: Regular exercise adds 3-7 years to life expectancy
- Screen time effects: Excessive screen time reduces life expectancy
- Commute CO₂ emissions: Real-world data for different transportation methods
- Diet carbon footprint: Meat consumption vs. plant-based diets
- Tree equivalents: ~40 trees needed to offset 1 ton of CO₂ annually
- Compound interest formula: A = P(1 + r/n)^(nt)
- Assumed 5% annual return (conservative market average)
- Monthly contribution compounding
app/page.tsx- Main application with form and results displaylib/simulation-engine.ts- Core calculation logic for all projectionscomponents/projection-charts.tsx- Interactive data visualizationscomponents/goal-tracker.tsx- Goal setting and progress monitoring
components/animated-background.tsx- Dynamic background with floating orbscomponents/floating-card.tsx- Animated card componentscomponents/interactive-button.tsx- Enhanced button with hover effects
app/api/generate-story/route.ts- Gemini AI story generationapp/api/generate-suggestions/route.ts- AI-powered improvement suggestionsapp/api/share-results/route.ts- Create shareable result linksapp/api/save-scenario/route.ts- Save user scenarios
-
Clone the repository ```bash git clone cd future-you-simulator ```
-
Install dependencies ```bash npm install ```
-
Environment Variables Create a
.env.localfile with: ``` GEMINI_API_KEY=your_gemini_api_key_here ``` -
Run the development server ```bash npm run dev ```
-
Open in browser Navigate to
http://localhost:3000
The application follows modern design principles with:
- Gradient Aesthetics: Blue-to-purple gradients with accent colors
- Animated Interactions: Floating elements, hover effects, and smooth transitions
- Accessibility First: Proper contrast ratios, semantic HTML, and screen reader support
- Mobile Responsive: Optimized layouts for all device sizes
- Database Integration: Persistent storage for user accounts and scenarios
- Social Features: Share and compare results with friends
- Advanced AI: More sophisticated lifestyle analysis and recommendations
- Gamification: Achievement system and progress rewards
- Expert Insights: Integration with health and financial professionals
The app tracks user engagement through:
- Scenario creation and comparison rates
- AI story generation success rates
- Goal setting and achievement tracking
- Share link creation and usage
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for a better future