@jjlmoya/utils-finance 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/package.json +64 -0
  2. package/src/category/i18n/en.ts +159 -0
  3. package/src/category/i18n/es.ts +159 -0
  4. package/src/category/i18n/fr.ts +159 -0
  5. package/src/category/index.ts +24 -0
  6. package/src/category/seo.astro +15 -0
  7. package/src/components/PreviewNavSidebar.astro +116 -0
  8. package/src/components/PreviewToolbar.astro +143 -0
  9. package/src/data.ts +11 -0
  10. package/src/env.d.ts +5 -0
  11. package/src/index.ts +32 -0
  12. package/src/layouts/PreviewLayout.astro +117 -0
  13. package/src/pages/[locale]/[slug].astro +146 -0
  14. package/src/pages/[locale].astro +251 -0
  15. package/src/pages/index.astro +4 -0
  16. package/src/tests/faq_count.test.ts +19 -0
  17. package/src/tests/locale_completeness.test.ts +39 -0
  18. package/src/tests/mocks/astro_mock.js +2 -0
  19. package/src/tests/no_h1_in_components.test.ts +48 -0
  20. package/src/tests/schemas_fulfillment.test.ts +23 -0
  21. package/src/tests/seo_length.test.ts +23 -0
  22. package/src/tests/title_quality.test.ts +55 -0
  23. package/src/tests/tool_validation.test.ts +17 -0
  24. package/src/tool/compoundInterest/bibliography.astro +14 -0
  25. package/src/tool/compoundInterest/component.astro +697 -0
  26. package/src/tool/compoundInterest/i18n/en.ts +212 -0
  27. package/src/tool/compoundInterest/i18n/es.ts +212 -0
  28. package/src/tool/compoundInterest/i18n/fr.ts +212 -0
  29. package/src/tool/compoundInterest/index.ts +34 -0
  30. package/src/tool/compoundInterest/logic.ts +40 -0
  31. package/src/tool/compoundInterest/seo.astro +14 -0
  32. package/src/tool/compoundInterest/ui.ts +19 -0
  33. package/src/tool/courtFeeCalculator/bibliography.astro +14 -0
  34. package/src/tool/courtFeeCalculator/component.astro +427 -0
  35. package/src/tool/courtFeeCalculator/i18n/en.ts +268 -0
  36. package/src/tool/courtFeeCalculator/i18n/es.ts +268 -0
  37. package/src/tool/courtFeeCalculator/i18n/fr.ts +268 -0
  38. package/src/tool/courtFeeCalculator/index.ts +33 -0
  39. package/src/tool/courtFeeCalculator/logic.ts +86 -0
  40. package/src/tool/courtFeeCalculator/seo.astro +14 -0
  41. package/src/tool/courtFeeCalculator/ui.ts +31 -0
  42. package/src/tool/debtSnowball/bibliography.astro +14 -0
  43. package/src/tool/debtSnowball/component.astro +1052 -0
  44. package/src/tool/debtSnowball/i18n/en.ts +288 -0
  45. package/src/tool/debtSnowball/i18n/es.ts +288 -0
  46. package/src/tool/debtSnowball/i18n/fr.ts +288 -0
  47. package/src/tool/debtSnowball/index.ts +37 -0
  48. package/src/tool/debtSnowball/logic.ts +156 -0
  49. package/src/tool/debtSnowball/seo.astro +14 -0
  50. package/src/tool/debtSnowball/ui.ts +49 -0
  51. package/src/tool/fireCalculator/bibliography.astro +14 -0
  52. package/src/tool/fireCalculator/component.astro +689 -0
  53. package/src/tool/fireCalculator/i18n/en.ts +261 -0
  54. package/src/tool/fireCalculator/i18n/es.ts +261 -0
  55. package/src/tool/fireCalculator/i18n/fr.ts +261 -0
  56. package/src/tool/fireCalculator/index.ts +33 -0
  57. package/src/tool/fireCalculator/logic.ts +108 -0
  58. package/src/tool/fireCalculator/seo.astro +14 -0
  59. package/src/tool/fireCalculator/ui.ts +33 -0
  60. package/src/tool/ibanBicSwiftConverter/bibliography.astro +14 -0
  61. package/src/tool/ibanBicSwiftConverter/component.astro +581 -0
  62. package/src/tool/ibanBicSwiftConverter/i18n/en.ts +167 -0
  63. package/src/tool/ibanBicSwiftConverter/i18n/es.ts +216 -0
  64. package/src/tool/ibanBicSwiftConverter/i18n/fr.ts +167 -0
  65. package/src/tool/ibanBicSwiftConverter/index.ts +33 -0
  66. package/src/tool/ibanBicSwiftConverter/logic.ts +101 -0
  67. package/src/tool/ibanBicSwiftConverter/seo.astro +14 -0
  68. package/src/tool/ibanBicSwiftConverter/ui.ts +17 -0
  69. package/src/tool/inflation/bibliography.astro +14 -0
  70. package/src/tool/inflation/component.astro +400 -0
  71. package/src/tool/inflation/i18n/en.ts +301 -0
  72. package/src/tool/inflation/i18n/es.ts +301 -0
  73. package/src/tool/inflation/i18n/fr.ts +301 -0
  74. package/src/tool/inflation/index.ts +34 -0
  75. package/src/tool/inflation/logic.ts +92 -0
  76. package/src/tool/inflation/seo.astro +14 -0
  77. package/src/tool/inflation/ui.ts +17 -0
  78. package/src/tool/lateInterest/bibliography.astro +14 -0
  79. package/src/tool/lateInterest/component.astro +655 -0
  80. package/src/tool/lateInterest/i18n/en.ts +255 -0
  81. package/src/tool/lateInterest/i18n/es.ts +224 -0
  82. package/src/tool/lateInterest/i18n/fr.ts +224 -0
  83. package/src/tool/lateInterest/index.ts +34 -0
  84. package/src/tool/lateInterest/logic.ts +89 -0
  85. package/src/tool/lateInterest/seo.astro +14 -0
  86. package/src/tool/lateInterest/ui.ts +33 -0
  87. package/src/tool/legalInterestRate/bibliography.astro +14 -0
  88. package/src/tool/legalInterestRate/component.astro +650 -0
  89. package/src/tool/legalInterestRate/i18n/en.ts +159 -0
  90. package/src/tool/legalInterestRate/i18n/es.ts +159 -0
  91. package/src/tool/legalInterestRate/i18n/fr.ts +159 -0
  92. package/src/tool/legalInterestRate/index.ts +33 -0
  93. package/src/tool/legalInterestRate/logic.ts +29 -0
  94. package/src/tool/legalInterestRate/seo.astro +14 -0
  95. package/src/tool/legalInterestRate/ui.ts +23 -0
  96. package/src/tool/lotteryOptimizer/bibliography.astro +14 -0
  97. package/src/tool/lotteryOptimizer/component.astro +863 -0
  98. package/src/tool/lotteryOptimizer/i18n/en.ts +188 -0
  99. package/src/tool/lotteryOptimizer/i18n/es.ts +281 -0
  100. package/src/tool/lotteryOptimizer/i18n/fr.ts +188 -0
  101. package/src/tool/lotteryOptimizer/index.ts +33 -0
  102. package/src/tool/lotteryOptimizer/logic.ts +133 -0
  103. package/src/tool/lotteryOptimizer/seo.astro +14 -0
  104. package/src/tool/lotteryOptimizer/ui.ts +33 -0
  105. package/src/tool/mortgage/bibliography.astro +14 -0
  106. package/src/tool/mortgage/component.astro +1030 -0
  107. package/src/tool/mortgage/i18n/en.ts +227 -0
  108. package/src/tool/mortgage/i18n/es.ts +227 -0
  109. package/src/tool/mortgage/i18n/fr.ts +227 -0
  110. package/src/tool/mortgage/index.ts +34 -0
  111. package/src/tool/mortgage/logic.ts +118 -0
  112. package/src/tool/mortgage/seo.astro +14 -0
  113. package/src/tool/mortgage/ui.ts +35 -0
  114. package/src/tool/percentageCalculator/bibliography.astro +14 -0
  115. package/src/tool/percentageCalculator/component.astro +640 -0
  116. package/src/tool/percentageCalculator/i18n/en.ts +233 -0
  117. package/src/tool/percentageCalculator/i18n/es.ts +233 -0
  118. package/src/tool/percentageCalculator/i18n/fr.ts +233 -0
  119. package/src/tool/percentageCalculator/index.ts +34 -0
  120. package/src/tool/percentageCalculator/logic.ts +48 -0
  121. package/src/tool/percentageCalculator/seo.astro +14 -0
  122. package/src/tool/percentageCalculator/ui.ts +30 -0
  123. package/src/tool/rentIncreaseCalculator/bibliography.astro +14 -0
  124. package/src/tool/rentIncreaseCalculator/component.astro +587 -0
  125. package/src/tool/rentIncreaseCalculator/i18n/en.ts +159 -0
  126. package/src/tool/rentIncreaseCalculator/i18n/es.ts +220 -0
  127. package/src/tool/rentIncreaseCalculator/i18n/fr.ts +159 -0
  128. package/src/tool/rentIncreaseCalculator/index.ts +33 -0
  129. package/src/tool/rentIncreaseCalculator/logic.ts +43 -0
  130. package/src/tool/rentIncreaseCalculator/seo.astro +14 -0
  131. package/src/tool/rentIncreaseCalculator/ui.ts +19 -0
  132. package/src/tools.ts +16 -0
  133. package/src/types.ts +74 -0
