Full React + MUI + TypeScript SPA at frontend/: - API client with typed interfaces for all endpoints - AuthContext (session cookies, dev impersonation) - OrgContext (org list, active org switcher) - Money formatting (cents → display, satoshis → BCH) App shell: - Sidebar navigation with collapsible Ledgers and Financial sections - Top bar with org switcher, language selector (EN/SV/DE), user chip - Material UI theme with Inter font Live data pages (connected to real migrated production data): - Dashboard: YTD P&L cards, pending tasks, quick links - Balance Sheet: date picker, assets/debts tables with totals - Profit & Loss: year selector, income/costs breakdown, net result - Chart of Accounts: grouped by type with status chips - Crypto Treasury: total balance, address table with BCH amounts - Expense Claims: list with amounts, VAT, status chips Placeholder pages for: Inspect Ledgers, Budget vs Actual, Inbound/ Outbound Invoices, Payouts, End of Month, Org Settings, User Management Vite dev server proxies /api to ASP.NET Core backend on port 5222. Made-with: Cursor
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
import React from 'react'
|
|
import ReactDOM from 'react-dom/client'
|
|
import { BrowserRouter } from 'react-router-dom'
|
|
import { ThemeProvider, createTheme, CssBaseline } from '@mui/material'
|
|
import { AuthProvider } from './contexts/AuthContext'
|
|
import { OrgProvider } from './contexts/OrgContext'
|
|
import App from './App'
|
|
import './i18n'
|
|
|
|
const theme = createTheme({
|
|
palette: {
|
|
primary: { main: '#1565c0' },
|
|
secondary: { main: '#2e7d32' },
|
|
background: { default: '#fafafa' },
|
|
},
|
|
typography: {
|
|
fontFamily: '"Inter", "Roboto", "Helvetica", "Arial", sans-serif',
|
|
},
|
|
components: {
|
|
MuiCard: { defaultProps: { elevation: 2 } },
|
|
MuiPaper: { defaultProps: { elevation: 1 } },
|
|
},
|
|
})
|
|
|
|
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
<React.StrictMode>
|
|
<BrowserRouter>
|
|
<ThemeProvider theme={theme}>
|
|
<CssBaseline />
|
|
<AuthProvider>
|
|
<OrgProvider>
|
|
<App />
|
|
</OrgProvider>
|
|
</AuthProvider>
|
|
</ThemeProvider>
|
|
</BrowserRouter>
|
|
</React.StrictMode>,
|
|
)
|