mirror of
https://github.com/we-promise/sure.git
synced 2026-06-01 16:59:03 +00:00
Introduces retirement and FIRE (Financial Independence, Retire Early) planning as a new top-level feature in the sidebar navigation. Key features: - RetirementConfig model: stores retirement planning parameters per family (birth year, retirement age, target income, pension system, etc.) - PensionEntry model: tracks pension statements (Renteninformation) over time with pension points, current/projected monthly pension - German GRV pension calculations: - Estimated monthly pension from Entgeltpunkte x Rentenwert - After-tax pension estimation - Monthly pension gap analysis - FIRE calculations: - FIRE number (capital needed via 4% rule, inflation-adjusted) - FIRE progress percentage from current portfolio value - Estimated FIRE date (iterative monthly projection) - Required monthly savings to close pension gap - Dashboard view with overview cards, FIRE progress bar, assumptions panel, and pension history table with add/delete entries - Setup and edit views for configuring retirement parameters - Full i18n support (English + German) - Minitest coverage for models and controller Database: 2 new tables (retirement_configs, pension_entries) with UUID PKs Routes: singular resource with setup, add/destroy pension entry actions This is an initial implementation focused on the German GRV pension system. The architecture supports extending to other pension systems (custom/other). Open to suggestions and improvements from the community - contributions for additional pension systems, visualization charts, or calculation refinements are very welcome.
23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
<%= content_for :page_title, t(".page_title") %>
|
|
|
|
<div class="max-w-2xl mx-auto py-8 px-4">
|
|
<div class="mb-8 text-center">
|
|
<div class="inline-flex items-center justify-center w-14 h-14 bg-surface-inset rounded-full mb-4">
|
|
<%= icon("sun", size: "lg", class: "text-success") %>
|
|
</div>
|
|
<h1 class="text-2xl font-semibold text-primary"><%= t(".page_title") %></h1>
|
|
<p class="text-secondary mt-2"><%= t(".subtitle") %></p>
|
|
</div>
|
|
|
|
<div class="bg-container shadow-border-xs rounded-lg p-6">
|
|
<%= form_with model: @retirement_config, url: retirement_path, method: :post, class: "space-y-6" do |f| %>
|
|
<%= render "retirement/form_fields", f: f %>
|
|
|
|
<div class="flex justify-end gap-3 pt-4 border-t border-secondary">
|
|
<%= link_to t(".cancel"), root_path, class: "inline-flex items-center px-4 py-2 rounded-lg text-sm font-medium text-secondary hover:bg-surface-hover" %>
|
|
<%= f.submit t(".save"), class: "inline-flex items-center px-6 py-2 rounded-lg text-sm font-medium text-inverse bg-inverse hover:bg-inverse-hover cursor-pointer" %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</div>
|