Add CSV Participant Import Feature for Groups + Docker Improvements #6
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.
Description
This PR introduces a new feature allowing group owners to import participants into a group via CSV upload. It includes the full frontend and backend implementation for parsing and validating participant data, previewing entries before import, handling errors, and updating the database.
Internationalization has been added for all related UI and error messages (EN, ES, PT).
Additionally, this PR adds Docker to support development and deployment workflows, and applies a small fix to the lottery endpoint.
Related Issue
Closes #5
Type of Change
Changes Made
Participant Import Feature
Added
ParticipantsImportCardcomponent enabling CSV upload, participant preview, validation, error handling, and import flow.Files:
app/[locale]/group/[groupId]/dashboard/ParticipantsImportCard.tsxGroupDashboard.tsx.Added new backend endpoint:
POST /api/group/import-participantsFeatures:
Internationalization
Files updated:
messages/en.jsonmessages/es.jsonmessages/pt.jsonDevOps / Docker
.dockerignoreto reduce build context size.Dockerfilefor efficient Next.js builds and production runtime.Minor Fixes
File:
app/api/lottery/run/route.tsScreenshots
Testing
The feature has been manually validated in a real group context, ensuring CSV files are correctly parsed, validated, previewed, and imported, and that permissions and error states behave as expected.
Test Environment
Test Steps
Test Results
Checklist
Code Quality
npm run checkand all checks passnpm run buildand the build succeedsconsole.logstatements (except intentional logging)Documentation
Security
Dependencies
npm auditand addressed any issuesBreaking Changes
None
Additional Notes
Reviewer Checklist