Skip to content

60 client integrate course service with the frontend client#61

Merged
GravityDarkLab merged 30 commits intomainfrom
60-client-integrate-course-service-with-the-frontend-client
Jul 7, 2025
Merged

60 client integrate course service with the frontend client#61
GravityDarkLab merged 30 commits intomainfrom
60-client-integrate-course-service-with-the-frontend-client

Conversation

@GravityDarkLab
Copy link
Collaborator

@GravityDarkLab GravityDarkLab commented Jul 6, 2025

🚀 Summary

This PR introduces a major new feature: integration with the course service and UI preparation for future AI functionality. It also includes significant UI/UX improvements and several backend bug fixes.


Features & Enhancements

  • Courses & Dashboard

    • Enhanced Courses component with real-time search, dynamic course fetching based on authentication, and improved bookmarking.
    • Added CourseDetail component for detailed course info, enrollment, bookmarking, and navigation.
    • Integrated new LessonPage component for lesson viewing, navigation, and progress tracking.
    • Aligned course cards on the grid for a consistent and professional appearance.
  • Profile

    • Simplified the Profile component by removing redundant tabs (already present in the dashboard) and added user ID display, and a section for current/in progress skills.
  • Achievements & Certificates

    • Implemented achievement service.
    • Added CertificateGenerator and CourseCompletionCelebration components.

AI & Chat (UI Only)

  • Added AIChatAssistant component for interactive user engagement, including UI for course generation and quick explanation commands (feature not yet connected to backend).
  • Introduced AiCenter UI for future AI-driven URL and file analysis.
  • Integrated AI chat UI service to support user interaction and commands (full backend/AI integration planned for a future release).

Note: These AI and chat features currently provide UI components and workflows only. Full functionality will be enabled in a future release when the server-side implementation is ready.


Backend Fixes

  • Services

    • Enhanced course service with enrollment count consistency and lesson ordering.
    • Fixed repository methods naming.
  • Security & CORS

    • Fixed CORS issues and added support for JWT error response headers.
    • Removed redundant CORS allowed-origins from gateway config.

Refactors & Chore

  • Cleaned up unused mock data, assets, and imports.
  • Updated response payload exports and TypeScript build info.
  • Improved code documentation (JSDoc).

UX/UI

  • Updated Features, Hero, and Footer components with new icons, improved descriptions, and layout enhancements.
  • Improved loading and error states across components.
  • Scroll-to-top functionality and debounce hooks for a smoother user experience.

…escriptions, and layout enhancements for improved user experience
…and managing courses for authenticated users
… data, and tabs for courses, bookmarks, skills, and achievements; add user ID display and current skills section
… states, error handling, and improved course and skill displays; integrate AI chat assistant that will be implemented
…ents for generating and displaying course completion certificates; implement scroll-to-top functionality and debounce hook for improved user experience
…dynamic course fetching based on user authentication, and improved bookmarking features; implement loading and error states for better user experience
…ment; includes message handling, AI response integration, and dynamic UI updates for a seamless chat experience
…uding lesson content rendering, progress tracking, and completion handling; implement navigation between lessons and error/loading states for enhanced user experience
…s; includes user input handling, toast notifications, and dynamic UI updates for enhanced user interaction
… information, including enrollment, bookmarking, and course content navigation; enhance user experience with loading and error states
@GravityDarkLab GravityDarkLab requested a review from Copilot July 6, 2025 14:29
@GravityDarkLab GravityDarkLab self-assigned this Jul 6, 2025
@GravityDarkLab GravityDarkLab added the bug Something isn't working label Jul 6, 2025
@GravityDarkLab GravityDarkLab linked an issue Jul 6, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Integrates the course service with the frontend client by:

  • Centralizing and extending CORS support, JWT filtering, and error handling in the gateway and services
  • Enhancing the Course API with private/unpublished endpoints, advanced search, and enrollment/bookmark rollback logic
  • Implementing full frontend integration: search, listing, detail, lesson navigation, and dashboard features

