Skip to content

feat(project): Configure Site Infrastructure and Core Components#4

Merged
TKanX merged 20 commits intomainfrom
feature/3-configure-site-infrastructure
Jan 29, 2026
Merged

feat(project): Configure Site Infrastructure and Core Components#4
TKanX merged 20 commits intomainfrom
feature/3-configure-site-infrastructure

Conversation

@TKanX
Copy link
Copy Markdown
Member

@TKanX TKanX commented Jan 29, 2026

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):

    • Added env.ts with zod schema validation to ensure type-safe and validated environment variables at runtime.
    • Created site.ts to manage static site metadata, navigation menus (main and admin), feature flags, and default SEO settings.
  • Configured Database Client (src/lib/db):

    • Implemented a singleton PrismaClient pattern in client.ts to prevent connection exhaustion during Next.js hot reloads in development.
  • Defined Core Type System (src/types):

    • Created a comprehensive index.ts exporting extended Prisma types (including relations like MemberWithRelations), API response wrappers, and utility types for forms and filters.
  • Established UI Foundation (src/app):

    • Set up globals.css with a comprehensive CSS variable theme system for light/dark modes (Tailwind CSS integration).
    • Created layout.tsx with basic font and metadata configuration.
    • Added a placeholder page.tsx home page.
  • Added Maintenance Tools (src/scripts):

    • Developed verify-infra.ts, a script to validate configuration integrity and database connectivity/relationships.
  • Updated Project Dependencies:

    • Configured tsconfig.json paths and targets.
    • Updated package.json and package-lock.json with necessary UI libraries (zod, autoprefixer) and configured dependencies for browser compatibility.

@TKanX TKanX self-assigned this Jan 29, 2026
Copilot AI review requested due to automatic review settings January 29, 2026 03:27
@TKanX TKanX added the enhancement ✨ New feature or request label Jan 29, 2026
@TKanX TKanX linked an issue Jan 29, 2026 that may be closed by this pull request
6 tasks
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/app/layout.tsx Outdated
Comment thread package.json Outdated
Comment thread src/config/env.ts Outdated
@TKanX TKanX merged commit b5dc7c0 into main Jan 29, 2026
2 checks passed
@TKanX TKanX deleted the feature/3-configure-site-infrastructure branch January 29, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure Site Infrastructure

2 participants