A comprehensive web application for managing financial submissions, reimbursements, and analytics for HackPSU events. Built for internal hackathon organizers to streamline financial operations and provide detailed spending insights.
The HackPSU Finance Dashboard serves as a centralized platform for managing all financial aspects of HackPSU hackathon events. It enables organizers to process reimbursement requests, track spending across multiple categories, and analyze financial data through detailed analytics dashboards.
Target Users: HackPSU organizers and administrative staff Primary Use Cases:
- Processing and approving reimbursement requests
- Tracking expenses across 80+ predefined categories
- Analyzing spending patterns and trends
- Managing submissions from both users and organizers
- Generating comprehensive financial reports
Key Capabilities:
- Real-time financial data management with Firebase integration
- Advanced filtering and search functionality
- Interactive analytics with charts and visualizations
- Status-based workflow management (Pending, Approved, Rejected, Deposit)
- Receipt management and validation
- Multi-user role support (Users vs Organizers)
- Next.js - React framework with App Router for server-side rendering and optimized performance
- React - Component-based UI library for building interactive interfaces
- TypeScript - Type-safe development with enhanced developer experience
- Tailwind CSS - Utility-first CSS framework for rapid styling
- shadcn/ui - High-quality, accessible React components built on Radix UI primitives
- Material-UI - Additional UI components for complex interactions and theming
- Emotion - CSS-in-JS library for dynamic styling and theme management
- Lucide React - Comprehensive icon library for consistent visual elements
- Firebase - Backend-as-a-Service providing authentication, database, and storage
- JWT Decode - JSON Web Token parsing for authentication state management
- Axios - HTTP client for API communications with comprehensive error handling
- React Hook Form - Performant form library with minimal re-renders
- Yup - Schema validation for form data integrity
- Zod - TypeScript-first schema validation for runtime type checking
- PostHog - Product analytics and user behavior tracking
- Vercel Analytics - Performance monitoring and web vitals tracking
- Recharts - Data visualization library for financial charts and graphs
- ESLint - Code linting and quality enforcement
- Prettier - Code formatting for consistent style
- TanStack Query - Server state management with caching and synchronization
- Utilizes Next.js 15 App Router for file-based routing and enhanced performance
- Server-side rendering for improved SEO and faster initial page loads
- API integration through custom hooks and providers for clean separation of concerns
- Firebase Authentication with JWT token management
- Role-based access control distinguishing between Users and Organizers
- AuthGuard component for protected route management
- TanStack Query for server state management and caching
- React Context for global UI state (layout, theme, authentication)
- Local state with React hooks for component-specific interactions
- Tailwind CSS with custom design system configuration
- CSS variables for dynamic theming support
- Component composition pattern with shadcn/ui for consistency
- Material-UI integration for complex components requiring advanced functionality
- Lazy loading for analytics charts and complex visualizations
- Pagination for large data sets in finance tables
- Optimistic updates for status changes with proper error handling
- Memoization of expensive calculations in analytics components
- Node.js (recommended version specified in package.json)
- Yarn package manager
- Firebase project with configured environment variables
-
Clone the repository
-
Install dependencies:
yarn install
-
Configure environment variables:
- Copy
.env.exampleto.env.local - Add Firebase configuration values
- Set API base URL for backend services
- Copy
-
Start the development server:
yarn dev
yarn dev- Start development server with hot reloadyarn build- Build production-ready applicationyarn start- Start production serveryarn lint- Run ESLint for code quality checksyarn format- Format code using Prettier
Configure the following environment variables:
NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_STORAGE_BUCKETNEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDNEXT_PUBLIC_FIREBASE_APP_IDNEXT_PUBLIC_BASE_URL_V3
src/
├── app/ # Next.js App Router pages
│ ├── analytics/ # Analytics dashboard routes
│ │ ├── general/ # Organization-wide analytics
│ │ └── self/ # Personal spending analytics
│ ├── finance/ # Finance management routes
│ │ ├── [id]/ # Individual finance record details
│ │ └── page.tsx # Finance dashboard overview
│ ├── invoice/ # Invoice generation
│ ├── reimbursement/ # Reimbursement request forms
│ ├── layout.tsx # Root layout with providers
│ └── globals.css # Global styles and Tailwind imports
├── common/ # Shared utilities and configurations
│ ├── api/ # API clients and data layer
│ │ ├── analytics/ # Analytics data management
│ │ ├── finance/ # Finance entity definitions and hooks
│ │ ├── user/ # User management
│ │ └── apiClient.ts # Centralized HTTP client
│ ├── config/ # Environment and Firebase configuration
│ ├── context/ # React context providers
│ └── types/ # TypeScript type definitions
├── components/ # Reusable UI components
│ ├── Analytics/ # Analytics visualization components
│ ├── DataTable/ # Table components with sorting/filtering
│ ├── DashboardLayout/ # Main application layout
│ ├── ReimbursementForm/ # Form components for submissions
│ └── ui/ # shadcn/ui component library
├── hooks/ # Custom React hooks
└── lib/ # Utility functions and configurations
- Reimbursement Processing: Complete workflow for submitting, reviewing, and approving reimbursement requests
- Status Management: Four-stage approval process (Pending, Approved, Rejected, Deposit)
- Receipt Handling: File upload and validation for supporting documentation
- Category Classification: 80+ predefined expense categories for accurate tracking
- Organization Analytics: Comprehensive spending overview with trend analysis
- Personal Analytics: Individual spending summaries and submission history
- Interactive Visualizations: Charts and graphs using Recharts for data presentation
- Performance Metrics: Approval rates, spending trends, and comparative analysis
- Advanced Filtering: Multi-criteria filtering by status, category, submitter type, and amount ranges
- Search Functionality: Full-text search across all submission fields
- Sorting Capabilities: Sortable columns with ascending/descending order
- Pagination: Efficient handling of large datasets with configurable page sizes
- Responsive Design: Mobile-first approach with Tailwind CSS breakpoints
- Real-time Updates: Live data synchronization using TanStack Query
- Toast Notifications: User feedback for all CRUD operations using Sonner
- Loading States: Skeleton components and progress indicators for better UX
The application is optimized for deployment on Vercel with automatic builds from the main branch. Firebase services handle backend infrastructure including authentication, database, and file storage.
- Follow TypeScript strict mode for type safety
- Use ESLint configuration for consistent code quality
- Implement proper error handling with user-friendly messaging
- Write semantic HTML with accessibility considerations
- Follow React best practices including proper hook usage and component composition
- Create feature branches from main for new development
- Ensure all TypeScript errors are resolved before submission
- Test components thoroughly across different screen sizes
- Validate form submissions and error states
- Run linting and formatting before committing changes