Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
440a650
Create checkin form submit endpoint
Mar 24, 2025
c8b1077
Finish hacker checkin form submit endpoint
May 3, 2025
d12fdac
Change checkin form spreadsheet
Sep 26, 2025
2cc2cee
api route for checking in teams
Oct 18, 2025
36f2517
Add devpost and discord tag field validation
Oct 31, 2025
6af09f6
Update db with devpost url
Nov 2, 2025
2d5bd65
Add url validation:
Nov 3, 2025
9508860
added team checkin form status to settings
Jan 7, 2026
b82b20c
remove workshops
Jan 13, 2026
2229ad1
more validation
Jan 14, 2026
f7d8d9a
test
Jan 14, 2026
794c97b
Updated email template dates and header logo
janekhuong Oct 24, 2025
700151f
Added hackboard role support
MikaVohl Nov 8, 2025
f4713e7
Revert "Added hackboard role support"
MikaVohl Nov 8, 2025
b31b2db
Feat/auto emails (#949)
janekhuong Nov 17, 2025
cdb74b1
Feat/create application review (#944)
JamieXiao Nov 18, 2025
98fa9ec
fixed merge issue with objectIDs
tektaxi Nov 18, 2025
f42363b
Added hackboard role support (#955)
MikaVohl Nov 18, 2025
743f70d
Updated account invitation email content
janekhuong Nov 18, 2025
e3b6f8d
Feat/assign reviewers (#959)
tektaxi Nov 20, 2025
878c83f
Added script for sending interest form emails (#954)
janekhuong Nov 20, 2025
d38d64c
quick fixes to assignReviewers (#961)
JamieXiao Nov 21, 2025
ea0f4c0
cut off to dec 1 11:59 pm
JamieXiao Dec 2, 2025
73c10fd
update cutoff
JamieXiao Dec 3, 2025
c7912e6
date fix??
tektaxi Dec 3, 2025
3502b5b
add hacker id to team api response schema
Nov 22, 2025
4a28bb4
new acceptance email
janekhuong Dec 14, 2025
3bbd1be
updated Marriott booking deadline
janekhuong Dec 15, 2025
9b150a2
round 2 acceptance email template
janekhuong Dec 28, 2025
4c28dbe
updated rejection email
janekhuong Jan 7, 2026
1e16280
updated wording
janekhuong Jan 8, 2026
a32e7a4
added volunteer link
janekhuong Jan 8, 2026
580a345
added applied status to validateStatus function
janekhuong Jan 9, 2026
4860145
overrode email template to send declined emails to hackers with appli…
janekhuong Jan 11, 2026
b4d7063
Finish hacker checkin form submit endpoint
May 3, 2025
01c5b76
format sheet name
Jan 15, 2026
4422f5c
remove checkin router dup
Jan 15, 2026
626da38
fix
Jan 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 20 additions & 16 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const Services = {
log: require("./services/logger.service"),
db: require("./services/database.service"),
auth: require("./services/auth.service"),
env: require("./services/env.service")
env: require("./services/env.service"),
};

const envLoadResult = Services.env.load(path.join(__dirname, "./.env"));
Expand All @@ -31,6 +31,8 @@ const searchRouter = require("./routes/api/search");
const settingsRouter = require("./routes/api/settings");
const volunteerRouter = require("./routes/api/volunteer");
const roleRouter = require("./routes/api/role");
const checkinRouter = require("./routes/api/checkin");
const emailsRouter = require("./routes/api/emails");

const app = express();
Services.db.connect();
Expand All @@ -40,42 +42,40 @@ let corsOptions = {};
if (!Services.env.isProduction()) {
corsOptions = {
origin: [`http://${process.env.FRONTEND_ADDRESS_DEV}`],
credentials: true
credentials: true,
};
} else {
corsOptions = {
origin: (origin, callback) => {
const allowedOrigins = [
`https://${process.env.FRONTEND_ADDRESS_DEPLOY}`,
`https://${process.env.FRONTEND_ADDRESS_BETA}`,
`https://docs.mchacks.ca`
`https://docs.mchacks.ca`,
];

const regex = /^https:\/\/dashboard-[\w-]+\.vercel\.app$/;

if (
allowedOrigins.includes(origin) || // Explicitly allowed origins
regex.test(origin) // Matches dashboard subdomains
regex.test(origin) // Matches dashboard subdomains
) {
callback(null, true);
} else {
callback(new Error('Not allowed by CORS'));
callback(new Error("Not allowed by CORS"));
}
},
credentials: true
credentials: true,
};
}



app.use(cors(corsOptions));
app.use(Services.log.requestLogger);
app.use(Services.log.errorLogger);
app.use(express.json());
app.use(
express.urlencoded({
extended: false
})
extended: false,
}),
);
app.use(cookieParser());
//Cookie-based session tracking
Expand All @@ -86,8 +86,8 @@ app.use(
// Cookie Options
maxAge: 48 * 60 * 60 * 1000, //Logged in for 48 hours
sameSite: process.env.COOKIE_SAME_SITE,
secureProxy: !Services.env.isTest()
})
secureProxy: !Services.env.isTest(),
}),
);
app.use(passport.initialize());
app.use(passport.session()); //persistent login session
Expand Down Expand Up @@ -116,10 +116,14 @@ settingsRouter.activate(apiRouter);
Services.log.info("Settings router activated");
roleRouter.activate(apiRouter);
Services.log.info("Role router activated");
checkinRouter.activate(apiRouter);
Services.log.info("Checkin router activated");
emailsRouter.activate(apiRouter);
Services.log.info("Emails router activated");
checkinRouter.activate(apiRouter);
Services.log.info("Checkin router activated");