Reviewed Changes

Copilot reviewed 58 out of 60 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
server/skillforge-user/src/main/java/.../CorsConfig.java Unified CORS settings and added PATCH & OPTIONS
server/skillforge-gateway/src/main/java/.../JwtAuthenticationFilter.java Added CORS headers on JSON error responses and secured search
server/skillforge-course/src/main/java/.../service/courses/CourseServiceImpl.java Refactored lesson ordering, enrollment/bookmark logic, rollback
server/skillforge-course/src/main/java/.../controller/courses/CourseController.java Exposed private courses and auth-aware search endpoint
server/skillforge-course/src/main/java/.../model/course/EnrolledUserInfo.java Added fields for tracking current lessons/total lessons
server/skillforge-course/src/main/java/.../dto/response/course/EnrolledUserInfoResponse.java Mirrored new tracking fields in the response DTO
server/skillforge-course/src/main/java/.../dto/request/course/EnrolledUserInfoRequest.java Mirrored new tracking fields in the request DTO
client/src/pages/Courses.tsx Implemented real-time search, bookmarking, and navigation
client/src/pages/CourseDetail.tsx Integrated enrollment, bookmark toggles, certificate generator
client/src/pages/LessonPage.tsx Added lesson completion, retry logic, and celebration flow
client/src/pages/Dashboard.tsx Wired up dashboard data fetching, tabs, and AI assistant
Files not reviewed (1)
  • client/package-lock.json: Language not supported
Comments suppressed due to low confidence (3)

server/skillforge-gateway/src/main/java/com/gitittogether/skillforge/server/gateway/config/JwtAuthenticationFilter.java:107

  • The CORS error response allows OPTIONS but omits PATCH. To match service CORS settings, include PATCH in Access-Control-Allow-Methods.
        exchange.getResponse().getHeaders().set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS");

server/skillforge-course/src/main/java/com/gitittogether/skillForge/server/course/dto/request/course/EnrolledUserInfoRequest.java:1

  • This request class has @Builder.Default fields but no @builder annotation, so builder() isn’t generated. Add @builder to the class.
package com.gitittogether.skillForge.server.course.dto.request.course;

