├── public └── favicon.png ├── env.d.ts ├── src ├── views │ ├── BookView.vue │ ├── BalanceSheetView.vue │ ├── JournalView.vue │ ├── LedgerListView.vue │ ├── BookListView.vue │ ├── LedgerView.vue │ └── IncomeStatementView.vue ├── components │ ├── BookError.vue │ ├── Actions.vue │ ├── AboutFooter.vue │ ├── Nav.vue │ ├── AppFooter.vue │ ├── SVGButton.vue │ ├── AppMain.vue │ ├── ChevronIcon.vue │ ├── Logo.vue │ ├── Title.vue │ ├── EditButton.vue │ ├── DownloadButton.vue │ ├── AppHeader.vue │ ├── DeleteButton.vue │ ├── DeleteEntry.vue │ ├── Figure.vue │ ├── TopDate.vue │ ├── DeleteBook.vue │ ├── DeleteAccount.vue │ ├── AddBook.vue │ ├── FigureInput.vue │ ├── LedgerEntry.vue │ ├── BookNav.vue │ ├── LabeledInput.vue │ ├── AccountsTotal.vue │ ├── TypeTotal.vue │ ├── BalanceSheetColumn.vue │ ├── AddAccount.vue │ ├── JournalEntry.vue │ ├── ActionPopup.vue │ └── AddEntry.vue ├── App.vue ├── main.ts ├── helpers │ ├── parseObject.ts │ └── FileStorage.ts ├── assets │ ├── table.css │ └── main.css ├── data │ └── accountTypes.ts ├── stores │ ├── books.ts │ ├── accounts.ts │ └── transactions.ts └── router │ └── index.ts ├── tsconfig.vite-config.json ├── tsconfig.json ├── vite.config.ts ├── index.html ├── .gitignore ├── README.md ├── .eslintrc.cjs ├── package.json └── LICENSE /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BrandonXLF/Brandons-Books/main/public/favicon.png -------------------------------------------------------------------------------- /env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | type UUID = `${string}-${string}-${string}-${string}-${string}`; -------------------------------------------------------------------------------- /src/views/BookView.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/components/BookError.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/components/Actions.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /tsconfig.vite-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.json", 3 | "include": ["vite.config.*"], 4 | "compilerOptions": { 5 | "composite": true, 6 | "types": ["node"], 7 | "noEmit": false 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/components/AboutFooter.vue: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /src/components/Nav.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/components/AppFooter.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /src/components/SVGButton.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@vue/tsconfig/tsconfig.dom.json", 3 | "include": ["env.d.ts", "src/**/*", "src/**/*.vue"], 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["./src/*"] 8 | } 9 | }, 10 | "references": [ 11 | { 12 | "path": "./tsconfig.vite-config.json" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp, watch } from 'vue'; 2 | import { createPinia } from 'pinia'; 3 | 4 | import App from './App.vue'; 5 | import router from './router'; 6 | import '@/assets/main.css'; 7 | 8 | const app = createApp(App); 9 | const pinia = createPinia(); 10 | 11 | app.use(pinia); 12 | app.use(router); 13 | 14 | app.mount('#app'); 15 | -------------------------------------------------------------------------------- /src/helpers/parseObject.ts: -------------------------------------------------------------------------------- 1 | const idKeys = new Set(['number', 'account', 'book']); 2 | 3 | export default function parseObject(str: string): T { 4 | return JSON.parse(str, function(key, val) { 5 | if (idKeys.has(key) && val !== undefined) { 6 | return String(val) as UUID; // Support old format 7 | } 8 | 9 | return val; 10 | }) as T; 11 | } 12 | -------------------------------------------------------------------------------- /src/components/AppMain.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { fileURLToPath, URL } from 'url'; 2 | import { defineConfig } from 'vite'; 3 | import vue from '@vitejs/plugin-vue'; 4 | import vueJsx from '@vitejs/plugin-vue-jsx'; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig({ 8 | plugins: [vue(), vueJsx()], 9 | resolve: { 10 | alias: { 11 | '@': fileURLToPath(new URL('./src', import.meta.url)) 12 | } 13 | } 14 | }); 15 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Brandon's Books 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/components/ChevronIcon.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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 | .DS_Store 12 | dist 13 | dist-ssr 14 | coverage 15 | *.local 16 | 17 | /cypress/videos/ 18 | /cypress/screenshots/ 19 | 20 | # Editor directories and files 21 | .vscode/* 22 | !.vscode/extensions.json 23 | .idea 24 | *.suo 25 | *.ntvs* 26 | *.njsproj 27 | *.sln 28 | *.sw? 29 | -------------------------------------------------------------------------------- /src/components/Logo.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 |