Conversation
- Add PostgreSQL schema with foreign key relationships (organizations, students, internships, complete) - Implement reproducible data seeding with Faker.js - Create database cleanup utilities for clean development workflow - Add comprehensive data display functions with relational queries - Configure Drizzle Kit for database migrations and schema management - Set up TypeScript compilation and npm scripts for seed/clean/query operations - Add proper .gitignore rules for node_modules and build artifacts - Ensure 1:1 student-internship relationships for independent data modeling
Replaces usage of static fake data with dynamic data fetched from a new /api/internships endpoint backed by a PostgreSQL database via Drizzle ORM. Adds database schema, query utilities, data converters, and React hooks for fetching and displaying internships. Updates UI components to use new types and data flow, adds skeleton loaders, and improves error handling and sorting. Cleans up seed scripts and removes unnecessary console logs.
…ization - Connected the parser to the database, enabling real-time data retrieval - Implemented HTTP 500 error response when a database read operation fails - Added a clear error message when no internship/stage entries are found - Improved normalization logic across various fields to ensure consistent formatting and cleaner data input/output
There was a problem hiding this comment.
Pull Request Overview
This PR connects the Excel parser to the database, improves error handling in data pipelines, and normalizes fields for consistency across import/export boundaries. It also updates the frontend to consume real data from Supabase instead of fake mocks.
- Wire up parser output into Supabase insertion scripts
- Add robust field normalization and validation in import tools
- Refactor UI components to fetch and display live data
Reviewed Changes
Copilot reviewed 48 out of 55 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/lib/format-date.ts | Parse multi-range date strings and handle French/ISO formats |
| src/features/internship/internship-card.tsx | Migrate card to use InternshipCardData and real database fields |
| src/features/internship/internship-header.tsx | Switch header to count live internships and adjust layout props |
Files not reviewed (4)
- backend/package-lock.json: Language not supported
- backend/projetParseur/pnpm-lock.yaml: Language not supported
- pnpm-lock.yaml: Language not supported
- projetParseur/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)
src/features/internship/internship-header.tsx:12
- [nitpick] The prop
fakeInternshipsnow holds real data; consider renaming it tointernshipsto avoid confusion and better reflect its purpose.
export function InternshipHeader({ fakeInternships, sort, setSort }: InternshipHeaderProps) {
src/lib/format-date.ts:27
- The
toLocaleDateStringcall omits theyear: 'numeric'option, so the year isn’t displayed. Addyear: 'numeric'to the options.
return date.toLocaleDateString("fr-FR", {
| <GraduationCap className="h-4 w-4" /> | ||
| <span> | ||
| {internship.year} - {student.major} | ||
| 2A - {internship.student.major || "??"} |
There was a problem hiding this comment.
The year is hard-coded as "2A" but should use the dynamic internship.internship.year field. Update to ${internship.internship.year} - ....
Suggested change
| 2A - {internship.student.major || "??"} | |
| {internship.internship.year} - {internship.student.major || "??"} |
Replaces Drizzle ORM with Supabase client for fetching internship, student, and organization data. Updates query logic, sorting, and data transformation to match Supabase's API and response structure. Improves error handling and ensures environment variables are checked for Supabase configuration.
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.
No description provided.