feat(project): Configure Site Infrastructure and Core Components#4
Merged
feat(project): Configure Site Infrastructure and Core Components#4
Conversation
…tabase connections
…ications, and API responses
…ration and database modules
6 tasks
There was a problem hiding this comment.
Pull request overview
This pull request establishes the foundational infrastructure for a Caltech MSC website, including configuration management, database setup, type definitions, and basic UI components. The infrastructure provides a solid foundation for building out the full application.
Changes:
- Centralized configuration system with environment variable validation and site metadata
- Singleton Prisma database client to prevent connection exhaustion
- Comprehensive TypeScript type definitions extending Prisma models with relation types
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Added ES2017 target and excluded seed file from compilation |
| src/types/index.ts | Defined extended Prisma types, API response wrappers, and utility types |
| src/scripts/verify-infra.ts | Infrastructure verification script for testing config and database |
| src/lib/db/client.ts | Singleton Prisma client with hot-reload protection |
| src/config/site.ts | Site metadata, navigation, and feature flags configuration |
| src/config/index.ts | Centralized configuration exports |
| src/config/env.ts | Environment variable validation schema using Zod |
| src/app/page.tsx | Placeholder home page component |
| src/app/layout.tsx | Root layout with Inter font and basic metadata |
| src/app/globals.css | Tailwind setup with CSS variables for theming |
| package.json | Added zod and autoprefixer dependencies |
| package-lock.json | Updated lockfile with new dependencies |
| .env.example | Added environment variable examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…itle and description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Established the core frontend and backend infrastructure for the application. This setup includes a centralized configuration management system with environment variable validation, a singleton Prisma client for efficient database access, global type definitions for data models and API responses, and the fundamental layout components and styles. Additionally, an infrastructure verification script has been implemented to ensure system integrity.
Changes:
Implemented Centralized Configuration (
src/config):env.tswithzodschema validation to ensure type-safe and validated environment variables at runtime.site.tsto manage static site metadata, navigation menus (main and admin), feature flags, and default SEO settings.Configured Database Client (
src/lib/db):PrismaClientpattern inclient.tsto prevent connection exhaustion during Next.js hot reloads in development.Defined Core Type System (
src/types):index.tsexporting extended Prisma types (including relations likeMemberWithRelations), API response wrappers, and utility types for forms and filters.Established UI Foundation (
src/app):globals.csswith a comprehensive CSS variable theme system for light/dark modes (Tailwind CSS integration).layout.tsxwith basic font and metadata configuration.page.tsxhome page.Added Maintenance Tools (
src/scripts):verify-infra.ts, a script to validate configuration integrity and database connectivity/relationships.Updated Project Dependencies:
tsconfig.jsonpaths and targets.package.jsonandpackage-lock.jsonwith necessary UI libraries (zod,autoprefixer) and configured dependencies for browser compatibility.