Skip to content

Commit 79ef1d9

Browse files
authored
Merge branch 'main' into 71-setup-monitoring-with-prometheus-and-grafana
2 parents 7208323 + 377b66e commit 79ef1d9

File tree

55 files changed

+1586
-470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1586
-470
lines changed

.github/workflows/docker.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ jobs:
6666
context: ./server/ratingservice
6767
push: true
6868
tags: ghcr.io/aet-devops25/team-the-merge-doctors/server/rating-service:latest
69+
- name: Build & push Gateway Service image
70+
uses: docker/build-push-action@v4
71+
with:
72+
context: ./server/gateway
73+
push: true
74+
tags: ghcr.io/aet-devops25/team-the-merge-doctors/server/gateway-service:latest

.github/workflows/e2e-tests.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ jobs:
1818

1919
- uses: docker/setup-compose-action@v1
2020
name: Setup Docker
21-
22-
- name: Setup .env
23-
run: |
24-
cp docker/backend_config_files/.env.template docker/backend_config_files/.env
25-
21+
2622
- name: Generate JWT Key
2723
run: |
2824
./docker/backend_config_files/jwk-key-generator.sh

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ celerybeat.pid
291291

292292
# Environments
293293
.secrets.env
294-
.env
295294
.venv
296295
env/
297296
venv/

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22

33
## Endpoint Documentation
44

5-
The endpoints of the different services are documented either in the controllers of the services (e.g. [MentorProfileController](server/mentorshipservice/src/main/java/com/mentorpulse/mentorshipservice/controller/MentorProfileController.java), [GenAI](genai/controllers/api_controller.py)) or some are also documented in `.bru` files (see [mentor-pulse-bruno](/docs/mentor-pulse-bruno/)).
5+
The endpoints are documented using OpenAPI or Swagger schemas:
66

7-
## Setup
7+
- [Mentorship Service](/server/mentorshipservice/schema/mentorship-service-schema.json)
8+
- [User Service](/server/userservice/schema/user-service-schema.json)
9+
- [Rating Service](/server/ratingservice/schema/rating-service-schema.json)
810

9-
TODO: documentation to add for project setup (e.g. how to start with docker)
11+
- [GenAI Service](/genai/schema/genai-schema.json)
1012

13+
Alternatively, you can also find the endpoints in the controllers of the services (e.g. [MentorProfileController](server/mentorshipservice/src/main/java/com/mentorpulse/mentorshipservice/controller/MentorProfileController.java), [GenAI](genai/controllers/api_controller.py)). Additionally, some are also documented in `.bru` files (see [mentor-pulse-bruno](/docs/mentor-pulse-bruno/)).
1114

15+
## Setup
1216

17+
TODO: documentation to add for project setup (e.g. how to start with docker)

client/orval.config.cjs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
const SHARED_CONFIG = {
22
client: 'react-query',
3-
baseUrl: {
4-
// TODO: update base url for deployment
5-
getBaseUrlFromSpecification: true,
6-
},
73
mock: false,
84
};
95

