utmmcss / deerhacks-backend Goto Github PK
View Code? Open in Web Editor NEWDeerHacks Hackthon Dashboard Server 2024
License: GNU General Public License v3.0
DeerHacks Hackthon Dashboard Server 2024
License: GNU General Public License v3.0
Research and implement a way to detect if malware is being uploaded through the resume-update endpoint and prevent it from being uploaded to s3 if so
Modify CheckInValidation function from arr to map
Objectives:
helpers/validateApplication.go
with go-validatorFrontend Types Schema:
export type QRCheckInReq = {
qrId: string
context: QRCheckInContext
}
export type QRCheckInResp = {
success: boolean
message: string
}
export type QRCheckInContext = keyof typeof QRCheckInContextEnum
const enum QRCheckInContextEnum {
REGISTRATION = 'registration',
DAY_1_DINNER = 'day_1_dinner',
DAY_2_BREAKFAST = 'day_2_breakfast',
DAY_2_LUNCH = 'day_2_lunch',
DAY_2_DINNER = 'day_2_dinner',
DAY_3_BREAKFAST = 'day_3_breakfast',
}
Add rejection emails in admin-user-update. Use templates with the brevo api instead of typing them into the code directly.
If an attended hacker is scanning in for registration again, it will result in an error.
Request Schema:
POST Update Application (/application-update)
Request & No Response (Look for 200 status code)
{
is_draft: boolean
application: {
Application data …
}
}
Ensure the validity of data:
Leave Resume for now. This will require integration with S3 which is not configured yet
Application.FirstName
, Application.LastName
, Application.Email
from Application
DB model schemaRequest Schema:
POST Update User (/user-update)
*** can only update before registering
Request:
{
name?: string
email?: string
}
No Response only status code.
Setup S3 for Resumes such that the update-application endpoint uploads an applicants resume to S3. This data should then be fetched in the get-application endpoint.
Request Schema:
GET Get Application Data (/application-get)
Request:
{Authorization in Cookies}
Response:
{
is_draft: boolean
application: {
Application data …
}
}
Criteria to follow as of October 30 2023:
Only allow 20 email updates per user per day.
Create a new table for email verifications which holds the context, token, user id, and expiry date (make expiry 1 day)
Update /user-update endpoint such that:
Implementation Details:
Update user table to include a "update_limit" field. Every time someone changes their email, they must wait 2 hours to update it again
Generate a random uuid to represent the token for the email verification. You can do this with the existing uuid package in the project.
Save the token, expiry date, and user id to the new table you created and set the context to "email" (All email requests to user-update fall into the email context)
Send an email to the user which has the link "https://deerhacks.ca/verify?token={token here}"
If we are unable to send an email due to passing the 300 email limit, post pone the sending to tomorrow. Ensure we don't have more than 300 post poned emails.
Add /email-verify endpoint:
Given the token, fetch the context and user from the table you created. If the context is "email" and the token is valid, update that corresponding user's status to "registering"
If the token is "rsvp" set status to "accepted"
We want to have an email template design for email verification
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.