Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
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
5 changes: 4 additions & 1 deletion .cursor/rules/general.mdc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
description: Follow this rules for every request
globs:
alwaysApply: true
---

- 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.
Expand Down Expand Up @@ -122,4 +121,8 @@ AWS architecture: [aws architecture.pdf](mdc:docs/assets/aws architecture.pdf)
```
```

# Typescript rules

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

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.
2 changes: 1 addition & 1 deletion backend/Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-slim as builder
FROM node:20-slim AS builder

ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
Expand Down
12 changes: 0 additions & 12 deletions backend/bin/backend.ts

This file was deleted.

2 changes: 1 addition & 1 deletion backend/cdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"app": "npx ts-node --prefer-ts-exts bin/backend.ts",
"app": "npx ts-node --prefer-ts-exts src/iac/cdk.index.ts",
"watch": {
"include": [
"**"
Expand Down
30 changes: 0 additions & 30 deletions backend/infrastructure/reports-table.ts

This file was deleted.

5 changes: 0 additions & 5 deletions backend/src/app.module.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Test } from '@nestjs/testing';
import { AppModule } from './app.module';
import { ConfigModule } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { JwtStrategy } from './auth/jwt.strategy';
import { ReportsService } from './reports/reports.service';
import { vi, describe, it, expect } from 'vitest';

Expand All @@ -20,10 +19,6 @@ describe('AppModule', () => {
AppModule,
],
})
.overrideProvider(JwtStrategy)
.useValue({
validate: vi.fn().mockImplementation(payload => payload),
})
.overrideProvider(ReportsService)
.useValue({
findAll: vi.fn().mockResolvedValue([]),
Expand Down
16 changes: 6 additions & 10 deletions backend/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
import { Module, NestModule } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import configuration from './config/configuration';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { AwsSecretsService } from './services/aws-secrets.service';
import { PerplexityService } from './services/perplexity.service';
import { PerplexityController } from './controllers/perplexity/perplexity.controller';
import { AuthModule } from './auth/auth.module';
import { UserController } from './user/user.controller';
import { AuthMiddleware } from './auth/auth.middleware';
import { UserModule } from './user/user.module';
import { ReportsModule } from './reports/reports.module';

import { HealthController } from './health/health.controller';
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
load: [configuration],
}),
AuthModule,
UserModule,
ReportsModule,
],
controllers: [AppController, PerplexityController, UserController],
controllers: [AppController, HealthController, PerplexityController, UserController],
providers: [AppService, AwsSecretsService, PerplexityService],
})
export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(AuthMiddleware).forRoutes('*');
configure() {
// Add your middleware configuration here if needed
// If you don't need middleware, you can leave this empty
}
}
116 changes: 0 additions & 116 deletions backend/src/auth/auth.middleware.spec.ts

This file was deleted.

38 changes: 0 additions & 38 deletions backend/src/auth/auth.middleware.ts

This file was deleted.

25 changes: 0 additions & 25 deletions backend/src/auth/auth.module.ts

This file was deleted.

Loading