diff --git a/.github/workflows/backend-ci-workflow.yaml b/.github/workflows/backend-ci-workflow.yaml new file mode 100644 index 0000000000..cb0279063f --- /dev/null +++ b/.github/workflows/backend-ci-workflow.yaml @@ -0,0 +1,53 @@ +name: Backend CI Workflow + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install Dependencies for Each Service + run: | + cd backend + for service in auth-service question-service user-service matching-service gateway-service collaboration-service; do + echo "Installing dependencies for $service" + cd $service + npm install + cd .. + done + + # Build Check for Each Service + - name: Build Each Service + run: | + cd backend + for service in auth-service question-service user-service matching-service gateway-service collaboration-service; do + echo "Building $service" + cd $service + npm run build + cd .. + done + + # Lint Check for Each Service + - name: Lint Each Service + run: | + cd backend + for service in auth-service question-service user-service matching-service gateway-service collaboration-service; do + echo "Linting $service" + cd $service + npm run lint + cd .. + done diff --git a/.github/workflows/frontend-ci-workflow.yaml b/.github/workflows/frontend-ci-workflow.yaml new file mode 100644 index 0000000000..a1e214f24f --- /dev/null +++ b/.github/workflows/frontend-ci-workflow.yaml @@ -0,0 +1,38 @@ +name: Frontend CI Workflow + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install Dependencies + run: | + cd frontend + npm install + + # Build Check + - name: Build Project + run: | + cd frontend + npm run build + + # Lint Check + - name: Lint Code + run: | + cd frontend + npm run lint diff --git a/backend/.github/workflows/backend-docker-compose.yml b/backend/.github/workflows/backend-docker-compose.yml deleted file mode 100644 index 8ac59ad8fd..0000000000 --- a/backend/.github/workflows/backend-docker-compose.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Backend Docker Compose CI - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - test-backend: - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Set up Docker Compose - run: sudo apt-get install docker-compose -y - - - name: Build and Run Docker Compose - run: docker-compose up -d --build - - - name: Test Backend Health - run: | - sleep 10 # Allow time for services to start - curl -f http://localhost:4000/api || exit 1 # Replace with actual backend health check endpoint - - - name: Stop and Remove Containers - run: docker-compose down diff --git a/backend/auth-service/src/app.controller.spec.ts b/backend/auth-service/src/app.controller.spec.ts deleted file mode 100644 index c86814d2e4..0000000000 --- a/backend/auth-service/src/app.controller.spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; - -describe('AppController', () => { - let appController: AppController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); - - appController = app.get(AppController); - }); - -}); diff --git a/backend/auth-service/src/app.module.ts b/backend/auth-service/src/app.module.ts index 278b9f1ba8..97c3071f2d 100644 --- a/backend/auth-service/src/app.module.ts +++ b/backend/auth-service/src/app.module.ts @@ -3,7 +3,7 @@ import { AppController } from './app.controller'; import { AppService } from './app.service'; import { PassportModule } from '@nestjs/passport'; import { JwtModule } from '@nestjs/jwt'; -import { ClientsModule, Transport } from '@nestjs/microservices'; +import { ClientsModule } from '@nestjs/microservices'; import { HttpModule } from '@nestjs/axios'; import { AccessTokenStrategy, diff --git a/backend/auth-service/src/app.service.ts b/backend/auth-service/src/app.service.ts index 1f03ca3657..bda98b73d2 100644 --- a/backend/auth-service/src/app.service.ts +++ b/backend/auth-service/src/app.service.ts @@ -186,7 +186,7 @@ export class AppService { } public async resetPassword(dto: ResetPasswordDto): Promise { - const { userId, email } = await this.validatePasswordResetToken(dto.token); + const { userId } = await this.validatePasswordResetToken(dto.token); const hashedPassword = await bcrypt.hash(dto.password, SALT_ROUNDS); @@ -218,6 +218,7 @@ export class AppService { } return { userId, email }; } catch (err) { + console.error(err); throw new RpcException({ statusCode: HttpStatus.UNAUTHORIZED, message: 'Unauthorized: Invalid or expired password reset token', @@ -246,7 +247,7 @@ export class AppService { text: `Click here to reset your password: ${resetUrl}`, }; - transporter.sendMail(mailOptions, (error, info) => { + transporter.sendMail(mailOptions, (error) => { if (error) { throw new RpcException(`Error sending reset email: ${error.message}`); } @@ -260,6 +261,7 @@ export class AppService { }); return decoded; } catch (error) { + console.error(error); throw new RpcException('Invalid access token'); } } @@ -271,6 +273,7 @@ export class AppService { }); return decoded; } catch (error) { + console.error(error); throw new RpcException('Invalid Refresh Token'); } } diff --git a/backend/auth-service/src/constants/account-provider.enum.ts b/backend/auth-service/src/constants/account-provider.enum.ts index 3ee17560be..5cba246a70 100644 --- a/backend/auth-service/src/constants/account-provider.enum.ts +++ b/backend/auth-service/src/constants/account-provider.enum.ts @@ -2,4 +2,4 @@ export enum AccountProvider { LOCAL = 'local', GOOGLE = 'google', GITHUB = 'github', -} \ No newline at end of file +} diff --git a/backend/auth-service/src/dto/reset-password-request.dto.ts b/backend/auth-service/src/dto/reset-password-request.dto.ts index 550a2d2647..423ae52d82 100644 --- a/backend/auth-service/src/dto/reset-password-request.dto.ts +++ b/backend/auth-service/src/dto/reset-password-request.dto.ts @@ -1,4 +1,4 @@ -import { IsEmail, IsNotEmpty, IsString } from 'class-validator'; +import { IsEmail, IsNotEmpty } from 'class-validator'; export class ResetPasswordRequestDto { @IsEmail() diff --git a/backend/auth-service/src/main.ts b/backend/auth-service/src/main.ts index 45b976601c..d7f919011d 100644 --- a/backend/auth-service/src/main.ts +++ b/backend/auth-service/src/main.ts @@ -1,6 +1,6 @@ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; -import { MicroserviceOptions, Transport } from '@nestjs/microservices'; +import { MicroserviceOptions } from '@nestjs/microservices'; import { ValidationPipe } from '@nestjs/common'; import { config } from 'src/configs'; import * as dotenv from 'dotenv'; diff --git a/backend/collaboration-service/src/app.controller.ts b/backend/collaboration-service/src/app.controller.ts index e45e16809e..7ddc563d74 100644 --- a/backend/collaboration-service/src/app.controller.ts +++ b/backend/collaboration-service/src/app.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Get } from '@nestjs/common'; +import { Controller } from '@nestjs/common'; import { AppService } from './app.service'; import { MessagePattern, Payload } from '@nestjs/microservices'; import { CreateSessionDto } from './dto'; diff --git a/backend/gateway-service/src/common/configs/env.config.ts b/backend/gateway-service/src/common/configs/env.config.ts index e06585d698..8e3f5886af 100644 --- a/backend/gateway-service/src/common/configs/env.config.ts +++ b/backend/gateway-service/src/common/configs/env.config.ts @@ -1,4 +1,4 @@ -import { RpcException, Transport } from '@nestjs/microservices'; +import { Transport } from '@nestjs/microservices'; import * as dotenv from 'dotenv'; dotenv.config(); diff --git a/backend/gateway-service/src/common/constants/account-provider.enum.ts b/backend/gateway-service/src/common/constants/account-provider.enum.ts index 3ee17560be..5cba246a70 100644 --- a/backend/gateway-service/src/common/constants/account-provider.enum.ts +++ b/backend/gateway-service/src/common/constants/account-provider.enum.ts @@ -2,4 +2,4 @@ export enum AccountProvider { LOCAL = 'local', GOOGLE = 'google', GITHUB = 'github', -} \ No newline at end of file +} diff --git a/backend/gateway-service/src/common/constants/coding-languages.enum.ts b/backend/gateway-service/src/common/constants/coding-languages.enum.ts index e4c4b79897..5f7c930f79 100644 --- a/backend/gateway-service/src/common/constants/coding-languages.enum.ts +++ b/backend/gateway-service/src/common/constants/coding-languages.enum.ts @@ -2,4 +2,4 @@ export enum Languages { PYTHON = 'Python', JAVA = 'Java', CPLUSPLUS = 'C++', -} \ No newline at end of file +} diff --git a/backend/gateway-service/src/common/constants/proficiency-level.enum.ts b/backend/gateway-service/src/common/constants/proficiency-level.enum.ts index d16ed94551..6b005a58eb 100644 --- a/backend/gateway-service/src/common/constants/proficiency-level.enum.ts +++ b/backend/gateway-service/src/common/constants/proficiency-level.enum.ts @@ -2,4 +2,4 @@ export enum Proficiency { BEGINNER = 'Beginner', INTERMEDIATE = 'Intermediate', ADVANCED = 'Advanced', -} \ No newline at end of file +} diff --git a/backend/gateway-service/src/common/decorators/get-current-user-id-socket.decorator.ts b/backend/gateway-service/src/common/decorators/get-current-user-id-socket.decorator.ts index 62afd94f6c..9b4ad486a4 100644 --- a/backend/gateway-service/src/common/decorators/get-current-user-id-socket.decorator.ts +++ b/backend/gateway-service/src/common/decorators/get-current-user-id-socket.decorator.ts @@ -21,4 +21,3 @@ export const GetCurrentUserId = createParamDecorator( } }, ); */ - diff --git a/backend/gateway-service/src/modules/auth/dto/reset-password-request.dto.ts b/backend/gateway-service/src/modules/auth/dto/reset-password-request.dto.ts index 98f77f9ff8..69f4faa191 100644 --- a/backend/gateway-service/src/modules/auth/dto/reset-password-request.dto.ts +++ b/backend/gateway-service/src/modules/auth/dto/reset-password-request.dto.ts @@ -1,5 +1,5 @@ import { ApiProperty } from '@nestjs/swagger'; -import { IsEmail, IsNotEmpty, IsString } from 'class-validator'; +import { IsEmail, IsNotEmpty } from 'class-validator'; export class ResetPasswordRequestDto { @ApiProperty({ @@ -8,5 +8,4 @@ export class ResetPasswordRequestDto { @IsEmail() @IsNotEmpty() email: string; - } diff --git a/backend/gateway-service/src/modules/match/dto/user-match-options.dto.ts b/backend/gateway-service/src/modules/match/dto/user-match-options.dto.ts index b2a1b40150..da85565d00 100644 --- a/backend/gateway-service/src/modules/match/dto/user-match-options.dto.ts +++ b/backend/gateway-service/src/modules/match/dto/user-match-options.dto.ts @@ -3,10 +3,9 @@ import { Type } from 'class-transformer'; import { IsArray, IsIn, IsNotEmpty, IsString } from 'class-validator'; export class UserMatchOptionsDto { - @IsString() userId: string; - + @ApiProperty({ description: 'Either Easy, Medium, or Hard', example: 'Easy', diff --git a/backend/gateway-service/src/modules/match/match.controller.ts b/backend/gateway-service/src/modules/match/match.controller.ts index 467814e31b..90e24db3f0 100644 --- a/backend/gateway-service/src/modules/match/match.controller.ts +++ b/backend/gateway-service/src/modules/match/match.controller.ts @@ -11,7 +11,6 @@ import { ClientProxy } from '@nestjs/microservices'; import { Inject } from '@nestjs/common'; import { firstValueFrom } from 'rxjs'; import { RedisMatchService } from './redis.service'; -import { v4 as uuidv4 } from 'uuid'; import { MatchAcceptDto, MatchDeclineDto, MatchRequestDto } from './dto'; import { MATCH_FOUND, diff --git a/backend/gateway-service/src/modules/match/redis.service.ts b/backend/gateway-service/src/modules/match/redis.service.ts index 4a5ef48e5c..3194a5cebe 100644 --- a/backend/gateway-service/src/modules/match/redis.service.ts +++ b/backend/gateway-service/src/modules/match/redis.service.ts @@ -15,7 +15,7 @@ export class RedisMatchService { // Subscribe to the Redis Pub/Sub channel for match events subscribeToMatchEvents(callback: (matchedUsers: any) => void): void { - this.redisSubscriber.subscribe('matchChannel', (err, count) => { + this.redisSubscriber.subscribe('matchChannel', (err) => { if (err) { console.error('Error subscribing to Redis channel:', err); return; @@ -35,11 +35,13 @@ export class RedisMatchService { matchId: parsedMessage.matchId, matchedUserIds: parsedMessage.matchedUserIds, }); - }}}); + } + } + }); } subscribeToTimeoutEvents(callback: (matchedUsers: any) => void): void { - this.redisSubscriber.subscribe('timeoutChannel', (err, count) => { + this.redisSubscriber.subscribe('timeoutChannel', (err) => { if (err) { console.error('Error subscribing to Redis channel:', err); return; diff --git a/backend/gateway-service/src/modules/question/question.controller.ts b/backend/gateway-service/src/modules/question/question.controller.ts index ac7186d14f..7387ef4d0e 100644 --- a/backend/gateway-service/src/modules/question/question.controller.ts +++ b/backend/gateway-service/src/modules/question/question.controller.ts @@ -13,7 +13,6 @@ import { import { CreateQuestionDto, FindQuestionByIdDto, - FindQuestionBySlugDto, GetQuestionsDto, UpdateQuestionDto, } from './dto'; diff --git a/backend/gateway-service/src/modules/user/dto/user-response.dto.ts b/backend/gateway-service/src/modules/user/dto/user-response.dto.ts index f502c84fa7..73b256d7da 100644 --- a/backend/gateway-service/src/modules/user/dto/user-response.dto.ts +++ b/backend/gateway-service/src/modules/user/dto/user-response.dto.ts @@ -1,4 +1,4 @@ -import { Exclude, Expose, Transform } from 'class-transformer'; +import { Exclude } from 'class-transformer'; export class UsersResponseDto { @Exclude() diff --git a/backend/matching-service/src/app.controller.spec.ts b/backend/matching-service/src/app.controller.spec.ts deleted file mode 100644 index a22ca32ced..0000000000 --- a/backend/matching-service/src/app.controller.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; - -describe('AppController', () => { - let appController: AppController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); - - appController = app.get(AppController); - }); -}); diff --git a/backend/matching-service/src/interfaces/match-details.interface.ts b/backend/matching-service/src/interfaces/match-details.interface.ts index 8c96efa5a0..b949991e16 100644 --- a/backend/matching-service/src/interfaces/match-details.interface.ts +++ b/backend/matching-service/src/interfaces/match-details.interface.ts @@ -6,5 +6,5 @@ export interface MatchDetails { score: number; generatedTopics: string[]; generatedDifficulty: string; - selectedQuestionId: string + selectedQuestionId: string; } diff --git a/backend/matching-service/src/services/redis.service.ts b/backend/matching-service/src/services/redis.service.ts index cc54664677..13e9707c4a 100644 --- a/backend/matching-service/src/services/redis.service.ts +++ b/backend/matching-service/src/services/redis.service.ts @@ -98,15 +98,15 @@ export class RedisService { } } - async publishMatchedUsers(matchId: string, matchedUserIds: string[]): Promise { + async publishMatchedUsers( + matchId: string, + matchedUserIds: string[], + ): Promise { const message = { matchId: matchId, matchedUserIds: matchedUserIds, }; - await this.redisPublisher.publish( - 'matchChannel', - JSON.stringify(message), - ); + await this.redisPublisher.publish('matchChannel', JSON.stringify(message)); } async publishTimedOutUsers(timedOutUserIds: string[]): Promise { @@ -126,8 +126,17 @@ export class RedisService { return users.map((user) => JSON.parse(user)); } - async storeMatch(matchId: string, matchData: MatchDetails, ttl: number = 1000): Promise { - await this.redisPublisher.set(matchId, JSON.stringify(matchData), 'EX', ttl); + async storeMatch( + matchId: string, + matchData: MatchDetails, + ttl: number = 1000, + ): Promise { + await this.redisPublisher.set( + matchId, + JSON.stringify(matchData), + 'EX', + ttl, + ); } async getMatch(matchId: string): Promise { diff --git a/backend/question-service/src/app.controller.spec.ts b/backend/question-service/src/app.controller.spec.ts deleted file mode 100644 index 5b28217f63..0000000000 --- a/backend/question-service/src/app.controller.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; - -describe('AppController', () => { - let appController: AppController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); - - appController = app.get(AppController); - }); - - /* describe('root', () => { - it('should return "Hello World!"', () => { - expect(appController.getHello()).toBe('Hello World!'); - }); - }); */ -}); diff --git a/backend/question-service/src/app.controller.ts b/backend/question-service/src/app.controller.ts index 278b6afbab..c89cf25ea8 100644 --- a/backend/question-service/src/app.controller.ts +++ b/backend/question-service/src/app.controller.ts @@ -54,17 +54,16 @@ export class AppController { return this.appService.updateQuestion(id, updatedQuestionInfo); } - @MessagePattern({cmd: 'get-categories'}) + @MessagePattern({ cmd: 'get-categories' }) async getCategories() { - return this.appService.getCategories() + return this.appService.getCategories(); } - @MessagePattern({cmd: 'get-question-by-preferences'}) - async getQuestionsByPreferences(@Payload() data: GetQuestionsByPreferencesDto) { + @MessagePattern({ cmd: 'get-question-by-preferences' }) + async getQuestionsByPreferences( + @Payload() data: GetQuestionsByPreferencesDto, + ) { const { topics, difficulty } = data; - return this.appService.getQuestionsByPreferences( - topics, - difficulty, - ); + return this.appService.getQuestionsByPreferences(topics, difficulty); } } diff --git a/backend/question-service/src/app.service.ts b/backend/question-service/src/app.service.ts index 9322bb8f68..4baf24374d 100644 --- a/backend/question-service/src/app.service.ts +++ b/backend/question-service/src/app.service.ts @@ -76,9 +76,7 @@ export class AppService { } async getQuestionById(id: string): Promise { - const question = await this.questionModel - .findById(id) - .exec(); + const question = await this.questionModel.findById(id).exec(); if (!question) { throw new RpcException('Question not found'); } @@ -117,7 +115,7 @@ export class AppService { return newQuestion.save(); } catch (error) { - console.error(error) + console.error(error); throw new RpcException(error.message); } } @@ -159,8 +157,8 @@ export class AppService { } } - async getCategories():Promise<{ categories: string[] }>{ - return {categories: QUESTION_CATEGORIES} + async getCategories(): Promise<{ categories: string[] }> { + return { categories: QUESTION_CATEGORIES }; } async getQuestionsByPreferences( @@ -176,15 +174,11 @@ export class AppService { if (questions.length === 0) { // If no questions match both topics and difficulty, find questions by difficulty only - questions = await this.questionModel - .find({ difficulty }) - .exec(); + questions = await this.questionModel.find({ difficulty }).exec(); } return questions; } catch (error) { throw new RpcException(error.message); } } - - } diff --git a/backend/question-service/src/constants/question-categories.constant.ts b/backend/question-service/src/constants/question-categories.constant.ts index 4c545981dd..e5e8c33959 100644 --- a/backend/question-service/src/constants/question-categories.constant.ts +++ b/backend/question-service/src/constants/question-categories.constant.ts @@ -1,13 +1,13 @@ export const QUESTION_CATEGORIES = [ - "Array", - "Binary Search", - "Divide and Conquer", - "Dynamic Programming", - "Hash Table", - "Linked List", - "Math", - "Sliding Window", - "Stack", - "String", - "Two Sum" -] \ No newline at end of file + 'Array', + 'Binary Search', + 'Divide and Conquer', + 'Dynamic Programming', + 'Hash Table', + 'Linked List', + 'Math', + 'Sliding Window', + 'Stack', + 'String', + 'Two Sum', +]; diff --git a/backend/user-service/src/app.controller.spec.ts b/backend/user-service/src/app.controller.spec.ts deleted file mode 100644 index 5b28217f63..0000000000 --- a/backend/user-service/src/app.controller.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { AppController } from './app.controller'; -import { AppService } from './app.service'; - -describe('AppController', () => { - let appController: AppController; - - beforeEach(async () => { - const app: TestingModule = await Test.createTestingModule({ - controllers: [AppController], - providers: [AppService], - }).compile(); - - appController = app.get(AppController); - }); - - /* describe('root', () => { - it('should return "Hello World!"', () => { - expect(appController.getHello()).toBe('Hello World!'); - }); - }); */ -}); diff --git a/backend/user-service/src/app.controller.ts b/backend/user-service/src/app.controller.ts index d1479e20ec..db887cacfb 100644 --- a/backend/user-service/src/app.controller.ts +++ b/backend/user-service/src/app.controller.ts @@ -29,12 +29,12 @@ export class AppController { return this.appService.createUser(data); } - @MessagePattern({ cmd: "create-user-socials"}) + @MessagePattern({ cmd: 'create-user-socials' }) async createUserSocials(@Payload() data: CreateUserSocialsDto) { return this.appService.createUserSocials(data); } - @MessagePattern({ cmd: "update-user-profile"}) + @MessagePattern({ cmd: 'update-user-profile' }) async updateUserProfile(@Payload() data: UpdateUserPayload) { return this.appService.updateUserProfile(data); } diff --git a/backend/user-service/src/constants/account-provider.enum.ts b/backend/user-service/src/constants/account-provider.enum.ts index 3ee17560be..5cba246a70 100644 --- a/backend/user-service/src/constants/account-provider.enum.ts +++ b/backend/user-service/src/constants/account-provider.enum.ts @@ -2,4 +2,4 @@ export enum AccountProvider { LOCAL = 'local', GOOGLE = 'google', GITHUB = 'github', -} \ No newline at end of file +} diff --git a/backend/user-service/src/constants/coding-languages.enum.ts b/backend/user-service/src/constants/coding-languages.enum.ts index e4c4b79897..5f7c930f79 100644 --- a/backend/user-service/src/constants/coding-languages.enum.ts +++ b/backend/user-service/src/constants/coding-languages.enum.ts @@ -2,4 +2,4 @@ export enum Languages { PYTHON = 'Python', JAVA = 'Java', CPLUSPLUS = 'C++', -} \ No newline at end of file +} diff --git a/backend/user-service/src/constants/index.ts b/backend/user-service/src/constants/index.ts index 6a3dc4b302..70c1491360 100644 --- a/backend/user-service/src/constants/index.ts +++ b/backend/user-service/src/constants/index.ts @@ -1,4 +1,4 @@ -export {Proficiency} from './proficiency-level.enum'; -export {Languages} from './coding-languages.enum'; -export {AccountProvider} from './account-provider.enum'; -export {Role} from './role.enum'; \ No newline at end of file +export { Proficiency } from './proficiency-level.enum'; +export { Languages } from './coding-languages.enum'; +export { AccountProvider } from './account-provider.enum'; +export { Role } from './role.enum'; diff --git a/backend/user-service/src/constants/proficiency-level.enum.ts b/backend/user-service/src/constants/proficiency-level.enum.ts index d16ed94551..6b005a58eb 100644 --- a/backend/user-service/src/constants/proficiency-level.enum.ts +++ b/backend/user-service/src/constants/proficiency-level.enum.ts @@ -2,4 +2,4 @@ export enum Proficiency { BEGINNER = 'Beginner', INTERMEDIATE = 'Intermediate', ADVANCED = 'Advanced', -} \ No newline at end of file +} diff --git a/backend/user-service/src/constants/role.enum.ts b/backend/user-service/src/constants/role.enum.ts index a53c6d44e4..1a6fa9fabe 100644 --- a/backend/user-service/src/constants/role.enum.ts +++ b/backend/user-service/src/constants/role.enum.ts @@ -1,4 +1,4 @@ export enum Role { - ADMIN = 'admin', - USER = 'user', -} \ No newline at end of file + ADMIN = 'admin', + USER = 'user', +} diff --git a/backend/user-service/src/dto/update-user.dto.ts b/backend/user-service/src/dto/update-user.dto.ts index 23432ed387..4012c014c0 100644 --- a/backend/user-service/src/dto/update-user.dto.ts +++ b/backend/user-service/src/dto/update-user.dto.ts @@ -1,12 +1,17 @@ -import { IsNotEmpty, IsString, IsEnum, IsOptional, IsBoolean } from 'class-validator'; +import { + IsNotEmpty, + IsString, + IsEnum, + IsOptional, + IsBoolean, +} from 'class-validator'; import { Languages, Proficiency } from 'src/constants'; export class UpdateUserDto { - @IsString() @IsNotEmpty() username: string; - + @IsString() @IsNotEmpty() displayName: string; diff --git a/backend/user-service/src/payload/update-user.payload.ts b/backend/user-service/src/payload/update-user.payload.ts index ba2b645461..cb82884804 100644 --- a/backend/user-service/src/payload/update-user.payload.ts +++ b/backend/user-service/src/payload/update-user.payload.ts @@ -1,6 +1,6 @@ -import { UpdateUserDto } from "src/dto/update-user.dto"; +import { UpdateUserDto } from 'src/dto/update-user.dto'; export interface UpdateUserPayload { - userId: string, - updateUserDto: UpdateUserDto -} \ No newline at end of file + userId: string; + updateUserDto: UpdateUserDto; +} diff --git a/frontend/.github/workflows/frontend-docker-compose.yml b/frontend/.github/workflows/frontend-docker-compose.yml deleted file mode 100644 index b92bece5bc..0000000000 --- a/frontend/.github/workflows/frontend-docker-compose.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Frontend Docker Compose CI - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - test-frontend: - runs-on: ubuntu-latest - - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Set up Docker Compose - run: sudo apt-get install docker-compose -y - - - name: Build and Run Docker Compose - run: docker-compose up -d --build - - - name: Test Frontend Health - run: | - sleep 10 # Allow time for services to start - curl -f http://localhost:3000 || exit 1 # Replace with actual frontend health check endpoint - - - name: Stop and Remove Containers - run: docker-compose down -