client/tsconfig.app.tsbuildinfo:1

  • This .tsbuildinfo file is auto-generated and typically shouldn’t be committed. Consider removing it from version control and adding it to .gitignore.
{"root":["./src/app.tsx","./src/main.tsx","./src/vite-env.d.ts","./src/components/aichatassistant.tsx","./src/components/certificategenerator.tsx","./src/components/confirmdeletiondialog.tsx","./src/components/coursecompletioncelebration.tsx","./src/components/editableinterests.tsx","./src/components/features.tsx","./src/components/footer.tsx","./src/components/hero.tsx","./src/components/navbar.tsx","./src/components/routeguards.tsx","./src/components/scrolltotop.tsx","./src/components/ui/passwordstrengthbar.tsx","./src/components/ui/accordion.tsx","./src/components/ui/alert-dialog.tsx","./src/components/ui/alert.tsx","./src/components/ui/aspect-ratio.tsx","./src/components/ui/avatar.tsx","./src/components/ui/badge.tsx","./src/components/ui/badgevariants.ts","./src/components/ui/breadcrumb.tsx","./src/components/ui/button.tsx","./src/components/ui/buttonvariants.ts","./src/components/ui/calendar.tsx","./src/components/ui/card.tsx","./src/components/ui/carousel.tsx","./src/components/ui/chart.tsx","./src/components/ui/checkbox.tsx","./src/components/ui/collapsible.tsx","./src/components/ui/command.tsx","./src/components/ui/context-menu.tsx","./src/components/ui/dialog.tsx","./src/components/ui/drawer.tsx","./src/components/ui/dropdown-menu.tsx","./src/components/ui/form.tsx","./src/components/ui/hover-card.tsx","./src/components/ui/index.ts","./src/components/ui/input-otp.tsx","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/menubar.tsx","./src/components/ui/navigation-menu.tsx","./src/components/ui/pagination.tsx","./src/components/ui/popover.tsx","./src/components/ui/progress.tsx","./src/components/ui/radio-group.tsx","./src/components/ui/resizable.tsx","./src/components/ui/scroll-area.tsx","./src/components/ui/select.tsx","./src/components/ui/separator.tsx","./src/components/ui/sheet.tsx","./src/components/ui/sidebar.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/slider.tsx","./src/components/ui/sonner.tsx","./src/components/ui/switch.tsx","./src/components/ui/table.tsx","./src/components/ui/tabs.tsx","./src/components/ui/textarea.tsx","./src/components/ui/toast.tsx","./src/components/ui/toaster.tsx","./src/components/ui/toggle-group.tsx","./src/components/ui/toggle.tsx","./src/components/ui/tooltip.tsx","./src/components/ui/use-toast.ts","./src/constants/app.ts","./src/contexts/authcontext.tsx","./src/contexts/authprovider.tsx","./src/contexts/form-context.ts","./src/hooks/use-debounce.ts","./src/hooks/use-mobile.tsx","./src/hooks/use-toast.ts","./src/hooks/useauth.ts","./src/lib/utils.ts","./src/pages/about.tsx","./src/pages/aicenter.tsx","./src/pages/cookiepolicy.tsx","./src/pages/coursedetail.tsx","./src/pages/courses.tsx","./src/pages/dashboard.tsx","./src/pages/index.tsx","./src/pages/lessonpage.tsx","./src/pages/login.tsx","./src/pages/notfound.tsx","./src/pages/privacypolicy.tsx","./src/pages/profile.tsx","./src/pages/signup.tsx","./src/pages/termsofservice.tsx","./src/services/achievement.service.ts","./src/services/aichat.service.ts","./src/services/course.service.ts","./src/services/dashboard.service.ts","./src/services/user.service.ts","./src/types/index.ts","./src/types/request/course/categorypayload.ts","./src/types/request/course/coursepayload.ts","./src/types/request/course/courseprogresspayload.ts","./src/types/request/course/enrolledcoursepayload.ts","./src/types/request/course/lessonpayload.ts","./src/types/request/course/modulepayload.ts","./src/types/request/skill/skillpayload.ts","./src/types/request/user/loginpayload.ts","./src/types/request/user/registerpayload.ts","./src/types/request/user/updatepayload.ts","./src/types/response/apperror.ts","./src/types/response/course/courseprogressresponse.ts","./src/types/response/course/courseresponse.ts","./src/types/response/course/coursesummaryresponse.ts","./src/types/response/course/lessonresponse.ts","./src/types/response/course/moduleresponse.ts","./src/types/response/user/userachievement.ts","./src/types/response/user/userloginresponse.ts","./src/types/response/user/userprofileresponse.ts","./src/types/response/user/userregisterresponse.ts","./src/types/utils/language.ts","./src/types/utils/lessoncontent.ts","./src/types/utils/lessoncontenttype.ts","./src/types/utils/level.ts","./src/utils/passwordvalidation.ts","./src/utils/response.utils.ts"],"version":"5.8.3"}

@GravityDarkLab GravityDarkLab marked this pull request as ready for review July 6, 2025 14:45
Copy link
Collaborator

@mahdibayouli mahdibayouli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Awesome work 🚀🚀

@GravityDarkLab GravityDarkLab merged commit 3f70a9e into main Jul 7, 2025
9 checks passed
@GravityDarkLab GravityDarkLab deleted the 60-client-integrate-course-service-with-the-frontend-client branch July 10, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working client feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Client] Integrate Course Service with the Frontend Client

2 participants

Comments