Skip to content

Commit afd3006

Browse files
Merge pull request #30 from ModusCreateOrg/ADE-124
ADE-124 Deploying stack and integrating frontend with backend
2 parents 9cd4714 + 2fe39a1 commit afd3006

32 files changed

+290
-960
lines changed

.cursor/rules/general.mdc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
description: Follow this rules for every request
33
globs:
4-
alwaysApply: true
54
---
65

76
- Project Proposal Overview: This project proposes an AI-powered medical report translator that simplifies complex medical documents for patients and caregivers. By leveraging AI-driven text extraction and natural language processing (NLP), the system translates medical jargon into plain language, helping users understand their health conditions, diagnoses, and test results without relying on unreliable online searches.
@@ -122,6 +121,10 @@ AWS architecture: [aws architecture.pdf](mdc:docs/assets/aws architecture.pdf)
122121
```
123122
```
124123

124+
# Typescript rules
125+
126+
- Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.
127+
125128
This rule provides clear guidelines on what units to use, how to convert between units, and why it's important for your project. You can add this to your general rules to ensure consistency across the codebase.
126129

127130
Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.

backend/Dockerfile.prod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:20-slim as builder
1+
FROM node:20-slim AS builder
22

33
ARG NODE_ENV=production
44
ENV NODE_ENV=${NODE_ENV}

backend/bin/backend.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

backend/cdk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"app": "npx ts-node --prefer-ts-exts bin/backend.ts",
2+
"app": "npx ts-node --prefer-ts-exts src/iac/cdk.index.ts",
33
"watch": {
44
"include": [
55
"**"

backend/infrastructure/reports-table.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

backend/src/app.module.spec.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Test } from '@nestjs/testing';
22
import { AppModule } from './app.module';
33
import { ConfigModule } from '@nestjs/config';
44
import { JwtModule } from '@nestjs/jwt';
5-
import { JwtStrategy } from './auth/jwt.strategy';
65
import { ReportsService } from './reports/reports.service';
76
import { vi, describe, it, expect } from 'vitest';
87

@@ -20,10 +19,6 @@ describe('AppModule', () => {
2019
AppModule,
2120
],
2221
})
23-
.overrideProvider(JwtStrategy)
24-
.useValue({
25-
validate: vi.fn().mockImplementation(payload => payload),
26-
})
2722
.overrideProvider(ReportsService)
2823
.useValue({
2924
findAll: vi.fn().mockResolvedValue([]),

backend/src/app.module.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
1+
import { Module, NestModule } from '@nestjs/common';
22
import { ConfigModule } from '@nestjs/config';
33
import configuration from './config/configuration';
44
import { AppController } from './app.controller';
55
import { AppService } from './app.service';
66
import { AwsSecretsService } from './services/aws-secrets.service';
77
import { PerplexityService } from './services/perplexity.service';
88
import { PerplexityController } from './controllers/perplexity/perplexity.controller';
9-
import { AuthModule } from './auth/auth.module';
109
import { UserController } from './user/user.controller';
11-
import { AuthMiddleware } from './auth/auth.middleware';
12-
import { UserModule } from './user/user.module';
1310
import { ReportsModule } from './reports/reports.module';
14-
11+
import { HealthController } from './health/health.controller';
1512
@Module({
1613
imports: [
1714
ConfigModule.forRoot({
1815
isGlobal: true,
1916
load: [configuration],
2017
}),
21-
AuthModule,
22-
UserModule,
2318
ReportsModule,
2419
],
25-
controllers: [AppController, PerplexityController, UserController],
20+
controllers: [AppController, HealthController, PerplexityController, UserController],
2621
providers: [AppService, AwsSecretsService, PerplexityService],
2722
})
2823
export class AppModule implements NestModule {
29-
configure(consumer: MiddlewareConsumer) {
30-
consumer.apply(AuthMiddleware).forRoutes('*');
24+
configure() {
25+
// Add your middleware configuration here if needed
26+
// If you don't need middleware, you can leave this empty
3127
}
3228
}

backend/src/auth/auth.middleware.spec.ts

Lines changed: 0 additions & 116 deletions
This file was deleted.

backend/src/auth/auth.middleware.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

backend/src/auth/auth.module.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)