Skip to content

Commit 7dd2a78

Browse files
committed
first submit
1 parent 84ebde4 commit 7dd2a78

21 files changed

Lines changed: 1765 additions & 0 deletions

trgmc/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

trgmc/README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# React + Vite
2+
3+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4+
5+
Currently, two official plugins are available:
6+
7+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9+
10+
# Purpose of this tool
11+
- add refinancing, re-casting, and many overpayments
12+
- more modern & friendly interface
13+
- Saves your calculations for next time (in URL and cookies)
14+
- multi-language?
15+
16+
17+
# Todo
18+
19+
## Important
20+
- re-fix all the input boxes
21+
-- form validation (no -ve numbers)
22+
-- why "56-" shows NaN
23+
--- make monthly payment small
24+
- all inputs should be string, so middle character can be deleted without cursor moving
25+
- property tax with monthly input
26+
-- hoa and insurance
27+
- test everything
28+
-- no console issues
29+
- percents should have 2 decimal points
30+
-- Make sure all numbers are treated as strings
31+
- Show breakdown of total repayments
32+
- Fix rounding issue which means final payment != monthly payment
33+
- get a domain, make the site live
34+
- Crashes when put a letter into loan length. Or 0
35+
36+
## Later
37+
- hover over explains how th eboxes were calculated
38+
- refinance has option to change loan length
39+
- Show loan length and new monthly payment
40+
- add markers showing when the events happen
41+
- Add recurring overpayment
42+
- add a start date
43+
- get the rates from Zillow API
44+
- make it work in french & other languages
45+
- stop multiple events on sme day
46+
- Add tax appreciation
47+
- Download to Excel
48+
- Refinance shouldn't be in a dropdown
49+
- get tax rate via api https://services.maps.cdtfa.ca.gov
50+
- autofill the address
51+
- add option to chose a monhtly payment
52+
- radio button: What can I afford; How much it costs
53+
- Nice Latex document showing deriving the equations
54+
- build run a strict linter
55+
- put input in URL
56+
- little padlock showing that value won't change?
57+
58+
59+
60+
61+
62+
# Done
63+
- when edit event then highlight the text temporarily
64+
-- Put all the user changes into a reducer function. This will allow easier flash handling, and less prop drilling
65+
66+
- separate tax, hoa and insurance. Use nice color separation
67+
- RE-FORMAT
68+
-- Finish mobile optimization
69+
- Default show one month per year
70+
- Let user chose monthly payment, or chose home value
71+
-- When monthly payment changes, change all the other numbers
72+
-- Highlight which box is the input, which is derived
73+
- re-cast doesn't work
74+
- Chart x-axis label
75+
- Tax and fee user can chose unit
76+
- Add house taxes hoa and insurance and other stuff
77+
-- Fix percent dropdowns
78+
- fix ability to delete % unit
79+
---- hover color to be more potent
80+
- chart font size
81+
- Add remianing balance to the graph
82+
---- Create table for inputs on one side
83+
---- Create bar graph on the other side
84+
---- Bar chart goes to length of whole mortgage
85+
---- Bart chart becomes stacked showing principal and interest
86+
---- Allow user to add home value, down payment automatically changes, loan amount automatically changes. Make this into a block
87+
---- add loan term and interest, make the graph change
88+
---- Add stats at the bottom of the page
89+
---- Add mortgate events
90+
------ over-pay
91+
------ re-cast
92+
------ refinance
93+
------ You can only re-cast if you do an overpayment first
94+
- Add text explaining recast, over payments and refinance
95+
---- sort the events chronologically
96+
--- check it has all features of competing tools

trgmc/bun.lockb

163 KB
Binary file not shown.

trgmc/eslint.config.js

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// import globals from "globals";
2+
// import pluginJs from "@eslint/js";
3+
// import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
4+
5+
6+
// export default [
7+
// {languageOptions: { globals: globals.browser }},
8+
// pluginJs.configs.recommended,
9+
// pluginReactConfig,
10+
// ];
11+
12+
import globals from "globals";
13+
import pluginJs from "@eslint/js";
14+
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
15+
import react from 'eslint-plugin-react';
16+
// const globals = require('globals');
17+
18+
export default [
19+
{
20+
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
21+
plugins: {
22+
react,
23+
},
24+
languageOptions: {
25+
parserOptions: {
26+
ecmaFeatures: {
27+
jsx: true,
28+
},
29+
},
30+
globals:
31+
{...globals.browser,
32+
Intl: 'readonly'}
33+
},
34+
rules: {
35+
// ... any rules you want
36+
'react/jsx-uses-react': 'error',
37+
'react/jsx-uses-vars': 'error',
38+
},
39+
// globals: {
40+
// Intl: 'readonly'
41+
// }
42+
// ... others are omitted for brevity
43+
}, pluginJs.configs.recommended,
44+
// pluginReactConfig,
45+
];

trgmc/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.jsx"></script>
12+
</body>
13+
</html>

trgmc/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log("Hello via Bun!");

trgmc/package.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "trgmc",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vite build",
9+
"lint": "eslint src",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"bootstrap": "^5.3.2",
14+
"chart.js": "^4.4.1",
15+
"react": "^18.2.0",
16+
"react-bootstrap": "^2.10.1",
17+
"react-bootstrap-icons": "^1.11.3",
18+
"react-chartjs-2": "^5.2.0",
19+
"react-dom": "^18.2.0"
20+
},
21+
"devDependencies": {
22+
"@eslint/compat": "^1.0.1",
23+
"@eslint/js": "^9.3.0",
24+
"@types/bun": "latest",
25+
"@types/react": "^18.2.43",
26+
"@types/react-dom": "^18.2.17",
27+
"@vitejs/plugin-react": "^4.2.1",
28+
"eslint": "8.x",
29+
"eslint-plugin-react": "^7.34.1",
30+
"eslint-plugin-react-hooks": "^4.6.0",
31+
"eslint-plugin-react-refresh": "^0.4.5",
32+
"globals": "^15.3.0",
33+
"typescript-eslint": "^7.10.0",
34+
"vite": "^5.0.8"
35+
},
36+
"module": "index.ts",
37+
"peerDependencies": {
38+
"typescript": "^5.0.0"
39+
}
40+
}

trgmc/public/vite.svg

Lines changed: 1 addition & 0 deletions
Loading

trgmc/src/App.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
html {
2+
font-size: 14px;
3+
}
4+
5+
.custom-tooltip {
6+
--bs-tooltip-bg: var(--bd-violet-bg);
7+
--bs-tooltip-color: var(--bs-white);
8+
}

0 commit comments

Comments
 (0)