Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 0 additions & 33 deletions .ebextensions/03_ssh_keys.config

This file was deleted.

6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage - compile TypeScript
FROM node:25 AS builder
FROM node:20 AS builder
WORKDIR /app

COPY package.json tsconfig.build.json ./
Expand All @@ -11,11 +11,11 @@ RUN cd src/backend && npx prisma generate
RUN yarn build:shared
RUN yarn build:backend

FROM platformatic/node-caged:25-slim
FROM node:20-slim
WORKDIR /app

# Install OpenSSL for Prisma (slim image needs this)
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/* && npm install -g yarn
RUN apt-get update -y && apt-get install -y openssl && rm -rf /var/lib/apt/lists/*

COPY package.json ./

Expand Down
2 changes: 1 addition & 1 deletion devContainerization/Dockerfile.backend.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:25
FROM node:20

COPY package.json tsconfig.build.json ./
COPY ./src/backend/package.json ./src/backend/tsconfig.json src/backend/
Expand Down
4 changes: 2 additions & 2 deletions devContainerization/Dockerfile.frontend.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:25-alpine
FROM node:20-alpine

COPY package.json tsconfig.build.json ./
COPY ./src/frontend/package.json ./src/frontend/tsconfig.json src/frontend/
Expand All @@ -11,4 +11,4 @@ COPY ./src/frontend src/frontend
COPY ./src/shared src/shared

EXPOSE 3000
CMD [ "yarn", "workspace", "frontend", "vite", "--force", "--host" ]
CMD [ "yarn", "workspace", "frontend", "vite", "--force", "--host" ]
2 changes: 1 addition & 1 deletion infrastructure/modules/elasticbeanstalk/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ variable "solution_stack_name" {
description = "Elastic Beanstalk solution stack name"
type = string
# Find the latest: aws elasticbeanstalk list-available-solution-stacks
default = "64bit Amazon Linux 2023 v4.11.0 running Docker"
default = "64bit Amazon Linux 2023 v4.7.4 running Docker"
}

variable "vpc_id" {
Expand Down
4 changes: 0 additions & 4 deletions infrastructure/modules/monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,6 @@ resource "aws_cloudwatch_metric_alarm" "eb_memory_high" {
Environment = var.environment
Project = var.project_name
}

lifecycle {
ignore_changes = [metric_query]
}
}

#############
Expand Down
8 changes: 0 additions & 8 deletions infrastructure/modules/network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ resource "aws_security_group" "eb_instance" {
security_groups = [aws_security_group.alb.id]
}

ingress {
description = "SSH access"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}

egress {
description = "Allow all outbound traffic"
from_port = 0
Expand Down
1 change: 0 additions & 1 deletion infrastructure/scripts/ssh-to-eb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ echo "🔌 Connecting to EB instance..."
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Instance: $INSTANCE_IP ($INSTANCE_ID)"
echo "Direct SSH: ssh -i $KEY_PATH_EXPANDED ec2-user@$INSTANCE_IP"
echo "User: ec2-user"
echo ""
echo "Useful commands once connected:"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"@babel/preset-typescript": "^7.18.6",
"@types/canvas-confetti": "^1.9.0",
"@types/jest": "^29.5.14",
"@types/node": "^25.0.0",
"@types/node": "20.0.0",
"@typescript-eslint/eslint-plugin": "8.20.0",
"@typescript-eslint/parser": "8.20.0",
"concurrently": "^9.1.0",
Expand Down
3 changes: 1 addition & 2 deletions src/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# TO BE RUN FROM DOCKER COMPOSE. DO NOT RUN MANUALLY AS CONTEXT IS NOT SET CORRECTLY
FROM platformatic/node-caged:25-slim
RUN npm install -g yarn
FROM node:20

WORKDIR /base

Expand Down
3 changes: 1 addition & 2 deletions src/backend/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { Organization, Prisma } from '@prisma/client';
import { Organization } from '@prisma/client';
import { User as SharedUser } from 'shared';

declare global {
namespace Express {
export interface Request {
currentUser: SharedUser;
organization: Organization;
currentCar?: Prisma.CarGetPayload<{ include: { wbsElement: true } }>;
}
}
}
6 changes: 0 additions & 6 deletions src/backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import cors from 'cors';
import cookieParser from 'cookie-parser';
import { getUserAndOrganization, prodHeaders, requireJwtDev, requireJwtProd } from './src/utils/auth.utils.js';
import { errorHandler } from './src/utils/errors.utils.js';
import { getCurrentCar } from './src/utils/car.utils.js';
import userRouter from './src/routes/users.routes.js';
import projectRouter from './src/routes/projects.routes.js';
import teamsRouter from './src/routes/teams.routes.js';
Expand All @@ -28,7 +27,6 @@ import partsRouter from './src/routes/parts.routes.js';
import financeRouter from './src/routes/finance.routes.js';
import calendarRouter from './src/routes/calendar.routes.js';
import prospectiveSponsorRouter from './src/routes/prospective-sponsor.routes.js';
import attendanceRouter from './src/routes/attendance.routes.js';

const app = express();

Expand Down Expand Up @@ -91,9 +89,6 @@ app.use(isProd ? requireJwtProd : requireJwtDev);
// get user and organization
app.use(getUserAndOrganization);

// get current car
app.use(getCurrentCar);

// routes
app.use('/users', userRouter);
app.use('/projects', projectRouter);
Expand All @@ -117,7 +112,6 @@ app.use('/parts', partsRouter);
app.use('/finance', financeRouter);
app.use('/calendar', calendarRouter);
app.use('/prospective-sponsors', prospectiveSponsorRouter);
app.use('/attendance', attendanceRouter);
app.use('/', (_req, res) => {
res.status(200).json('Welcome to FinishLine');
});
Expand Down
2 changes: 1 addition & 1 deletion src/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"devDependencies": {
"@types/express-jwt": "^6.0.4",
"@types/jsonwebtoken": "^8.5.9",
"@types/node": "^25.0.0",
"@types/node": "^20.0.0",
"@types/supertest": "^2.0.12",
"nodemon": "^2.0.16",
"supertest": "^6.2.4",
Expand Down
63 changes: 0 additions & 63 deletions src/backend/src/controllers/attendance.controllers.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/backend/src/controllers/calendar.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,18 +596,4 @@ export default class CalendarController {
next(error);
}
}

static async getAllEventsPaginated(req: Request, res: Response, next: NextFunction) {
try {
const { cursor, pageSize } = req.body;
const paginatedEvents = await CalendarService.getAllEventsPaginated(
req.organization,
cursor ? new Date(cursor) : undefined,
pageSize ? parseInt(pageSize) : undefined
);
res.status(200).json(paginatedEvents);
} catch (error: unknown) {
next(error);
}
}
}
23 changes: 4 additions & 19 deletions src/backend/src/controllers/change-requests.controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,7 @@ export default class ChangeRequestsController {

static async getAllChangeRequests(req: Request, res: Response, next: NextFunction) {
try {
const changeRequests = await ChangeRequestsService.getAllChangeRequests(req.organization, req.currentCar?.carId);
res.status(200).json(changeRequests);
} catch (error: unknown) {
next(error);
}
}

static async getAllGuestChangeRequests(req: Request, res: Response, next: NextFunction) {
try {
const changeRequests = await ChangeRequestsService.getAllGuestChangeRequests(req.organization);
const changeRequests = await ChangeRequestsService.getAllChangeRequests(req.organization);
res.status(200).json(changeRequests);
} catch (error: unknown) {
next(error);
Expand All @@ -34,11 +25,7 @@ export default class ChangeRequestsController {

static async getToReviewChangeRequests(req: Request, res: Response, next: NextFunction) {
try {
const changeRequests = await ChangeRequestsService.getToReviewChangeRequests(
req.currentUser,
req.organization,
req.currentCar?.carId
);
const changeRequests = await ChangeRequestsService.getToReviewChangeRequests(req.currentUser, req.organization);
res.status(200).json(changeRequests);
} catch (error: unknown) {
next(error);
Expand All @@ -54,8 +41,7 @@ export default class ChangeRequestsController {
const changeRequests = await ChangeRequestsService.getUnreviewedChangeRequests(
req.currentUser,
validatedWbs,
req.organization,
req.currentCar?.carId
req.organization
);
res.status(200).json(changeRequests);
} catch (error: unknown) {
Expand All @@ -72,8 +58,7 @@ export default class ChangeRequestsController {
const changeRequests = await ChangeRequestsService.getApprovedChangeRequests(
req.currentUser,
validatedWbs,
req.organization,
req.currentCar?.carId
req.organization
);
res.status(200).json(changeRequests);
} catch (error: unknown) {
Expand Down
Loading