-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add guided onboarding #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 27 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
650775a
style: change font and polish UI
markstockhausen 79e45a2
style: update font weight
markstockhausen 430e1c2
style: conform to Prettier formatting
markstockhausen 73a402b
Implement optimized Scheduling Service and Pipeline Logic
markstockhausen 8850cf6
style: update comments
markstockhausen fe676c3
Implement AI suggestions
markstockhausen b199432
Update Axios, Optimise scheduling pipeline
markstockhausen 67d6e58
Optimise pipeline logic and clean up code
markstockhausen 60d7f66
Optimise pipeline
markstockhausen 6251a3a
Update logic for bidirectional relationship types
markstockhausen e683410
Streamline implementation
markstockhausen 141bebd
Conform to Prettier formatting
markstockhausen 64c4f20
Implement AI suggestions
markstockhausen d863e77
Further AI suggestions
markstockhausen 846fd3d
Merge branch 'main' into feature/implement-scheduling-service
markstockhausen 7916901
feat: add dashboard with contribution heatmap, badges, and session su…
markstockhausen 4b03244
style: fix Prettier formatting
markstockhausen 2190551
Update heatmap
markstockhausen 785d9fa
Conform to Prettier formatting
markstockhausen 2704820
Fix security audit
markstockhausen 32ccd39
feat: Add initial version of onboarding
markstockhausen 99f89e1
fix onboarding flow
markstockhausen 4a8eeba
conform to Prettier formatting
markstockhausen 49e98c2
Update profile setup
markstockhausen 513e8c4
Fix skip feature, update package-lock.json
markstockhausen 47042eb
Add milestone celebration toasts during mapping sessions
markstockhausen 23c8d8b
Update screenshot on main page, extract CompetencyNetworkViz into reu…
markstockhausen 2d85326
Merge remote-tracking branch 'origin/main' into feature/onboarding
markstockhausen 6f48404
Fix package-lock.json
markstockhausen 333175a
Merge branch 'main' into feature/onboarding
markstockhausen 305892f
Conform to Prettier formatting
markstockhausen ed96f32
Merge branch 'feature/onboarding' of https://github.com/ls1intum/memo…
markstockhausen 44e8467
Fix package-lock.json
markstockhausen 0cb944d
Fix package-lock.json
markstockhausen f05a802
Implement AI suggestions
markstockhausen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
server/src/main/java/de/tum/cit/memo/controller/ContributorStatsController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package de.tum.cit.memo.controller; | ||
|
|
||
| import de.tum.cit.memo.dto.ContributorStatsResponse; | ||
| import de.tum.cit.memo.service.ContributorStatsService; | ||
| import io.swagger.v3.oas.annotations.Operation; | ||
| import io.swagger.v3.oas.annotations.tags.Tag; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.http.ResponseEntity; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PathVariable; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/users") | ||
| @RequiredArgsConstructor | ||
| @Tag(name = "Contributor Stats", description = "Endpoints for contributor statistics and gamification") | ||
| public class ContributorStatsController { | ||
|
|
||
| private final ContributorStatsService contributorStatsService; | ||
|
|
||
| @GetMapping("/{userId}/stats") | ||
| @Operation(summary = "Get contributor statistics", description = "Returns contribution stats including total votes, streaks, daily counts for heatmap, " | ||
| + "and earned badge IDs.") | ||
| public ResponseEntity<ContributorStatsResponse> getContributorStats(@PathVariable String userId) { | ||
| ContributorStatsResponse stats = contributorStatsService.getStats(userId); | ||
| return ResponseEntity.ok(stats); | ||
| } | ||
| } |
45 changes: 45 additions & 0 deletions
45
server/src/main/java/de/tum/cit/memo/controller/SchedulingController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| package de.tum.cit.memo.controller; | ||
|
|
||
| import de.tum.cit.memo.dto.RelationshipTaskResponse; | ||
| import de.tum.cit.memo.dto.VoteRequest; | ||
| import de.tum.cit.memo.dto.VoteResponse; | ||
| import de.tum.cit.memo.service.SchedulingService; | ||
| import io.swagger.v3.oas.annotations.Operation; | ||
| import io.swagger.v3.oas.annotations.tags.Tag; | ||
| import jakarta.validation.Valid; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.http.ResponseEntity; | ||
| import org.springframework.web.bind.annotation.GetMapping; | ||
| import org.springframework.web.bind.annotation.PostMapping; | ||
| import org.springframework.web.bind.annotation.RequestBody; | ||
| import org.springframework.web.bind.annotation.RequestHeader; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @RestController | ||
| @RequestMapping("/api/scheduling") | ||
| @RequiredArgsConstructor | ||
| @Tag(name = "Scheduling", description = "Endpoints for competency mapping scheduling") | ||
| public class SchedulingController { | ||
|
|
||
| private final SchedulingService schedulingService; | ||
|
|
||
| @GetMapping("/next-relationship") | ||
| @Operation(summary = "Get next relationship to vote on", description = "Returns a competency pair for the user to map. Uses coverage (70%) and consensus (30%) pipelines. Returns 204 if no tasks remain.") | ||
| public ResponseEntity<RelationshipTaskResponse> getNextRelationship( | ||
| @RequestHeader("X-User-Id") String userId, | ||
| @org.springframework.web.bind.annotation.RequestParam(required = false) java.util.List<String> skippedIds) { | ||
| return schedulingService.getNextTask(userId, skippedIds) | ||
| .map(ResponseEntity::ok) | ||
| .orElse(ResponseEntity.noContent().build()); | ||
| } | ||
|
|
||
| @PostMapping("/vote") | ||
| @Operation(summary = "Submit a vote on a relationship", description = "Records the user's vote on a competency relationship. Accepts either a relationshipId or originId+destinationId pair (for swapped direction). MATCHES and UNRELATED votes are bidirectional.") | ||
| public ResponseEntity<VoteResponse> submitVote( | ||
| @RequestHeader("X-User-Id") String userId, | ||
| @Valid @RequestBody VoteRequest request) { | ||
| VoteResponse response = schedulingService.submitVote(userId, request); | ||
| return ResponseEntity.ok(response); | ||
| } | ||
| } |
31 changes: 31 additions & 0 deletions
31
server/src/main/java/de/tum/cit/memo/dto/ContributorStatsResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package de.tum.cit.memo.dto; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| import java.time.LocalDate; | ||
| import java.util.List; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class ContributorStatsResponse { | ||
|
|
||
| private int totalVotes; | ||
| private int currentStreak; | ||
| private int longestStreak; | ||
| private List<DailyCount> dailyCounts; | ||
| private List<String> earnedBadges; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public static class DailyCount { | ||
| private LocalDate date; | ||
| private int count; | ||
| } | ||
| } |
28 changes: 0 additions & 28 deletions
28
server/src/main/java/de/tum/cit/memo/dto/CreateCompetencyRelationshipRequest.java
This file was deleted.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
server/src/main/java/de/tum/cit/memo/dto/RelationshipTaskResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| package de.tum.cit.memo.dto; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class RelationshipTaskResponse { | ||
|
|
||
| private String relationshipId; | ||
| private CompetencyInfo origin; | ||
| private CompetencyInfo destination; | ||
| private String pipeline; | ||
| private VoteCounts currentVotes; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public static class CompetencyInfo { | ||
| private String id; | ||
| private String title; | ||
| private String description; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package de.tum.cit.memo.dto; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class VoteCounts { | ||
|
|
||
| private int assumes; | ||
| private int extendsRelation; | ||
| private int matches; | ||
| private int unrelated; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| package de.tum.cit.memo.dto; | ||
|
|
||
| import de.tum.cit.memo.enums.RelationshipType; | ||
| import jakarta.validation.constraints.NotNull; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class VoteRequest { | ||
|
|
||
| /** | ||
| * Relationship ID (used directly when direction is not swapped). | ||
| * Optional if originId + destinationId are provided instead. | ||
| */ | ||
| private String relationshipId; | ||
|
|
||
| /** | ||
| * Origin competency ID (used when direction is swapped). | ||
| * Must be provided together with destinationId. | ||
| */ | ||
| private String originId; | ||
|
|
||
| /** | ||
| * Destination competency ID (used when direction is swapped). | ||
| * Must be provided together with originId. | ||
| */ | ||
| private String destinationId; | ||
|
|
||
| @NotNull(message = "Relationship type is required") | ||
| private RelationshipType relationshipType; | ||
| } | ||
17 changes: 17 additions & 0 deletions
17
server/src/main/java/de/tum/cit/memo/dto/VoteResponse.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package de.tum.cit.memo.dto; | ||
|
|
||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class VoteResponse { | ||
|
|
||
| private boolean success; | ||
| private VoteCounts updatedVotes; | ||
| private double newEntropy; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.