-
-
Notifications
You must be signed in to change notification settings - Fork 0
Technology Stack
The Research Platform is built using a modern, type-safe technology stack optimized for developer productivity, maintainability, and performance. The stack emphasizes TypeScript throughout, ensuring type safety from database to UI.
Node.js 18+
- JavaScript runtime for server-side execution
- Required for Next.js and all build tools
Next.js 14.2.0
- React framework with App Router
- Server Components for optimal performance
- Built-in API routes for backend functionality
- Automatic code splitting and optimization
- Image optimization
- Built-in TypeScript support
React 18.3.0
- UI library for building interactive interfaces
- Server Components for server-side rendering
- Client Components for interactivity
- Concurrent rendering features
Primary Language: All application code is written in TypeScript
Benefits:
- Static type checking catches errors at compile time
- Better IDE support and autocomplete
- Self-documenting code through types
- Refactoring safety
Configuration:
- Strict mode enabled
- Path aliases (
@/*→./src/*) - ES2020 target
- Module resolution: bundler (Next.js)
Tailwind CSS 3.4.4
- Utility-first CSS framework
- Rapid UI development
- Consistent design system
- PurgeCSS for minimal bundle size
PostCSS 8.4.38
- CSS processing
- Autoprefixer for browser compatibility
CSS Modules
- Component-scoped styles
- Used for global styles (
globals.css)
Lucide React 0.427.0
- Modern icon library
- Tree-shakeable icons
- Consistent icon set
Custom UI Components
- Built on Tailwind CSS
- Reusable components in
components/ui/ - Includes: buttons, cards, inputs, selects, badges, etc.
React Hook Form 7.52.0
- Performant form library
- Minimal re-renders
- Built-in validation integration
Zod 3.23.8
- TypeScript-first schema validation
- Runtime type checking
- Form validation schemas
@hookform/resolvers 3.9.0
- Integration between React Hook Form and Zod
Recharts 2.12.7
- Composable charting library
- Built on D3.js
- Used for dashboard charts and analytics
Leaflet 1.9.4
- Open-source JavaScript library for interactive maps
- Mobile-friendly
- Plugin ecosystem
React Leaflet 4.2.1
- React components for Leaflet
- Type-safe wrapper
leaflet.markercluster 1.5.3
- Clustering plugin for map markers
- Improves performance with many markers
clsx 2.1.1
- Conditional className utility
- Cleaner class name composition
tailwind-merge 2.5.2
- Merge Tailwind classes intelligently
- Resolve conflicts automatically
date-fns 3.6.0
- Date manipulation and formatting
- Lightweight alternative to Moment.js
Next.js API Routes
- Built-in API functionality
- RESTful endpoint creation
- File-based routing for APIs
NextAuth.js 4.24.7
- Complete authentication solution
- Multiple provider support (currently Credentials)
- JWT session management
- Built-in CSRF protection
- Session callbacks for role management
bcryptjs 2.4.3
- Password hashing
- 10 rounds for security/performance balance
- Synchronous API (acceptable for auth flow)
PostgreSQL 14+
- Relational database management system
- ACID compliance
- Advanced features (JSON, arrays, etc.)
- Excellent performance and reliability
PostGIS (Extension)
- Spatial and geographic objects support
- Required for geospatial queries
- Enables location-based features
Prisma 5.19.0
- Next-generation ORM
- Type-safe database client
- Automatic migrations
- Prisma Studio for database management
- Connection pooling built-in
@prisma/client 5.19.0
- Generated TypeScript client
- Type-safe queries
- Auto-completion in IDE
papaparse 5.4.1
- CSV parsing and generation
- Used for data import/export
- Handles large files efficiently
xlsx 0.18.5
- Excel file generation
- Read/write .xlsx files
- Used for export functionality
jspdf 2.5.1
- PDF generation
- Client-side PDF creation
- Used for report generation
TypeScript Compiler
- Type checking
- Transpilation to JavaScript
- Integrated with Next.js
Next.js Build System
- SWC compiler (faster than Babel)
- Automatic optimization
- Tree shaking
- Code splitting
ESLint 8.57.0
- JavaScript/TypeScript linting
- Catches bugs and enforces style
eslint-config-next 14.2.0
- Next.js-specific ESLint rules
- Best practices enforcement
ts-node 10.9.2
- TypeScript execution environment
- Used for scripts (seed, migrations, etc.)
- Enables running TypeScript directly
Next.js Standalone Output
- Optimized production builds
- Minimal dependencies
- Docker-friendly
Environment Variables
-
.envfor local development - Next.js built-in env variable support
- Type-safe access through TypeScript
- None currently (self-contained application)
- File Storage: AWS S3, Google Cloud Storage (for document uploads)
- Email Service: SendGrid, AWS SES (for notifications)
- Monitoring: Sentry, DataDog (for error tracking)
- Analytics: Google Analytics, Plausible (for usage analytics)
npm
- Node package manager
- Lock file for reproducible installs
- Scripts defined in
package.json
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Last 2 versions of each
- Mobile browsers (iOS Safari, Chrome Mobile)
- Next.js includes necessary polyfills
- Core-js for additional compatibility (if needed)
- Tree shaking (automatic with Next.js)
- Code splitting by route
- Dynamic imports for heavy components (maps, charts)
- Optimized package imports (
optimizePackageImportsin next.config.js)
- Server Components reduce client JavaScript
- Prisma connection pooling
- Database query optimization
- Image optimization (Next.js Image component)
- bcryptjs: Password hashing
- NextAuth.js: Secure session management
- HTTP-only cookies: XSS protection
- Zod: Schema validation
- TypeScript: Compile-time type checking
- Regular updates via npm
- Dependabot configured (
.github/dependabot.yml) - Security advisories monitoring
-
@types/node: Node.js type definitions -
@types/react: React type definitions -
@types/react-dom: React DOM types -
@types/bcryptjs: bcryptjs types -
@types/leaflet: Leaflet types -
@types/papaparse: PapaParse types
-
autoprefixer: CSS vendor prefixing -
postcss: CSS processing -
tailwindcss: CSS framework
- Next.js: 14.2.0
- React: 18.3.0
- TypeScript: 5.5.0
- Prisma: 5.19.0
- Node.js: 18+ (required)
- Regular dependency updates
- Automated via Dependabot
- Major version updates require testing
- Lock file ensures consistent installs
- Full-stack framework: Frontend and backend in one
- Server Components: Optimal performance
- Developer experience: Excellent tooling
- Ecosystem: Large community and resources
- Deployment: Easy deployment options (Vercel, self-hosted)
- Type safety: Generated types from schema
- Developer experience: Excellent tooling (Prisma Studio)
- Migrations: Version-controlled schema changes
- Performance: Optimized queries, connection pooling
- Modern: Active development, good documentation
- Reliability: Battle-tested, ACID compliant
- Features: Advanced SQL, JSON support, full-text search
- PostGIS: Essential for geospatial data
- Performance: Excellent for complex queries
- Open source: No licensing costs
- Type safety: Catch errors before runtime
- Developer experience: Better IDE support
- Maintainability: Self-documenting code
- Refactoring: Safe code changes
- Team collaboration: Clear contracts between modules
- Redis: Caching and session storage
- Elasticsearch: Advanced search capabilities
- GraphQL: Alternative API layer (if needed)
- WebSockets: Real-time features
- Docker: Containerization for deployment
- Kubernetes: Orchestration (if scaling required)
This technology stack is chosen for its modern capabilities, strong TypeScript support, excellent developer experience, and proven reliability in production environments.
Last Updated: January 2025