A comprehensive Next.js 15 executive dashboard for the Marine Department featuring real-time financial analytics, compliance tracking, and document management.
- Dashboard: Real-time KPI cards, metrics display, and financial overview
- Analytics Center: Advanced charting (Line, Area, Bar, Pie), compliance dashboards, and data trends
- Data Processing: Parse and validate Excel, CSV, and PDF files
- Financial Tables: Interactive tables with sorting, filtering, searching, and export capabilities
- Document Management: Upload, organize, and track financial documents
- Export Center: Multi-format export (Excel, PDF, CSV), bulk operations, and scheduled exports
- Compliance Tracking: Compliance indicators, audit trails, and recommendations
- Settings: Organization configuration, data management, security, and backup options
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS, Shadcn/UI components
- Data Visualization: Recharts
- File Processing:
- XLSX (Excel)
- CSV (Papa Parse)
- PDF (PDF.js)
- Export: ExcelJS, jsPDF, jsPDF-AutoTable
- UI Components: Radix UI (Tabs), Lucide Icons
- State Management: React Hooks
- Node.js 18+
- npm, yarn, pnpm, or bun
# Clone the repository
git clone <repository-url>
cd iansi-dashboard
# Install dependencies
npm install
# or
pnpm install
# or
yarn installnpm run dev
# or
pnpm dev
# or
yarn devOpen http://localhost:3000 in your browser.
npm run build
npm start
# or
pnpm build
pnpm startCreate a .env.local file based on .env.example.
| Variable | Required | Default | Description |
|---|---|---|---|
MAX_UPLOAD_MB |
No | 50 |
Maximum upload size accepted by POST /api/process-file. |
/app
/api
/process-file # File upload and processing endpoint
/analytics # Analytics center page
/documents # Document management page
/export # Export center page
/settings # Settings configuration page
page.tsx # Main dashboard
layout.tsx # Root layout with navigation
globals.css # Global styles and design tokens
/components
file-upload.tsx # File upload component
kpi-card.tsx # Key performance indicator card
data-table.tsx # Basic data table
financial-table.tsx # Advanced financial table with filtering
financial-chart.tsx # Multi-type charts (Line, Area, Bar, Pie)
compliance-dashboard.tsx # Compliance indicators and tracking
bulk-operations.tsx # Bulk export and selection component
navigation.tsx # Sidebar navigation
/ui
tabs.tsx # Radix UI Tabs component
/lib
excel-parser.ts # Excel file parsing and metrics
csv-parser.ts # CSV file parsing
pdf-parser.ts # PDF file parsing and text extraction
data-validator.ts # Data validation and statistics
export-utils.ts # Export functions (Excel, PDF, CSV)
utils.ts # Common utility functions
sample-data.ts # Sample data generator
The dashboard supports three file formats:
- Excel (.xlsx, .xls): Full sheet parsing with multiple sheet support
- CSV: Robust parsing with quote handling and type detection
- PDF: Text extraction and table recognition
- KPI Cards: Display key metrics with trends and comparisons
- Financial Tables: Sort, filter, search, and export financial data
- Charts: Multiple chart types (Line, Area, Bar, Pie) with responsive design
- Compliance Dashboard: Track compliance indicators and audit trails
- Excel: Formatted workbooks with styling
- PDF: Professional reports with tables and formatting
- CSV: Lightweight format for data import/export
- Bulk Operations: Select multiple rows and export simultaneously
- Upload and organize financial documents
- Tag and categorize documents
- Track document metadata (date, size, uploader)
- Search and filter capabilities
Color scheme uses a professional marine-themed dark mode:
/* Primary Blue */
--color-primary: 210 90% 35%;
/* Accent Teal */
--color-accent: 178 65% 45%;
/* Secondary Steel Gray */
--color-secondary: 210 15% 25%;Modify app/globals.css to customize the color scheme.
Set the data retention period in Settings. Data older than the specified days will be automatically archived.
Processes uploaded files and returns parsed data with metrics.
- Enforces max file size via
MAX_UPLOAD_MB(default 50MB).
Request:
FormData: { file: File }
Response:
{
"success": true,
"data": [...],
"metrics": {...},
"columnStats": {...},
"validation": {...}
}- Push this repository to GitHub.
- Import the project in Vercel.
- Set environment variables from
.env.examplein Vercel Project Settings. - Deploy using the default Next.js settings (
vercel.jsonis included). - Verify runtime health by opening
/api/healthafter deployment.
Simple readiness probe returning service status, timestamp, and uptime.
- Server-side rendering with React Server Components
- Lazy loading of charts and tables
- Optimized re-renders with React hooks
- Tailwind CSS purging for minimal bundle size
- Image optimization with Next.js built-in tools
- Data validation on upload
- File type verification
- Size limit enforcement (50MB default)
- Secure file handling
- Input sanitization for display
- Chrome/Edge (latest)
- Firefox (latest)
- Safari (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
- Check file size (max 50MB)
- Verify file format (.xlsx, .csv, .pdf)
- Ensure adequate server disk space
- Verify Recharts is installed
- Check browser console for errors
- Ensure data is properly formatted
- Verify ExcelJS and jsPDF packages
- Check browser permissions for downloads
- Ensure data is not empty before export
- Create a feature branch
- Make your changes
- Submit a pull request
Copyright 2024 Marine Department. All rights reserved.
For issues or questions, contact the Marine Department IT Department.
- Real-time data streaming
- Advanced ML-powered analytics
- Mobile app version
- Multi-language support
- Role-based access control (RBAC)
- Audit logging
- API integrations (Bank feeds, SAP, etc.)
- Custom report builder
- Predictive analytics
Version: 0.1.0
Last Updated: December 2024