apiRouter.use("/", indexRouter);
app.use("/", indexRouter);

app.use("/api", apiRouter);

//Custom error handler
Expand All @@ -140,10 +144,10 @@ app.use((err, req, res, next) => {
}
res.status(status).json({
message: message,
data: errorContents
data: errorContents,
});
});

module.exports = {
app: app
app: app,
};
2 changes: 1 addition & 1 deletion assets/email/AccountConfirmation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;" >
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;" >
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
mc:label="header_image" mc:edit="header_image" mc:allowdesigner
mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
21 changes: 5 additions & 16 deletions assets/email/AccountInvitation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand All @@ -384,22 +384,11 @@
<br><br>
You've been invited to create an account on our <a
href="https://app.mchacks.ca/"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">sponsor
dashboard</a>. On the sponsor dashboard you can find important
information about check-in, mentoring, judging, workshops, Discord, and
the schedule for the weekend. On the sponsor dashboard you will be able
to look up hacker applications and information. Additionally, if you
have resume access you will be able to download hacker resumes through
the dashboard.
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">
dashboard</a>. On the dashboard you will be able
to look up hacker applications and information.
<br><br>
Sponsor check-in starts at 6:00 pm on Saturday, January 28th on the
McHacks Discord server and opening ceremonies will begin at 7:00 pm. Be
sure to get set up on the McHacks Discord server at <a
href="https://discord.gg/XVSdW9pc"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#F2463A;text-decoration:none;">https://discord.gg/XVSdW9pc</a>
and contact your coordinator to set up your server roles.
<br><br>
Get access to the sponsor dashboard by clicking on the button below.
Get access to the dashboard by clicking on the button below.
</p>
<div class="center" style="text-align:center;">
<a href="{{{link}}}" class="button"
Expand Down
2 changes: 1 addition & 1 deletion assets/email/ResetPassword.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="templateHeader" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;" >
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;" >
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59" alt="Logo" title="Logo" id="headerImage"
mc:label="header_image" mc:edit="header_image" mc:allowdesigner
mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/Ticket.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;">
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/static/mchacks-long-tight.png" width="250"
<img src="https://mchacks.ca/static/martlet-text-13.png" width="250"
height="59" alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/Welcome.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;border-collapse:collapse;">
<tr>
<td valign="top" class="headerContent" style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/static/mchacks-long-tight.png" width="250"
<img src="https://mchacks.ca/static/martlet-text-13.png" width="250"
height="59" alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
</td>
Expand Down
2 changes: 1 addition & 1 deletion assets/email/marketingEmail/3Days.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down
2 changes: 1 addition & 1 deletion assets/email/marketingEmail/EmailBlast.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
<tr>
<td valign="top" class="headerContent"
style="-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;color:#4D4D4D;mso-table-lspace:0pt;mso-table-rspace:0pt;">
<img src="https://mchacks.ca/mchacks-long-tight.png" width="250" height="59"
<img src="https://mchacks.ca/martlet-text-13.png" width="250" height="59"
alt="Logo" title="Logo" id="headerImage" mc:label="header_image"
mc:edit="header_image" mc:allowdesigner mc:allowtext
style="-ms-interpolation-mode:bicubic;border-width:0;line-height:100%;outline-style:none;text-decoration:none;height:auto;max-width:30%;width:250px;padding-top:20px;padding-bottom:20px;margin-left:auto;margin-right:auto;display:block;" />
Expand Down
Loading