@@ -0,0 +1,227 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { MortgageUI } from '../ui';
4
+
5
+ const slug = 'mortgage-calculator';
6
+ const title = 'Mortgage Calculator: Full Amortization Table and Payoff Strategy';
7
+ const description =
8
+ 'Calculate your monthly mortgage payment, discover total interest costs, and visualize your complete French amortization schedule instantly.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'What is the French amortization system?',
13
+ answer:
14
+ 'It is the most commonly used system in Europe. Your monthly payment stays the same, but at the beginning you pay almost all interest with very little principal. At the end, it reverses. This is why early mortgage prepayment is most valuable in the first years.',
15
+ },
16
+ {
17
+ question: 'Fixed rate or variable rate in 2026?',
18
+ answer:
19
+ 'Fixed rate: you pay more now but sleep soundly for 30 years. Variable rate: might be cheaper today, but if interest rates spike to 4-5%, your payment could skyrocket and strangle your finances. It depends on your risk tolerance.',
20
+ },
21
+ {
22
+ question: 'How much do I save if I prepay $10,000?',
23
+ answer:
24
+ 'It depends on timing. If you prepay in year 1 of a $200,000 mortgage at 3%, you could save over $15,000 in interest. If you do it in year 20, you barely save $2,000. Timing is critical.',
25
+ },
26
+ {
27
+ question: 'What percentage of my income should go to mortgage?',
28
+ answer:
29
+ 'Financial advisors recommend not exceeding 28-31% of gross monthly income (housing ratio). Some allow up to 43% debt-to-income including all obligations. Exceeding these thresholds increases default risk during emergencies.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Enter the loan amount',
36
+ text: 'Type the total amount you need to borrow from the lender (minus your down payment).',
37
+ },
38
+ {
39
+ name: 'Adjust the interest rate',
40
+ text: 'Input the APR (Annual Percentage Rate) offered by the lender. You can compare fixed or variable options.',
41
+ },
42
+ {
43
+ name: 'Choose your repayment period',
44
+ text: 'Define how many years you want to pay off the loan. More years mean lower monthly payment but higher total interest.',
45
+ },
46
+ {
47
+ name: 'Review the amortization schedule',
48
+ text: 'Examine month-by-month how your debt decreases and what portion of each payment goes to interest vs principal.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step, i) => ({
68
+ '@type': 'HowToStep',
69
+ position: i + 1,
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'FinanceApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'USD' },
83
+ inLanguage: 'en',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<MortgageUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faqTitle: 'Frequently Asked Questions',
91
+ faq: faqData,
92
+ bibliographyTitle: 'Sources & References',
93
+ bibliography: [
94
+ {
95
+ name: 'Federal Reserve: Mortgage Basics and Types',
96
+ url: 'https://www.federalreserve.gov/pubs/Mortgage_Basics/',
97
+ },
98
+ {
99
+ name: 'HUD: Understanding Mortgages and Financing',
100
+ url: 'https://www.hud.gov/',
101
+ },
102
+ {
103
+ name: 'Consumer Financial Protection Bureau: Buying a Home Guide',
104
+ url: 'https://www.consumerfinance.gov/',
105
+ },
106
+ {
107
+ name: 'Investopedia: Mortgage Definition and Amortization Schedules',
108
+ url: 'https://www.investopedia.com/terms/m/mortgage.asp',
109
+ },
110
+ ],
111
+ howTo: howToData,
112
+ schemas: [faqSchema, howToSchema, appSchema],
113
+ seo: [
114
+ {
115
+ type: 'title',
116
+ text: 'Complete Mortgage Guide: How the Amortization System Works',
117
+ level: 2,
118
+ },
119
+ {
120
+ type: 'paragraph',
121
+ html: 'A mortgage is likely the largest debt you will ever take. Understanding how the amortization system works is crucial for making smart financial decisions that could save you tens of thousands of dollars.',
122
+ },
123
+ {
124
+ type: 'title',
125
+ text: 'The "Trap" of Front-Loaded Interest: Understanding Your Payment Breakdown',
126
+ level: 3,
127
+ },
128
+ {
129
+ type: 'paragraph',
130
+ html: 'In most countries, mortgages use the <strong>standard amortization system</strong>. Its characteristic is that your monthly payment remains the same (if fixed rate), but the composition changes dramatically over time.',
131
+ },
132
+ {
133
+ type: 'tip',
134
+ title: 'How Your Payment Evolves',
135
+ html: '<p><strong>Early Years (Years 1-10):</strong> You pay almost entirely INTEREST and very little principal. On a $250,000 mortgage at 3%, your first payment could be 80% interest.</p><p><strong>Middle Years (Years 11-25):</strong> The proportion gradually balances.</p><p><strong>Final Years (Years 26-30):</strong> You pay almost entirely PRINCIPAL with very little interest.</p>',
136
+ },
137
+ {
138
+ type: 'paragraph',
139
+ html: 'This is why <strong>making extra mortgage payments</strong> (paying down principal early) is far more profitable in the first years. Paying an extra $10,000 in year 1 can save you over $15,000 in interest. The same extra payment in year 20 saves you barely $2,000.',
140
+ },
141
+ {
142
+ type: 'title',
143
+ text: 'How Much Should You Spend on Your Mortgage?',
144
+ level: 3,
145
+ },
146
+ {
147
+ type: 'paragraph',
148
+ html: 'Financial experts recommend your mortgage <strong>should not exceed 28-35% of your gross monthly income</strong>. If you exceed this threshold, you significantly increase the risk of default when unexpected expenses arise (job loss, medical emergency, etc.).',
149
+ },
150
+ {
151
+ type: 'title',
152
+ text: '2026 Context: Fixed vs. Variable Rate',
153
+ level: 3,
154
+ },
155
+ {
156
+ type: 'paragraph',
157
+ html: 'With fluctuating interest rates, choosing between <strong>Fixed Rate</strong> or <strong>Variable Rate</strong> is a strategic decision that can cost thousands annually.',
158
+ },
159
+ {
160
+ type: 'comparative',
161
+ columns: 2,
162
+ items: [
163
+ {
164
+ title: 'Fixed Rate',
165
+ description: 'You pay slightly more now, but sleep soundly knowing your payment will never change.',
166
+ points: [
167
+ 'Predictable payment for 30 years',
168
+ 'Protection against rate increases',
169
+ 'Peace of mind in uncertain economy',
170
+ 'Ideal for tight budgets',
171
+ ],
172
+ },
173
+ {
174
+ title: 'Variable Rate',
175
+ description: 'It may be cheaper today, but exposes your finances to volatility.',
176
+ highlight: true,
177
+ points: [
178
+ 'Lower initial payment',
179
+ 'Risk of rate increases (4-5% possible)',
180
+ 'Potentially severe budget impact',
181
+ 'Only for those who tolerate high risk',
182
+ ],
183
+ },
184
+ ],
185
+ },
186
+ {
187
+ type: 'tip',
188
+ title: 'Fixed vs. Variable: It Depends on Your Profile',
189
+ html: '<p><strong>Choose Fixed Rate if:</strong> Your budget is tight, you seek certainty, you cannot tolerate payment surprises.</p><p><strong>Choose Variable Rate if:</strong> You have a financial cushion, believe rates will fall, your mortgage is small or short-term.</p>',
190
+ },
191
+ ],
192
+ ui: {
193
+ labelTitle: 'Mortgage Calculator',
194
+ labelLoanAmount: 'Loan Amount',
195
+ labelInterestRate: 'Interest Rate (APR)',
196
+ labelYears: 'Loan Term (Years)',
197
+ labelMonthlyExtra: 'Add Extra Monthly Payment',
198
+ labelMonthlyPayment: 'Monthly Payment',
199
+ labelMonthCount: 'months',
200
+ labelSavingsCard: 'Your Savings Potential',
201
+ labelSavingsInterest: 'Interest',
202
+ labelSavingsTime: 'Time',
203
+ labelTimelineComparison: 'Temporal Comparison',
204
+ labelTimelineOriginal: 'Original Duration',
205
+ labelTimelineOptimized: 'Duration with Extra Payments',
206
+ labelCostBreakdown: 'Total Cost Breakdown',
207
+ labelBorrowed: 'Borrowed',
208
+ labelTotalBorrowed: 'Total Borrowed',
209
+ labelTotalInterest: 'Total Interest',
210
+ labelAmortizationTable: 'Amortization Schedule',
211
+ labelTableHeader: 'View full table',
212
+ labelViewAll: 'View all',
213
+ labelPaid: 'Mortgage Paid Off',
214
+ labelTableMonth: 'Month',
215
+ labelTableInterest: 'Interest',
216
+ labelTablePrincipal: 'Principal',
217
+ labelTableExtra: 'Extra',
218
+ labelTableBalance: 'Balance',
219
+ labelMoreMonths: 'more months',
220
+ labelMonth: 'Month',
221
+ currencySymbol: '$',
222
+ currencyCode: 'USD',
223
+ currencyLocale: 'en-US',
224
+ monthPlural: 'months',
225
+ yearPlural: 'years',
226
+ },
227
+ };
@@ -0,0 +1,227 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { MortgageUI } from '../ui';
4
+
5
+ const slug = 'simulador-hipoteca';
6
+ const title = 'Simulador de Hipoteca y Tabla de Amortización Francesa';
7
+ const description =
8
+ 'Calcula tu cuota hipotecaria mensual, descubre cuánto pagarás en intereses y visualiza tu cuadro de amortización completo al instante.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: '¿Qué es el sistema de amortización francés?',
13
+ answer:
14
+ 'Es el sistema más usado en España. La cuota mensual es siempre la misma, pero al principio pagas casi todo en intereses y muy poco capital. Al final, es al revés. Por eso amortizar anticipadamente es más rentable en los primeros años.',
15
+ },
16
+ {
17
+ question: '¿Tipo fijo o variable en 2026?',
18
+ answer:
19
+ 'Tipo fijo: pagas más ahora pero duermes tranquilo 30 años. Tipo variable: puede ser más barato hoy, pero si el Euribor sube al 4-5%, tu cuota puede dispararse y asfixiar tu economía. Depende de tu aversión al riesgo.',
20
+ },
21
+ {
22
+ question: '¿Cuánto me ahorro si amortizo 10.000€ anticipadamente?',
23
+ answer:
24
+ 'Depende del momento. Si amortizan en el año 1 de una hipoteca de 200.000€ al 3%, puedes ahorrarte más de 15.000€ en intereses. Si lo haces en el año 20, apenas ahorras 2.000€. El timing es crucial.',
25
+ },
26
+ {
27
+ question: '¿Qué porcentaje de mi sueldo debería destinar a la hipoteca?',
28
+ answer:
29
+ 'La recomendación del Banco de España es no superar el 30-35% de tus ingresos netos mensuales (incluyendo otras deudas). Superar este umbral aumenta significativamente el riesgo de impago ante imprevistos.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Introducir el importe del préstamo',
36
+ text: 'Escribe la cantidad total que necesitas solicitar al banco (restando tus ahorros aportados como entrada).',
37
+ },
38
+ {
39
+ name: 'Ajustar el tipo de interés',
40
+ text: 'Introduce el TIN (Tipo de Interés Nominal) ofrecido por la entidad. Puedes comparar entre tipo fijo o variable.',
41
+ },
42
+ {
43
+ name: 'Elegir el plazo de amortización',
44
+ text: 'Define en cuántos años quieres devolver el préstamo. A más años, cuota más baja pero pagarás más intereses totales.',
45
+ },
46
+ {
47
+ name: 'Analizar el cuadro de amortización',
48
+ text: 'Revisa mes a mes cómo evoluciona tu deuda y qué parte de tu cuota se destina a intereses vs capital.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step, i) => ({
68
+ '@type': 'HowToStep',
69
+ position: i + 1,
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'FinanceApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
83
+ inLanguage: 'es',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<MortgageUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faqTitle: 'Preguntas Frecuentes',
91
+ faq: faqData,
92
+ bibliographyTitle: 'Fuentes y Referencias',
93
+ bibliography: [
94
+ {
95
+ name: 'Banco de España: Portal del Cliente Bancario',
96
+ url: 'https://www.bde.es/bde/es/secciones/servicios/Particulares_y_e/Clientesbancarios/',
97
+ },
98
+ {
99
+ name: 'Banco de España: Información sobre hipotecas',
100
+ url: 'https://www.bde.es/bde/es/secciones/servicios/Particulares_y_e/Clientesbancarios/Productos_y_s/Hipotecas/',
101
+ },
102
+ {
103
+ name: 'AEPD: Guía de protección de datos en operaciones de crédito',
104
+ url: 'https://www.aepd.es/',
105
+ },
106
+ {
107
+ name: 'OCU: Calculadora hipotecaria y guía de compra',
108
+ url: 'https://www.ocu.org/dinero/hipotecas/',
109
+ },
110
+ ],
111
+ howTo: howToData,
112
+ schemas: [faqSchema, howToSchema, appSchema],
113
+ seo: [
114
+ {
115
+ type: 'title',
116
+ text: 'Guía Completa de Hipotecas: Sistema Francés y Amortización',
117
+ level: 2,
118
+ },
119
+ {
120
+ type: 'paragraph',
121
+ html: 'La hipoteca es probablemente la deuda más grande que contraerás en tu vida. Entender cómo funciona el sistema de amortización español (francés) es crucial para tomar decisiones inteligentes que pueden ahorrarte decenas de miles de euros.',
122
+ },
123
+ {
124
+ type: 'title',
125
+ text: 'El "Trampa" del Sistema Francés: Entendiendo la Composición de tu Cuota',
126
+ level: 3,
127
+ },
128
+ {
129
+ type: 'paragraph',
130
+ html: 'En España, la mayoría de hipotecas usan el <strong>Sistema de Amortización Francés</strong>. Su característica principal es que la cuota mensual siempre es la misma (si el interés es fijo), pero la composición cambia radicalmente a lo largo del tiempo.',
131
+ },
132
+ {
133
+ type: 'tip',
134
+ title: 'Cómo Evoluciona tu Cuota',
135
+ html: '<p><strong>Al principio (Años 1-10):</strong> Pagas casi todo INTERESES y devuelves muy poco dinero prestado. En una hipoteca de 250.000€ al 3%, tu primer pago puede ser 80% intereses.</p><p><strong>En el medio (Años 11-25):</strong> La proporción se equilibra gradualmente.</p><p><strong>Al final (Años 26-30):</strong> Pagas casi todo CAPITAL y muy pocos intereses.</p>',
136
+ },
137
+ {
138
+ type: 'paragraph',
139
+ html: 'Por eso, si vas a <strong>amortizar hipoteca</strong> (adelantar dinero), es muchísimo más rentable hacerlo en los primeros años del préstamo. Amortizar 10.000€ en el año 1 puede ahorrarte más de 15.000€ en intereses. El mismo adelanto en el año 20 apenas te ahorra 2.000€.',
140
+ },
141
+ {
142
+ type: 'title',
143
+ text: '¿Cuánto Dinero Debo Destinar a la Hipoteca?',
144
+ level: 3,
145
+ },
146
+ {
147
+ type: 'paragraph',
148
+ html: 'El Banco de España recomienda que tu hipoteca <strong>no supere el 30-35% de tus ingresos netos mensuales</strong>. Si superas este umbral, aumentas significativamente el riesgo de impago ante imprevistos (pérdida de trabajo, enfermedad, etc.).',
149
+ },
150
+ {
151
+ type: 'title',
152
+ text: 'Contexto 2026: Tipo Fijo vs Variable',
153
+ level: 3,
154
+ },
155
+ {
156
+ type: 'paragraph',
157
+ html: 'Con un Euribor fluctuante, elegir entre <strong>Tipo Fijo</strong> o <strong>Tipo Variable</strong> es una decisión estratégica que puede costar miles de euros anuales.',
158
+ },
159
+ {
160
+ type: 'comparative',
161
+ columns: 2,
162
+ items: [
163
+ {
164
+ title: 'Tipo Fijo',
165
+ description: 'Pagas un poco más ahora, pero duermes tranquilo sabiendo que tu cuota nunca subirá.',
166
+ points: [
167
+ 'Cuota predecible durante 30 años',
168
+ 'Protección contra subidas de interés',
169
+ 'Paz mental en economía incierta',
170
+ 'Ideal para presupuestos ajustados',
171
+ ],
172
+ },
173
+ {
174
+ title: 'Tipo Variable',
175
+ description: 'Puede ser más barato hoy, pero expone tu economía a volatilidad.',
176
+ highlight: true,
177
+ points: [
178
+ 'Cuota inicial más baja',
179
+ 'Riesgo de subidas del Euribor (4-5% es posible)',
180
+ 'Impacto potencial grave en presupuesto',
181
+ 'Solo para quien tolera riesgo alto',
182
+ ],
183
+ },
184
+ ],
185
+ },
186
+ {
187
+ type: 'tip',
188
+ title: 'La Decisión Fijo vs Variable Depende de Tu Perfil',
189
+ html: '<p><strong>Elige Tipo Fijo si:</strong> Tu presupuesto es ajustado, buscas certeza, no toleras sorpresas mensuales desagradables.</p><p><strong>Elige Tipo Variable si:</strong> Tienes colchón financiero, crees que el Euribor bajará, tu hipoteca es pequeña o corto plazo.</p>',
190
+ },
191
+ ],
192
+ ui: {
193
+ labelTitle: 'Calculadora Hipotecaria',
194
+ labelLoanAmount: 'Importe Préstamo',
195
+ labelInterestRate: 'Interés (TIN)',
196
+ labelYears: 'Plazo (Años)',
197
+ labelMonthlyExtra: 'Añadir Ahorro Mensual',
198
+ labelMonthlyPayment: 'Cuota Mensual',
199
+ labelMonthCount: 'meses',
200
+ labelSavingsCard: 'Tu Ahorro Potencial',
201
+ labelSavingsInterest: 'Intereses',
202
+ labelSavingsTime: 'Tiempo',
203
+ labelTimelineComparison: 'Comparativa Temporal',
204
+ labelTimelineOriginal: 'Duración Original',
205
+ labelTimelineOptimized: 'Duración con Amortización',
206
+ labelCostBreakdown: 'Desglose de Costes Totales',
207
+ labelBorrowed: 'Prestado',
208
+ labelTotalBorrowed: 'Total Prestado',
209
+ labelTotalInterest: 'Total Intereses',
210
+ labelAmortizationTable: 'Tabla de Amortización',
211
+ labelTableHeader: 'Ver tabla completa',
212
+ labelViewAll: 'Ver todo',
213
+ labelPaid: 'Hipoteca Pagada',
214
+ labelTableMonth: 'Mes',
215
+ labelTableInterest: 'Interés',
216
+ labelTablePrincipal: 'Capital',
217
+ labelTableExtra: 'Extra',
218
+ labelTableBalance: 'Pendiente',
219
+ labelMoreMonths: 'más meses',
220
+ labelMonth: 'Mes',
221
+ currencySymbol: '€',
222
+ currencyCode: 'EUR',
223
+ currencyLocale: 'es-ES',
224
+ monthPlural: 'meses',
225
+ yearPlural: 'años',
226
+ },
227
+ };
@@ -0,0 +1,227 @@
1
+ import type { WithContext, FAQPage, HowTo, SoftwareApplication } from 'schema-dts';
2
+ import type { ToolLocaleContent } from '../../../types';
3
+ import type { MortgageUI } from '../ui';
4
+
5
+ const slug = 'calculatrice-hypotheque';
6
+ const title = 'Calculatrice Hypothécaire: Tableau d\'Amortissement Complet';
7
+ const description =
8
+ 'Calculez votre paiement hypothécaire mensuel, découvrez le coût total des intérêts et visualisez votre tableau d\'amortissement complet instantanément.';
9
+
10
+ const faqData = [
11
+ {
12
+ question: 'Qu\'est-ce que le système d\'amortissement français?',
13
+ answer:
14
+ 'C\'est le système le plus utilisé en Europe. Votre paiement mensuel reste identique, mais au début vous payez presque entièrement les intérêts avec très peu de capital. À la fin, c\'est l\'inverse. C\'est pourquoi le remboursement anticipé est plus rentable dans les premières années.',
15
+ },
16
+ {
17
+ question: 'Taux fixe ou variable en 2026?',
18
+ answer:
19
+ 'Taux fixe: vous payez un peu plus maintenant mais dormez tranquille 30 ans. Taux variable: peut être moins cher au début, mais si les taux montent à 4-5%, votre paiement pourrait exploser. Cela dépend de votre tolérance au risque.',
20
+ },
21
+ {
22
+ question: 'Combien j\'économise si je rembourse 10 000€ à l\'avance?',
23
+ answer:
24
+ 'Cela dépend du moment. Si vous remboursez à l\'année 1 d\'une hypothèque de 200 000€ à 3%, vous pouvez économiser plus de 15 000€ en intérêts. Si vous le faites à l\'année 20, vous en économisez à peine 2 000€. Le timing est crucial.',
25
+ },
26
+ {
27
+ question: 'Quel pourcentage de mon revenu devrais-je consacrer à l\'hypothèque?',
28
+ answer:
29
+ 'Les conseillers financiers recommandent de ne pas dépasser 28-31% du revenu brut mensuel (ratio d\'habitation). Certains permettent jusqu\'à 43% de ratio d\'endettement incluant toutes les obligations. Dépasser ces seuils augmente le risque de défaut en cas d\'urgence.',
30
+ },
31
+ ];
32
+
33
+ const howToData = [
34
+ {
35
+ name: 'Entrez le montant du prêt',
36
+ text: 'Tapez le montant total que vous devez emprunter au prêteur (moins votre acompte).',
37
+ },
38
+ {
39
+ name: 'Ajustez le taux d\'intérêt',
40
+ text: 'Entrez le TAEG (Taux Annuel Effectif Global) offert par le prêteur. Vous pouvez comparer les options à taux fixe ou variable.',
41
+ },
42
+ {
43
+ name: 'Choisissez votre période de remboursement',
44
+ text: 'Définissez en combien d\'années vous souhaitez rembourser le prêt. Plus d\'années signifie un paiement mensuel plus faible mais des intérêts totaux plus élevés.',
45
+ },
46
+ {
47
+ name: 'Examinez le tableau d\'amortissement',
48
+ text: 'Examinez mois après mois comment votre dette diminue et quelle partie de chaque paiement va aux intérêts par rapport au capital.',
49
+ },
50
+ ];
51
+
52
+ const faqSchema: WithContext<FAQPage> = {
53
+ '@context': 'https://schema.org',
54
+ '@type': 'FAQPage',
55
+ mainEntity: faqData.map((item) => ({
56
+ '@type': 'Question',
57
+ name: item.question,
58
+ acceptedAnswer: { '@type': 'Answer', text: item.answer },
59
+ })),
60
+ };
61
+
62
+ const howToSchema: WithContext<HowTo> = {
63
+ '@context': 'https://schema.org',
64
+ '@type': 'HowTo',
65
+ name: title,
66
+ description,
67
+ step: howToData.map((step, i) => ({
68
+ '@type': 'HowToStep',
69
+ position: i + 1,
70
+ name: step.name,
71
+ text: step.text,
72
+ })),
73
+ };
74
+
75
+ const appSchema: WithContext<SoftwareApplication> = {
76
+ '@context': 'https://schema.org',
77
+ '@type': 'SoftwareApplication',
78
+ name: title,
79
+ description,
80
+ applicationCategory: 'FinanceApplication',
81
+ operatingSystem: 'All',
82
+ offers: { '@type': 'Offer', price: '0', priceCurrency: 'EUR' },
83
+ inLanguage: 'fr',
84
+ };
85
+
86
+ export const content: ToolLocaleContent<MortgageUI> = {
87
+ slug,
88
+ title,
89
+ description,
90
+ faqTitle: 'Questions Fréquemment Posées',
91
+ faq: faqData,
92
+ bibliographyTitle: 'Sources et Références',
93
+ bibliography: [
94
+ {
95
+ name: 'Banque de France: Comprendre les crédits immobiliers',
96
+ url: 'https://www.banque-france.fr/',
97
+ },
98
+ {
99
+ name: 'Institut National de la Consommation: Guides de l\'emprunteur',
100
+ url: 'https://www.inc-conso.fr/',
101
+ },
102
+ {
103
+ name: 'Conseil Supérieur du Notariat: Ressources hypothécaires',
104
+ url: 'https://www.notaires.fr/',
105
+ },
106
+ {
107
+ name: 'Investopedia FR: Calcul des amortissements hypothécaires',
108
+ url: 'https://www.investopedia.com/terms/m/mortgage.asp',
109
+ },
110
+ ],
111
+ howTo: howToData,
112
+ schemas: [faqSchema, howToSchema, appSchema],
113
+ seo: [
114
+ {
115
+ type: 'title',
116
+ text: 'Guide Complet du Crédit Immobilier : Comprendre l\'Amortissement',
117
+ level: 2,
118
+ },
119
+ {
120
+ type: 'paragraph',
121
+ html: 'Un crédit immobilier est probablement la plus grande dette que vous contracterez jamais. Comprendre comment fonctionne le système d\'amortissement est crucial pour prendre des décisions intelligentes qui pourraient vous économiser des dizaines de milliers d\'euros.',
122
+ },
123
+ {
124
+ type: 'title',
125
+ text: 'Le "Piège" des Intérêts Prépondérants : Comprendre Votre Ventilation de Paiement',
126
+ level: 3,
127
+ },
128
+ {
129
+ type: 'paragraph',
130
+ html: 'La plupart des crédits immobiliers utilisent le <strong>système d\'amortissement standard</strong>. Sa caractéristique est que votre paiement mensuel reste constant (à taux fixe), mais la composition change dramatiquement au fil du temps.',
131
+ },
132
+ {
133
+ type: 'tip',
134
+ title: 'Comment Votre Paiement Évolue',
135
+ html: '<p><strong>Premières Années (1-10 ans) :</strong> Vous payez presque uniquement les INTÉRÊTS et très peu du capital emprunté. Sur un crédit de 250 000€ à 3%, votre premier paiement pourrait être 80% intérêts.</p><p><strong>Années Intermédiaires (11-25 ans) :</strong> La proportion s\'équilibre graduellement.</p><p><strong>Dernières Années (26-30 ans) :</strong> Vous payez presque uniquement le CAPITAL avec très peu d\'intérêts.</p>',
136
+ },
137
+ {
138
+ type: 'paragraph',
139
+ html: 'C\'est pourquoi <strong>faire des remboursements anticipés</strong> (rembourser le capital tôt) est bien plus rentable dans les premières années. Rembourser 10 000€ en année 1 peut vous économiser plus de 15 000€ en intérêts. Le même remboursement en année 20 vous économise à peine 2 000€.',
140
+ },
141
+ {
142
+ type: 'title',
143
+ text: 'Combien Devriez-Vous Consacrer à Votre Crédit?',
144
+ level: 3,
145
+ },
146
+ {
147
+ type: 'paragraph',
148
+ html: 'Les experts financiers recommandent que votre crédit <strong>ne dépasse pas 30-35% de vos revenus bruts mensuels</strong>. Si vous dépassez ce seuil, vous augmentez considérablement le risque de défaillance face aux imprévus (perte d\'emploi, urgence médicale, etc.).',
149
+ },
150
+ {
151
+ type: 'title',
152
+ text: 'Contexte 2026 : Taux Fixe vs Variable',
153
+ level: 3,
154
+ },
155
+ {
156
+ type: 'paragraph',
157
+ html: 'Avec des taux d\'intérêt fluctuants, choisir entre <strong>Taux Fixe</strong> ou <strong>Taux Variable</strong> est une décision stratégique qui peut coûter des milliers d\'euros par an.',
158
+ },
159
+ {
160
+ type: 'comparative',
161
+ columns: 2,
162
+ items: [
163
+ {
164
+ title: 'Taux Fixe',
165
+ description: 'Vous payez un peu plus maintenant, mais dormez tranquille sachant que votre paiement ne changerait jamais.',
166
+ points: [
167
+ 'Paiement prévisible pour 30 ans',
168
+ 'Protection contre les augmentations de taux',
169
+ 'Tranquillité d\'esprit en économie incertaine',
170
+ 'Idéal pour les budgets serrés',
171
+ ],
172
+ },
173
+ {
174
+ title: 'Taux Variable',
175
+ description: 'Il peut être moins cher aujourd\'hui, mais expose vos finances à la volatilité.',
176
+ highlight: true,
177
+ points: [
178
+ 'Paiement initial plus bas',
179
+ 'Risque d\'augmentations de taux (4-5% possibles)',
180
+ 'Impact potentiellement grave sur le budget',
181
+ 'Seulement pour ceux qui tolèrent le risque élevé',
182
+ ],
183
+ },
184
+ ],
185
+ },
186
+ {
187
+ type: 'tip',
188
+ title: 'Taux Fixe vs Variable : Cela Dépend de Votre Profil',
189
+ html: '<p><strong>Choisissez Taux Fixe si :</strong> Votre budget est serré, vous recherchez la certitude, vous ne tolérez pas les surprises de paiement.</p><p><strong>Choisissez Taux Variable si :</strong> Vous avez un coussin financier, vous croyez que les taux baisseront, votre crédit est petit ou à court terme.</p>',
190
+ },
191
+ ],
192
+ ui: {
193
+ labelTitle: 'Calculatrice Hypothécaire',
194
+ labelLoanAmount: 'Montant du Prêt',
195
+ labelInterestRate: 'Taux d\'Intérêt (TAEG)',
196
+ labelYears: 'Durée du Prêt (Années)',
197
+ labelMonthlyExtra: 'Ajouter un Paiement Mensuel Supplémentaire',
198
+ labelMonthlyPayment: 'Paiement Mensuel',
199
+ labelMonthCount: 'mois',
200
+ labelSavingsCard: 'Votre Potentiel d\'Économies',
201
+ labelSavingsInterest: 'Intérêts',
202
+ labelSavingsTime: 'Temps',
203
+ labelTimelineComparison: 'Comparaison Temporelle',
204
+ labelTimelineOriginal: 'Durée Originale',
205
+ labelTimelineOptimized: 'Durée avec Paiements Supplémentaires',
206
+ labelCostBreakdown: 'Répartition des Coûts Totaux',
207
+ labelBorrowed: 'Emprunté',
208
+ labelTotalBorrowed: 'Total Emprunté',
209
+ labelTotalInterest: 'Total des Intérêts',
210
+ labelAmortizationTable: 'Tableau d\'Amortissement',
211
+ labelTableHeader: 'Afficher le tableau complet',
212
+ labelViewAll: 'Afficher tout',
213
+ labelPaid: 'Hypothèque Remboursée',
214
+ labelTableMonth: 'Mois',
215
+ labelTableInterest: 'Intérêt',
216
+ labelTablePrincipal: 'Principal',
217
+ labelTableExtra: 'Extra',
218
+ labelTableBalance: 'Solde',
219
+ labelMoreMonths: 'plus de mois',
220
+ labelMonth: 'Mois',
221
+ currencySymbol: '€',
222
+ currencyCode: 'EUR',
223
+ currencyLocale: 'fr-FR',
224
+ monthPlural: 'mois',
225
+ yearPlural: 'années',
226
+ },
227
+ };