A comprehensive enterprise-grade full-stack financial management platform designed for corporate companies. Features user authentication, role-based access control (RBAC), AI-powered financial analysis, audit-ready reports, stock/forex markets tracking, and a modern silhouette-themed UI.
- Executive Dashboard - Real-time KPIs, cash flow analysis, customizable widgets
- Markets - Stock indices (S&P 500, NASDAQ, DOW, FTSE) and forex tracking with watchlists
- Cash Management - Transaction tracking, multi-account management
- Investment Portfolio - Asset allocation, performance analytics
- General Ledger - Double-entry accounting system
- AR/AP Management - Invoice creation, payment tracking
- Expense Management - Employee expenses with approval workflows
- Financial Reports - P&L, Balance Sheet, Cash Flow statements
- Budget & Forecasting - Department budgeting, variance analysis
- Vendor Management - Supplier relationships, contract tracking
- Payroll & HR - Malaysian statutory calculations (EPF 11%/12%, SOCSO, EIS, PCB)
- Compliance & Audit - SOX, GAAP, IFRS tracking with audit trails
- Risk Analysis - Risk profiling, credit scoring
- AI Financial Advisor - Google Gemini integration for insights and recommendations
- Username/password authentication with bcrypt hashing
- Session-based authentication with PostgreSQL session store
- Role-based access control (RBAC) with 7 enterprise roles:
- Admin, CFO, Controller, Accountant, Manager, Analyst, Viewer
- Subscription tier gating (Free, Professional, Enterprise)
- Rate limiting and input validation
- Request sanitization (XSS prevention)
- Helmet security headers
- Explainable financial recommendations with confidence scores
- Investment analysis with data points and alternatives
- Risk assessment with reasoning
- Anomaly detection for fraud prevention
- React 19 + TypeScript
- Vite build tool
- Tailwind CSS
- Recharts for data visualization
- Lucide React icons
- Express.js REST API
- PostgreSQL database (Neon-backed)
- Drizzle ORM
- express-session for authentication
/
├── App.tsx # Main application component
├── index.tsx # Entry point
├── types.ts # TypeScript type definitions
├── components/
│ ├── Sidebar.tsx # Navigation sidebar
│ └── ChatWidget.tsx # AI chat widget
├── pages/
│ ├── Dashboard.tsx # Executive dashboard
│ ├── Markets.tsx # Stock & forex markets
│ ├── PersonalFinance.tsx # Cash management
│ ├── Investments.tsx # Investment portfolio
│ ├── Accounting.tsx # General ledger
│ ├── InvoiceManagement.tsx # AR/AP management
│ ├── ExpenseManagement.tsx # Expense reports
│ ├── FinancialReports.tsx # Financial statements
│ ├── BudgetForecasting.tsx # Budget planning
│ ├── VendorManagement.tsx # Supplier management
│ ├── PayrollManagement.tsx # Payroll & HR
│ ├── ComplianceAudit.tsx # Compliance tracking
│ ├── RiskAnalysis.tsx # Risk assessment
│ ├── AIAssistant.tsx # AI financial advisor
│ ├── Settings.tsx # User settings
│ └── Auth.tsx # Login/Register
├── server/
│ ├── index.ts # Express server entry
│ ├── db.ts # Database connection
│ ├── localAuth.ts # Authentication logic
│ ├── routes.ts # API routes
│ └── middleware/
│ └── rbac.ts # Role-based access control
├── shared/
│ ├── schema.ts # Drizzle database schema
│ └── models/
│ └── auth.ts # Auth type definitions
└── services/
└── geminiService.ts # Google Gemini AI service
- Node.js 18+
- PostgreSQL database
-
Install dependencies:
npm install
-
Set up environment variables:
DATABASE_URL- PostgreSQL connection stringGEMINI_API_KEY- Google Gemini API key for AI featuresSESSION_SECRET- Session encryption key
-
Push database schema:
npm run db:push
-
Start the development servers:
npm run dev # Frontend (port 5000) npm run server # Backend (port 3001)
POST /api/auth/register- Register new userPOST /api/auth/login- Login with username/passwordPOST /api/auth/logout- LogoutGET /api/auth/user- Get current user
GET /api/transactions- Get user transactionsPOST /api/transactions- Create transactionGET /api/accounts- Get user accountsGET /api/investments- Get investmentsGET /api/invoices- Get invoicesGET /api/vendors- Get vendorsGET /api/employees- Get employeesGET /api/payroll- Get payroll recordsGET /api/compliance- Get compliance checksGET /api/audit-logs- Get audit logsGET /api/dashboard/stats- Get dashboard statistics
POST /api/ai/chat- Chat with AI advisorPOST /api/ai/analyze- Analyze financial data
| Role | Description | Access Level |
|---|---|---|
| Admin | System Administrator | Full access |
| CFO | Chief Financial Officer | Executive |
| Controller | Financial Controller | Operations |
| Accountant | Staff Accountant | Day-to-day |
| Manager | Department Manager | Department |
| Analyst | Financial Analyst | Reporting |
| Viewer | Read-only User | View only |