client/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineConfig({
2626
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2727
use: {
2828
/* Base URL to use in actions like `await page.goto('/')`. */
29-
baseURL: 'http://localhost:3000',
29+
baseURL: 'http://localhost:80',
3030

3131
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
3232
trace: 'on-first-retry',

client/src/api/mentor.ts

Lines changed: 29 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export const scheduleSession = (
217217
options?: AxiosRequestConfig,
218218
): Promise<AxiosResponse<ScheduleSessionResponse>> => {
219219
return axios.default.put(
220-
`http://localhost:8310/api/mentorship/scheduleSession`,
220+
`/api/mentorship/scheduleSession`,
221221
scheduleSessionRequest,
222222
options,
223223
);
@@ -297,7 +297,7 @@ export const rejectApplication = (
297297
options?: AxiosRequestConfig,
298298
): Promise<AxiosResponse<RejectApplicationResponse>> => {
299299
return axios.default.put(
300-
`http://localhost:8310/api/mentorship/rejectApplication/${id}`,
300+
`/api/mentorship/rejectApplication/${id}`,
301301
undefined,
302302
options,
303303
);
@@ -377,7 +377,7 @@ export const acceptApplication = (
377377
options?: AxiosRequestConfig,
378378
): Promise<AxiosResponse<AcceptApplicationResponse>> => {
379379
return axios.default.put(
380-
`http://localhost:8310/api/mentorship/acceptApplication/${id}`,
380+
`/api/mentorship/acceptApplication/${id}`,
381381
undefined,
382382
options,
383383
);
@@ -457,7 +457,7 @@ export const listMentorProfiles = (
457457
options?: AxiosRequestConfig,
458458
): Promise<AxiosResponse<ListMentorProfileResponse>> => {
459459
return axios.default.post(
460-
`http://localhost:8310/api/mentorship/listMentorProfiles`,
460+
`/api/mentorship/listMentorProfiles`,
461461
listMentorProfileRequest,
462462
options,
463463
);
@@ -537,7 +537,7 @@ export const createSkill = (
537537
options?: AxiosRequestConfig,
538538
): Promise<AxiosResponse<CreateSkillResponse>> => {
539539
return axios.default.post(
540-
`http://localhost:8310/api/mentorship/createSkill`,
540+
`/api/mentorship/createSkill`,
541541
createSkillRequest,
542542
options,
543543
);
@@ -617,7 +617,7 @@ export const createMentorProfile = (
617617
options?: AxiosRequestConfig,
618618
): Promise<AxiosResponse<CreateMentorProfileResponse>> => {
619619
return axios.default.post(
620-
`http://localhost:8310/api/mentorship/createMentorProfile`,
620+
`/api/mentorship/createMentorProfile`,
621621
createMentorProfileRequest,
622622
options,
623623
);
@@ -697,7 +697,7 @@ export const createCategory = (
697697
options?: AxiosRequestConfig,
698698
): Promise<AxiosResponse<CreateCategoryResponse>> => {
699699
return axios.default.post(
700-
`http://localhost:8310/api/mentorship/createCategory`,
700+
`/api/mentorship/createCategory`,
701701
createCategoryRequest,
702702
options,
703703
);
@@ -777,7 +777,7 @@ export const createApplication = (
777777
options?: AxiosRequestConfig,
778778
): Promise<AxiosResponse<CreateApplicationResponse>> => {
779779
return axios.default.post(
780-
`http://localhost:8310/api/mentorship/createApplication`,
780+
`/api/mentorship/createApplication`,
781781
createApplicationRequest,
782782
options,
783783
);
@@ -857,7 +857,7 @@ export const updateMentorProfile = (
857857
options?: AxiosRequestConfig,
858858
): Promise<AxiosResponse<UpdateMentorProfileResponse>> => {
859859
return axios.default.patch(
860-
`http://localhost:8310/api/mentorship/updateMentorProfile`,
860+
`/api/mentorship/updateMentorProfile`,
861861
updateMentorProfileRequest,
862862
options,
863863
);
@@ -935,14 +935,11 @@ export const useUpdateMentorProfile = <
935935
export const listSkills = (
936936
options?: AxiosRequestConfig,
937937
): Promise<AxiosResponse<ListSkillResponse>> => {
938-
return axios.default.get(
939-
`http://localhost:8310/api/mentorship/listSkills`,
940-
options,
941-
);
938+
return axios.default.get(`/api/mentorship/listSkills`, options);
942939
};
943940

944941
export const getListSkillsQueryKey = () => {
945-
return [`http://localhost:8310/api/mentorship/listSkills`] as const;
942+
return [`/api/mentorship/listSkills`] as const;
946943
};
947944

948945
export const getListSkillsQueryOptions = <
@@ -1062,14 +1059,11 @@ export function useListSkills<
10621059
export const listCategories = (
10631060
options?: AxiosRequestConfig,
10641061
): Promise<AxiosResponse<ListCategoryResponse>> => {
1065-
return axios.default.get(
1066-
`http://localhost:8310/api/mentorship/listCategories`,
1067-
options,
1068-
);
1062+
return axios.default.get(`/api/mentorship/listCategories`, options);
10691063
};
10701064

10711065
export const getListCategoriesQueryKey = () => {
1072-
return [`http://localhost:8310/api/mentorship/listCategories`] as const;
1066+
return [`/api/mentorship/listCategories`] as const;
10731067
};
10741068

10751069
export const getListCategoriesQueryOptions = <
@@ -1190,20 +1184,17 @@ export const listApplications = (
11901184
params?: ListApplicationsParams,
11911185
options?: AxiosRequestConfig,
11921186
): Promise<AxiosResponse<ListApplicationResponse>> => {
1193-
return axios.default.get(
1194-
`http://localhost:8310/api/mentorship/listApplications`,
1195-
{
1196-
...options,
1197-
params: { ...params, ...options?.params },
1198-
},
1199-
);
1187+
return axios.default.get(`/api/mentorship/listApplications`, {
1188+
...options,
1189+
params: { ...params, ...options?.params },
1190+
});
12001191
};
12011192

12021193
export const getListApplicationsQueryKey = (
12031194
params?: ListApplicationsParams,
12041195
) => {
12051196
return [
1206-
`http://localhost:8310/api/mentorship/listApplications`,
1197+
`/api/mentorship/listApplications`,
12071198
...(params ? [params] : []),
12081199
] as const;
12091200
};
@@ -1354,18 +1345,15 @@ export const getMentorProfile = (
13541345
params: GetMentorProfileParams,
13551346
options?: AxiosRequestConfig,
13561347
): Promise<AxiosResponse<GetMentorProfileResponse>> => {
1357-
return axios.default.get(
1358-
`http://localhost:8310/api/mentorship/getMentorProfile`,
1359-
{
1360-
...options,
1361-
params: { ...params, ...options?.params },
1362-
},
1363-
);
1348+
return axios.default.get(`/api/mentorship/getMentorProfile`, {
1349+
...options,
1350+
params: { ...params, ...options?.params },
1351+
});
13641352
};
13651353

13661354
export const getGetMentorProfileQueryKey = (params: GetMentorProfileParams) => {
13671355
return [
1368-
`http://localhost:8310/api/mentorship/getMentorProfile`,
1356+
`/api/mentorship/getMentorProfile`,
13691357
...(params ? [params] : []),
13701358
] as const;
13711359
};
@@ -1516,14 +1504,11 @@ export const getApplication = (
15161504
id: string,
15171505
options?: AxiosRequestConfig,
15181506
): Promise<AxiosResponse<GetApplicationResponse>> => {
1519-
return axios.default.get(
1520-
`http://localhost:8310/api/mentorship/application/${id}`,
1521-
options,
1522-
);
1507+
return axios.default.get(`/api/mentorship/application/${id}`, options);
15231508
};
15241509

15251510
export const getGetApplicationQueryKey = (id: string) => {
1526-
return [`http://localhost:8310/api/mentorship/application/${id}`] as const;
1511+
return [`/api/mentorship/application/${id}`] as const;
15271512
};
15281513

15291514
export const getGetApplicationQueryOptions = <
@@ -1656,10 +1641,10 @@ export const deleteMentorProfile = (
16561641
deleteMentorProfileRequest: DeleteMentorProfileRequest,
16571642
options?: AxiosRequestConfig,
16581643
): Promise<AxiosResponse<DeleteMentorProfileResponse>> => {
1659-
return axios.default.delete(
1660-
`http://localhost:8310/api/mentorship/deleteMentorProfile`,
1661-
{ data: deleteMentorProfileRequest, ...options },
1662-
);
1644+
return axios.default.delete(`/api/mentorship/deleteMentorProfile`, {
1645+
data: deleteMentorProfileRequest,
1646+
...options,
1647+
});
16631648
};
16641649

16651650
export const getDeleteMentorProfileMutationOptions = <

client/src/api/rating.ts

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@ export const rateMentor = (
4141
rating: Rating,
4242
options?: AxiosRequestConfig,
4343
): Promise<AxiosResponse<Rating>> => {
44-
return axios.default.post(
45-
`http://localhost:8410/api/rating/rateMentor`,
46-
rating,
47-
options,
48-
);
44+
return axios.default.post(`/api/rating/rateMentor`, rating, options);
4945
};
5046

5147
export const getRateMentorMutationOptions = <
@@ -118,16 +114,11 @@ export const getRatingsByMentor = (
118114
mentorId: string,
119115
options?: AxiosRequestConfig,
120116
): Promise<AxiosResponse<Rating[]>> => {
121-
return axios.default.get(
122-
`http://localhost:8410/api/rating/mentor/${mentorId}/ratings`,
123-
options,
124-
);
117+
return axios.default.get(`/api/rating/mentor/${mentorId}/ratings`, options);
125118
};
126119

127120
export const getGetRatingsByMentorQueryKey = (mentorId: string) => {
128-
return [
129-
`http://localhost:8410/api/rating/mentor/${mentorId}/ratings`,
130-
] as const;
121+
return [`/api/rating/mentor/${mentorId}/ratings`] as const;
131122
};
132123

133124
export const getGetRatingsByMentorQueryOptions = <
@@ -281,16 +272,11 @@ export const getAverageRating = (
281272
mentorId: string,
282273
options?: AxiosRequestConfig,
283274
): Promise<AxiosResponse<MentorAverageRating>> => {
284-
return axios.default.get(
285-
`http://localhost:8410/api/rating/mentor/${mentorId}/average`,
286-
options,
287-
);
275+
return axios.default.get(`/api/rating/mentor/${mentorId}/average`, options);
288276
};
289277

290278
export const getGetAverageRatingQueryKey = (mentorId: string) => {
291-
return [
292-
`http://localhost:8410/api/rating/mentor/${mentorId}/average`,
293-
] as const;
279+
return [`/api/rating/mentor/${mentorId}/average`] as const;
294280
};
295281

296282
export const getGetAverageRatingQueryOptions = <

0 commit comments

Comments
 (0)