Merged
Conversation
…ndencies to backend
…es with type definitions
…ler, and routes for guest login and user profile retrieval
…lidation and add user-related interfaces
…ice for CRUD operations
…llController and PollService
…rorHandler middleware
…s services and health checks
LordEaster
approved these changes
Feb 16, 2025
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.
This pull request includes significant updates to the backend of the application, focusing on adding new dependencies, updating the Prisma schema and migrations, seeding the database, and setting up the Express server with middleware.
Dependency Updates:
backend/package.json: Added new dependencies such asbcrypt,express-validator,helmet,jsonwebtoken,morgan, andredis, along with their respective type definitions.Prisma Schema and Migrations:
backend/prisma/schema.prisma: Updated the schema to include new models (Event,Option,WhitelistUser,Guest,VoteRestriction) and modified existing models (User,Poll).backend/prisma/migrations/20250214050654_v_1/migration.sql: Removed old tables and constraints related tousers,polls,poll_options,votes,poll_stats, andpoll_option_stats.backend/prisma/migrations/20250216124341_init/migration.sql: Added new tables and constraints forUser,Event,Poll,Option,WhitelistUser,Guest,VoteRestriction, andVote.Seeding the Database:
backend/prisma/seeds/seed.ts: Created a seed script to populate the database with initial data, including an admin user, an event, polls, options, and guests.Express Server Setup:
backend/src/app.ts: Set up the Express server with middleware for CORS, security headers, logging, and JSON parsing. Added a basic route and a global error handler. Implemented graceful shutdown and connected to Prisma.Prisma Client Initialization:
backend/prisma/prisma.ts: Initialized and exported the Prisma client for database interactions.