A comprehensive email management and analytics system for the HackPSU hackathon event. This internal team tool provides email forwarding management, sponsorship outreach capabilities, and detailed SendGrid analytics for tracking email campaign performance.
The HackPSU Email Forward Manager serves as a centralized platform for managing email operations during hackathon events. It combines three core functionalities: domain-based email forwarding management through Namecheap, automated sponsorship email campaigns, and comprehensive SendGrid analytics dashboards. The system is designed for event organizers who need efficient email management tools with detailed performance insights.
- HackPSU event organizers managing email infrastructure
- Team members responsible for sponsor outreach and communication
- Analytics reviewers tracking email campaign performance and engagement
- Real-time email forwarding configuration for hackpsu.org domain
- Template-based sponsorship email generation and sending
- Interactive SendGrid analytics dashboard with performance metrics
- Geographic email performance tracking and visualization
- Multi-format email template management and preview system
- Next.js - React-based full-stack framework using App Router architecture for server-side rendering and API routes
- Tailwind CSS - Utility-first CSS framework for responsive design and consistent styling
- shadcn/ui - Modern React component library built on Radix UI primitives with accessible design patterns
- Material-UI - Additional component library for specific data visualization and form components
- Radix UI - Headless UI components providing accessibility and keyboard navigation foundations
- Firebase - Authentication and real-time database services for user management and data persistence
- Axios - HTTP client for external API communication with error handling and request interceptors
- React Hook Form - Performant form library with minimal re-renders and built-in validation
- @hookform/resolvers - Form validation resolvers for schema-based validation integration
- PostHog - Product analytics and user behavior tracking for application insights
- SendGrid API - Email delivery service integration for sending and analytics data retrieval
- TypeScript - Static type checking for enhanced code reliability and developer experience
- ESLint - Code linting and style enforcement with Next.js and React-specific rules
- Prettier - Code formatting for consistent style across the codebase
- Utilizes Next.js 15 App Router for file-based routing with layouts and server components
- API routes handle external service integration (SendGrid, Namecheap, Firebase)
- Client components manage interactive functionality while server components handle data fetching
- Firebase Authentication integrated through context providers for session management
- Environment-based configuration for multiple deployment environments
- Protected routes using AuthGuard wrapper components
- React Context API for global state management (authentication, theme)
- TanStack Query for server state management, caching, and data synchronization
- Local component state for UI interactions and form management
- Tailwind CSS with custom configuration for HackPSU brand colors and spacing
- Component-based styling with shadcn/ui for consistent design system
- Responsive design patterns for mobile and desktop compatibility
- Next.js standalone output configuration for optimized Docker deployments
- Package import optimization for Material-UI components to reduce bundle size
- Static asset optimization with proper caching headers
- Node.js 18 or higher
- Yarn package manager
- Firebase project with authentication enabled
- SendGrid API key for email services
- Namecheap API credentials for domain management
- Clone the repository and navigate to the project directory
- Install dependencies:
yarn install
- Copy environment variables and configure:
cp .env.example .env.local
- Configure the following environment variables:
- Firebase configuration (API keys, project ID, auth domain)
- SendGrid API key for email services
- Namecheap API credentials (API key, username, client IP)
- Base URL for API endpoints
yarn dev- Start development server with Turbopack for faster buildsyarn build- Create production build with optimizationsyarn start- Start production serveryarn lint- Run ESLint for code quality checksyarn format- Format code using Prettier
Create .env.local with required variables:
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
SENDGRID_API_KEY=your_sendgrid_api_key
NAMECHEAP_API_KEY=your_namecheap_api_key
NAMECHEAP_API_USER=your_namecheap_username
NAMECHEAP_CLIENT_IP=your_client_ip
src/
├── app/ # Next.js App Router pages and API routes
│ ├── api/ # Server-side API endpoints
│ │ ├── email/ # Email forwarding management API
│ │ └── sendgrid/ # SendGrid analytics and stats API
│ ├── email/ # Email forwarding management page
│ ├── send/ # Sponsorship email creation interface
│ ├── sendgrid/ # Analytics dashboard pages
│ └── create-template/ # Email template creation tools
├── common/ # Shared utilities and configurations
│ ├── api/ # API client abstractions and hooks
│ ├── config/ # Environment and Firebase configuration
│ ├── context/ # React context providers
│ ├── namecheap/ # Namecheap API integration utilities
│ └── sendgrid/ # SendGrid utilities and type definitions
├── components/ # Reusable UI components
│ └── ui/ # shadcn/ui component library
└── lib/ # Utility functions and helpers
- Real-time viewing and editing of hackpsu.org email forwarding rules
- Bulk operations for adding, removing, and modifying forwarding entries
- Integration with Namecheap API for immediate DNS updates
- Validation and error handling for email address formats
- Template-based email creation with dynamic field insertion
- Preview functionality for email content before sending
- Batch email sending capabilities with personalization
- Integration with SendGrid for reliable email delivery
- Comprehensive metrics including delivery rates, open rates, and click-through rates
- Time-series data visualization with interactive charts and graphs
- Geographic performance tracking with heatmap visualizations
- Detailed breakdowns of email status, engagement, and deliverability issues
- Customizable date ranges and aggregation periods for data analysis
The application is configured for containerized deployment with Docker support:
- Standalone Next.js build output for optimized container size
- Environment variable configuration for different deployment stages
- PostHog proxy configuration for analytics data collection
- Production-ready security headers and CORS configuration
- TypeScript strict mode enabled for type safety
- ESLint configuration with Next.js and React-specific rules
- Prettier for consistent code formatting across the team
- Component composition patterns with proper separation of concerns
- Feature branches with descriptive names for all changes
- Code review process for all pull requests
- Testing of email functionality in development environment before production deployment
- Documentation updates for new features and API changes