Skip to content
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

Dev #57

Merged
merged 257 commits into from
Jan 3, 2025
Merged

Dev #57

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
d347b42
chore: Update API documentation title and description
Ganthepro Nov 9, 2024
3847f20
chore: Remove unused tag from API documentation configuration
Ganthepro Nov 9, 2024
56dc454
chore: Update roles enum and related files
Ganthepro Nov 10, 2024
dd54854
chore: Update roles enum and related files
Ganthepro Nov 10, 2024
927e83b
chore: Add UserStreak entity and module
Ganthepro Nov 10, 2024
ee27031
chore: Add UserStreak module and service, and update related files
Ganthepro Nov 10, 2024
73d2873
Merge pull request #2 from SAIG-KMITL/feat/init-code-structure
khris-xp Nov 10, 2024
2b64d3c
chore: Update Dockerfile and docker-compose.yml for database migrations
Ganthepro Nov 10, 2024
3aa5083
chore: Update database configuration and add DataSource export
Ganthepro Nov 10, 2024
6f19dc8
chore: Update UserStreak module and service, and related files
Ganthepro Nov 10, 2024
73675c7
chore: Refactor UserStreakController to use UserStreakResponseDto
Ganthepro Nov 10, 2024
c02af4e
Merge pull request #3 from SAIG-KMITL/feat/user-management
khris-xp Nov 11, 2024
142f26d
add CRUD for category
paaw-potsawee Nov 11, 2024
128364f
add swagger for category
paaw-potsawee Nov 11, 2024
6d11afd
add enum slug
paaw-potsawee Nov 11, 2024
b02beac
create reward and user reward directory
paaw-potsawee Nov 12, 2024
72ad1ff
change slug enum to category directory
paaw-potsawee Nov 12, 2024
615469f
chore: Refactor user retrieval in AuthService to use findByEmail method
Ganthepro Nov 12, 2024
7470b2f
feat: Add Course module with DTOs, entity, service, and controller
Dangkeys Nov 13, 2024
f29912e
feat: Implement course creation endpoint and update database configur…
Dangkeys Nov 13, 2024
43bf59a
chore: Remove role validation from CreateUserDto and set default role…
Dangkeys Nov 13, 2024
fc130d0
Merge pull request #6 from SAIG-KMITL/feature/default-role
khris-xp Nov 13, 2024
bfde7b7
Merge pull request #5 from SAIG-KMITL/feat/category
khris-xp Nov 13, 2024
47e4b7a
feat: pagination query data function
khris-xp Nov 13, 2024
bfa5133
Merge pull request #7 from SAIG-KMITL/feat/pagination-typeorm
Dangkeys Nov 13, 2024
b561bdf
feat: Enhance course management with role-based access and teacher as…
Dangkeys Nov 13, 2024
c74edf1
feat: Implement category management with pagination and DTOs
Dangkeys Nov 13, 2024
4976679
Merge pull request #8 from SAIG-KMITL/feat/course-module
khris-xp Nov 13, 2024
e1ddd5b
feat: course module service with reordering
khris-xp Nov 14, 2024
231ba4a
Merge pull request #9 from SAIG-KMITL/feat/course-module-service
Ganthepro Nov 14, 2024
b6ce526
feat: chapter module service
khris-xp Nov 14, 2024
01fc70b
Merge pull request #10 from SAIG-KMITL/feat/chapter-module-service
Ganthepro Nov 14, 2024
81cc1ad
create reward module service
paaw-potsawee Nov 14, 2024
405d863
feat: implement course ownership functionality with new guard and dec…
Dangkeys Nov 14, 2024
f7e3cc2
feat: enhance chapter and course module services with error handling …
Dangkeys Nov 15, 2024
01dc42d
refactor: remove debugging log in CourseModuleService to clean up con…
Dangkeys Nov 15, 2024
cff0cf0
feat: add file module with S3 integration and folder enum
Ganthepro Nov 15, 2024
499d807
feat: integrate FileModule into UserModule and add profileKey to User…
Ganthepro Nov 15, 2024
5e95a17
feat: create exam api and dto
billza555 Nov 15, 2024
9b6bc3b
fix: string to enum
billza555 Nov 15, 2024
64d4769
Merge pull request #13 from SAIG-KMITL/exam-bill
Ganthepro Nov 15, 2024
bf11774
feat: enrollment module service
khris-xp Nov 15, 2024
c9f9abb
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
khris-xp Nov 15, 2024
501e2c7
refactor: remove CourseOwnershipGuard from AppModule and improve modu…
Dangkeys Nov 15, 2024
3911b60
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 15, 2024
d158a1e
feat: enable auto loading of entities in TypeORM configuration
Ganthepro Nov 15, 2024
136a19a
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Ganthepro Nov 15, 2024
95ec4da
Merge pull request #12 from SAIG-KMITL/feat/file-management
Dangkeys Nov 15, 2024
89ccc74
fixed: type in enrollment course entity
khris-xp Nov 16, 2024
8759652
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
khris-xp Nov 16, 2024
cd3feff
Merge pull request #14 from SAIG-KMITL/feat/enrollment-module-service
Ganthepro Nov 16, 2024
470903b
feat: add chat room module with service and controller; refactor exam…
Ganthepro Nov 16, 2024
11c6079
feat: create question dto
billza555 Nov 16, 2024
5091950
feat: update exam response
billza555 Nov 16, 2024
3fb0951
merge: merge dev in feat/question
billza555 Nov 16, 2024
bc7eca0
fix: fix duplicate import
billza555 Nov 16, 2024
168fd89
feat: implement chat room module with DTOs, enums, and entity; update…
Ganthepro Nov 16, 2024
4a6b5e9
feat: create enum type question
billza555 Nov 16, 2024
f887811
feat: teacher can find exam published
billza555 Nov 16, 2024
df63d33
merge: merge dev to feat/question
billza555 Nov 16, 2024
fde04c8
fix: fix duplicate import
billza555 Nov 16, 2024
9cd6bad
Merge branch 'feat/question' of https://github.com/SAIG-KMITL/edusaig…
billza555 Nov 16, 2024
1e8a4b1
fix: add module depand main
billza555 Nov 16, 2024
5675c35
fix: fix bug
billza555 Nov 16, 2024
6033fd1
feat: add chat message module with entity, DTOs, and enums; integrate…
Ganthepro Nov 16, 2024
c92d2bc
feat: create exam-attempt dto and api
billza555 Nov 16, 2024
7a26920
feat: add populate
billza555 Nov 16, 2024
9c3f107
feat: add list to onetomany
billza555 Nov 16, 2024
9a34d68
Merge pull request #15 from SAIG-KMITL/feat/question
Ganthepro Nov 16, 2024
e928e90
merge: merge dev to feat/exam-attempt
billza555 Nov 16, 2024
c142e51
Merge pull request #16 from SAIG-KMITL/feat/exam-attempt
khris-xp Nov 16, 2024
1647bbd
feat: enrollment module service
khris-xp Nov 16, 2024
5ee4313
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
khris-xp Nov 16, 2024
8223ba0
feat: create question-option
billza555 Nov 17, 2024
501e6a1
feat: implement course ownership validation for chapters and course m…
Dangkeys Nov 17, 2024
4e97301
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 17, 2024
d3ebd40
feat: create question-option dto and api
billza555 Nov 17, 2024
af58083
create use-reward service
paaw-potsawee Nov 17, 2024
cc357b3
Merge pull request #18 from SAIG-KMITL/feat/question-option
Ganthepro Nov 17, 2024
df47271
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
khris-xp Nov 17, 2024
f596dac
Merge pull request #17 from SAIG-KMITL/feat/progress-module-service
Ganthepro Nov 17, 2024
0534b7d
feat: create exam-answer
billza555 Nov 17, 2024
9deb537
feat: student can create and update exam-attempt
billza555 Nov 17, 2024
c96005b
feat: delete admin permission in update
billza555 Nov 17, 2024
a46a4fe
add error handler in reward
paaw-potsawee Nov 17, 2024
a188d92
feat: user occupation module service
khris-xp Nov 17, 2024
66ca3bc
Merge pull request #21 from SAIG-KMITL/feat/user-occupation-module-se…
billza555 Nov 17, 2024
d65d957
feat: user background topic module service
khris-xp Nov 17, 2024
0a82138
Merge pull request #22 from SAIG-KMITL/feat/user-background-topic-mod…
billza555 Nov 17, 2024
968b6db
feat: create exam-answer dto and api
billza555 Nov 17, 2024
a35dc80
merge: dev to feat/exam-answer
billza555 Nov 17, 2024
279ce36
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 17, 2024
0e4376a
fix: bug when populate
billza555 Nov 17, 2024
e9be152
feat: add populate in update
billza555 Nov 17, 2024
3fb1ef1
feat: sent only role and id in function
billza555 Nov 17, 2024
5f12bd0
Merge pull request #19 from SAIG-KMITL/feat/exam-attempt
Ganthepro Nov 17, 2024
096db2d
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 17, 2024
e681927
feat: enhance chat room and enrollment modules; add ownership guard a…
Ganthepro Nov 17, 2024
d2ae63b
feat: user background module service
khris-xp Nov 17, 2024
9b14a7d
fix: database configs and user occupation
khris-xp Nov 17, 2024
8ae4927
edit status enum and path find one
paaw-potsawee Nov 17, 2024
2361e99
feat: refactor enrollment service and controller; simplify findOne me…
Ganthepro Nov 17, 2024
05be112
feat: add enums and DTOs for progress, exam attempts, questions, and …
Ganthepro Nov 17, 2024
81d0f6e
fix: database configs and user background topic module
khris-xp Nov 17, 2024
37a90e7
Merge pull request #25 from SAIG-KMITL/feat/chat
Dangkeys Nov 17, 2024
42ce82b
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
khris-xp Nov 17, 2024
edc5df3
Merge pull request #24 from SAIG-KMITL/feat/user-background-module-se…
Ganthepro Nov 17, 2024
be3e468
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 17, 2024
eff3c6b
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 17, 2024
469b488
Merge pull request #11 from SAIG-KMITL/feat/handle-course-module-case
Ganthepro Nov 17, 2024
329351b
add points in user response
paaw-potsawee Nov 17, 2024
a4702b8
merge from dev
paaw-potsawee Nov 17, 2024
2f80f5d
Merge pull request #20 from SAIG-KMITL/feat/reward
Ganthepro Nov 17, 2024
8a2fe3b
feat: change type in input
billza555 Nov 17, 2024
53820d5
merge: dev to feat/exam-answer
billza555 Nov 17, 2024
c5a4d12
Merge pull request #23 from SAIG-KMITL/feat/exam-answer
Ganthepro Nov 17, 2024
5f00cb5
style: format code in chapter.entity.ts for consistency and readability
Ganthepro Nov 18, 2024
b079a4f
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Ganthepro Nov 18, 2024
04aded2
add swagger response to category and reward
paaw-potsawee Nov 18, 2024
3e19eaf
feat: update chat room DTO and entity for improved structure and nami…
Ganthepro Nov 18, 2024
796f90a
Merge pull request #26 from SAIG-KMITL/feat/category-v2
Ganthepro Nov 18, 2024
3db4e91
style: standardize enum formatting and improve code consistency acros…
Ganthepro Nov 18, 2024
cf2d296
Merge branch 'dev' into feat/chat
Ganthepro Nov 18, 2024
b55f994
Merge pull request #27 from SAIG-KMITL/feat/chat
khris-xp Nov 18, 2024
7417c19
fix: url path
billza555 Nov 18, 2024
e9994c8
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Ganthepro Nov 18, 2024
f9609f7
feat: add admin email and password to environment configuration; enha…
Ganthepro Nov 18, 2024
e07b4f1
Merge pull request #28 from SAIG-KMITL:fix/url-path
Ganthepro Nov 18, 2024
7698b0c
Merge pull request #29 from SAIG-KMITL/feat/user-management
khris-xp Nov 18, 2024
59d3ee4
feat: roadmap module service
khris-xp Nov 18, 2024
bad4f83
Merge pull request #30 from SAIG-KMITL/feat/roadmap-module-service
Ganthepro Nov 18, 2024
5949346
feat: enhance chat room and message entities with improved relationsh…
Ganthepro Nov 19, 2024
5f177a3
Merge branch 'feat/chat' of https://github.com/SAIG-KMITL/edusaig-api…
Ganthepro Nov 19, 2024
828ff3d
feat: add AI access secret to environment config and implement chat m…
Ganthepro Nov 19, 2024
1e5e848
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Ganthepro Nov 19, 2024
f0b1ff4
feat: update chat message types to lowercase, enhance enrollment rela…
Ganthepro Nov 19, 2024
cfee047
refactor: remove console.log statements from chat message service, pr…
Ganthepro Nov 19, 2024
d9647e7
style: format code for consistency and readability across multiple files
Ganthepro Nov 19, 2024
d223fa6
refactor: remove JWT_AI_ACCESS_SECRET from environment configuration …
Ganthepro Nov 19, 2024
3139e3b
feat: change input in update dto
billza555 Nov 19, 2024
58985aa
Merge pull request #32 from SAIG-KMITL/feat/change-input-in-update
Ganthepro Nov 20, 2024
618cb9a
Merge pull request #31 from SAIG-KMITL/feat/chat
khris-xp Nov 20, 2024
e3e5b33
add pagination and upload thumbnail
paaw-potsawee Nov 20, 2024
f956f48
add pagination
paaw-potsawee Nov 20, 2024
e5ad67e
Merge pull request #34 from SAIG-KMITL/feat/category
Ganthepro Nov 20, 2024
1d7d6bf
feat(course): enable thumbnail upload and retrieval for courses, refa…
Dangkeys Nov 20, 2024
96b6614
refactor(course): change thumbnail to thumbnailKey in course entity, …
Dangkeys Nov 20, 2024
5a4c049
refactor(course): rename thumbnail to thumbnailKey in controller and …
Dangkeys Nov 20, 2024
3ced5d4
fix(course): update thumbnail update logic to use correct keys in cou…
Dangkeys Nov 20, 2024
fe4fdde
Merge pull request #35 from SAIG-KMITL/feat/implement-file-module-on-…
Ganthepro Nov 20, 2024
a30d3b9
refactor: Update Chapter management for video handling, integrating F…
Dangkeys Nov 20, 2024
1f4efca
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 20, 2024
662ff99
feat(chapter): add video upload and retrieval endpoints, enhancing vi…
Dangkeys Nov 20, 2024
b7c5746
add search by type
paaw-potsawee Nov 21, 2024
89c7a71
Merge branch 'dev' into feat/reward
paaw-potsawee Nov 21, 2024
b47729b
upload reward thumbnail
paaw-potsawee Nov 21, 2024
8f97610
Merge pull request #36 from SAIG-KMITL/feat/implement-file-module-on-…
Ganthepro Nov 21, 2024
bf99115
feat: create question and choice from data
billza555 Nov 21, 2024
c389ce1
feat: student can crud exam-answer
billza555 Nov 21, 2024
64b72b2
Merge pull request #37 from SAIG-KMITL/feat/reward
paaw-potsawee Nov 21, 2024
7d91663
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 25, 2024
614cf87
Add transcribeAudio feature to ChapterController and ChapterService, …
Dangkeys Nov 25, 2024
ea7ea2c
feat: add AI_URL to environment config, implement findMany method in …
Ganthepro Nov 25, 2024
07802ce
feat: connect with ai
billza555 Nov 25, 2024
5bd9b2a
feat: refactor user streak handling, update response DTOs to use Date…
Ganthepro Nov 25, 2024
3a44688
Merge pull request #39 from SAIG-KMITL/feat/generate-test
Ganthepro Nov 25, 2024
702ee24
refactor: remove console.log statements from chat message and user co…
Ganthepro Nov 25, 2024
cff3c43
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Ganthepro Nov 25, 2024
22bb501
refactor: change BadRequestException to ConflictException for existin…
Ganthepro Nov 25, 2024
57c03aa
Feat/chapter-module: add ownership features and query enhancements fo…
Dangkeys Nov 25, 2024
a298019
feat: add return type in void
billza555 Nov 25, 2024
4568c62
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 25, 2024
1f17c83
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 25, 2024
910059a
refactor(course): enhance query structure and fix enrollment count re…
Dangkeys Nov 25, 2024
17adaf3
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 25, 2024
108f9b4
Merge pull request #41 from SAIG-KMITL/feat/update-return-type
Ganthepro Nov 25, 2024
e08c0e0
Merge pull request #42 from SAIG-KMITL/fix/course-course-module-chapter
Ganthepro Nov 25, 2024
b40bc10
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 25, 2024
66edba7
feat: check with enroll
billza555 Nov 25, 2024
d6c75fd
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 25, 2024
3ad1ab9
feat: update return in delete
billza555 Nov 25, 2024
1dcc4a5
fix: get course by course module id validate
khris-xp Nov 26, 2024
0c142f8
Merge pull request #43 from SAIG-KMITL/feat/update-validate
Ganthepro Nov 26, 2024
195c5a7
feat: create pretest and find question pretest
billza555 Nov 26, 2024
daded36
feat: implemnt asr
Dangkeys Nov 26, 2024
c5ac63c
feat: adjust return structure for student role to include preview opt…
Dangkeys Nov 26, 2024
7c11357
feat: create api for search pretest in question-option
billza555 Nov 26, 2024
8d36d76
feat:create question-option for pretest
billza555 Nov 26, 2024
b7540cb
Merge pull request #44 from SAIG-KMITL/fix/find-course-module-by-cour…
Ganthepro Nov 26, 2024
0a22839
Merge pull request #45 from SAIG-KMITL/fix/chapter-with-ownership
Ganthepro Nov 26, 2024
2501e6a
Merge branch 'main' of https://github.com/SAIG-KMITL/edusaig-api into…
Ganthepro Nov 26, 2024
ef7d983
fix: correct environment variable name for JWT refresh expiration in …
Ganthepro Nov 26, 2024
e8faac9
feat: create pretest in exam-attempt
billza555 Nov 26, 2024
fb5a7c7
feat: add topics in request body
billza555 Nov 26, 2024
9ae9d22
feat: add parametor in requestbody
billza555 Nov 26, 2024
722ea7c
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 26, 2024
7ade2b7
feat: add ai in path
billza555 Nov 26, 2024
192b0ba
feat: replace AuthenticatedRequest with Public decorator in getVideo …
Dangkeys Nov 26, 2024
d903a51
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into dev
Dangkeys Nov 26, 2024
a6c041f
Merge branch 'dev' into feat/create-pretest
Ganthepro Nov 27, 2024
aa26d30
Merge pull request #46 from SAIG-KMITL/feat/create-pretest
Ganthepro Nov 27, 2024
fda1bfb
fix: update volume path in docker-compose.yml to use environment vari…
Ganthepro Nov 27, 2024
4862099
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into dev
Ganthepro Nov 27, 2024
c6ccf9f
feat: add VOLUMES_PATH to environment variables in GitHub Actions wor…
Ganthepro Nov 27, 2024
550dfd2
fix: update GitHub Actions workflow permissions and modify volume pat…
Ganthepro Nov 27, 2024
047779b
feat: add step to switch to root user in GitHub Actions workflow
Ganthepro Nov 27, 2024
21e5994
feat: add step to identify current user in GitHub Actions workflow
Ganthepro Nov 27, 2024
7db60d2
fix: remove unnecessary 'who am i' step from GitHub Actions workflow
Ganthepro Nov 27, 2024
e85a2f5
feat: find exam-answer with pretest
billza555 Nov 27, 2024
9f20c94
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 27, 2024
c3531e5
feat: add API_URL to dotenv and update related configurations in chap…
Dangkeys Nov 27, 2024
086ef77
feat: find exam-answer by pretest id
billza555 Nov 27, 2024
bb2d0a1
feat: rename transcribe endpoint to summarize; implement summarize lo…
Dangkeys Nov 27, 2024
634e960
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
Dangkeys Nov 27, 2024
2c151c2
Merge pull request #47 from SAIG-KMITL/feat/pretest-with-exam-answer
khris-xp Nov 27, 2024
c57b316
feat: add summary field to ChapterResponseDto and implement Summarize…
Dangkeys Nov 27, 2024
91f7b36
refactor: remove unnecessary @ApiBearerAuth() decorators from course …
Dangkeys Nov 27, 2024
176c0f2
feat: add VideoGuard for chapter video access control
Ganthepro Nov 27, 2024
7ddc460
feat: add correctAnswer in exan-answer
billza555 Nov 27, 2024
1d4f756
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
billza555 Nov 27, 2024
959234b
feat: populate optiontext in questionOption
billza555 Nov 27, 2024
c268790
Merge pull request #49 from SAIG-KMITL/feat/chapter-module-service
Dangkeys Nov 27, 2024
a7c0074
Merge pull request #48 from SAIG-KMITL/feature/connect-asr
Ganthepro Nov 27, 2024
be244ea
feat: connect ai with roadmap service
khris-xp Nov 28, 2024
f95050f
Merge pull request #50 from SAIG-KMITL/feat/pretest-with-exam-answer
khris-xp Nov 28, 2024
3ddbb96
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
khris-xp Nov 28, 2024
2cee851
fix: create roadmap ai dto typo
khris-xp Nov 28, 2024
1e6d090
feat: connect with ai evaluate
khris-xp Nov 28, 2024
cfb02d3
Merge pull request #51 from SAIG-KMITL/feat/connect-with-roadmap-ai
Ganthepro Nov 28, 2024
d625b80
feat: search exam by couseModuleID
billza555 Nov 29, 2024
dc88fe8
Merge pull request #52 from SAIG-KMITL/feat/exam-by-course-module
khris-xp Nov 29, 2024
a3f7e2a
feat: enhance user background and occupation controllers with public …
Ganthepro Nov 29, 2024
e2c1619
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into dev
Ganthepro Nov 29, 2024
c598290
feat: create progress and enroll by user endpoint
khris-xp Nov 29, 2024
19a0028
Merge pull request #53 from SAIG-KMITL/feat/connect-with-roadmap-ai
Ganthepro Nov 29, 2024
2791f99
chore: remove unnecessary switch to root step in GitHub Actions workflow
Ganthepro Nov 29, 2024
93230a0
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into dev
Ganthepro Nov 29, 2024
7ed7e69
feat: change find all course with published status
khris-xp Nov 29, 2024
284067e
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into …
khris-xp Nov 29, 2024
729ddd3
Merge pull request #54 from SAIG-KMITL/feat/connect-with-roadmap-ai
Ganthepro Nov 29, 2024
2f73226
feat: add user switch step in GitHub Actions workflow
Ganthepro Nov 29, 2024
e2bf183
Merge branch 'dev' of https://github.com/SAIG-KMITL/edusaig-api into dev
Ganthepro Nov 29, 2024
c01059d
feat: add API_URL to environment variables in GitHub Actions workflow
Ganthepro Nov 29, 2024
c9d5f4e
refactor: remove unnecessary user switch step from GitHub Actions wor…
Ganthepro Nov 29, 2024
6d4fac3
feat: add VOLUMES_PATH to environment variables and update docker-com…
Ganthepro Nov 29, 2024
791e350
refactor: change chapter summary endpoint and enhance error handling …
Dangkeys Nov 29, 2024
932a950
refactor: remove unnecessary console error logs from chapter service …
Dangkeys Nov 29, 2024
f0a7d82
Merge pull request #55 from SAIG-KMITL/fix/summarize-video
Ganthepro Nov 29, 2024
04d2c85
fix: remove user occupation public guards
khris-xp Nov 29, 2024
91173c4
Merge pull request #56 from SAIG-KMITL/feat/connect-with-roadmap-ai
khris-xp Nov 29, 2024
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
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
PORT=8080
NODE_ENV=development
DB_HOST=edusaig-db
DB_PORT=5432
DB_USERNAME=postgres
DB_PASSWORD=qwerty
DB_DATABASE=edusaig
CORS_ALLOW_ORIGIN=http://localhost:5173
JWT_ACCESS_SECRET=+W5LRxRFUk8MKSHMeRYevRg
JWT_REFRESH_SECRET=2Z7bB8GizN15kaHzB+H8Tg
JWT_ACCESS_EXPIRATION=1d
JWT_REFRESH_EXPIRATION=7d
AWS_ACCESS_KEY_ID=youraccesskey
AWS_SECRET_ACCESS_KEY=yoursecretkey
AWS_REGION=yourregion
AWS_BUCKET_NAME=yourbucketname
ADMIN_EMAIL=admin@gmail.com
ADMIN_PASSWORD=P@ssword!
AI_URL=https://localhost:5000
API_URL=https://api.edusaig.com
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Build and deploy to an VM

on:
push:
push:
branches:
- dev
workflow_dispatch:

permissions:
contents: read
contents: write

jobs:
build-and-deploy:
Expand All @@ -30,14 +30,17 @@ jobs:
echo "JWT_ACCESS_SECRET=${{ secrets.JWT_ACCESS_SECRET }}" >> .env
echo "JWT_REFRESH_SECRET=${{ secrets.JWT_REFRESH_SECRET }}" >> .env
echo "JWT_ACCESS_EXPIRATION=${{ secrets.JWT_ACCESS_EXPIRATION }}" >> .env
echo "AI_HOST=${{ secrets.JWT_REFRESH_EXPIRATION }}" >> .env
echo "JWT_REFRESH_EXPIRATION=${{ secrets.JWT_REFRESH_EXPIRATION }}" >> .env
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> .env
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> .env
echo "AWS_REGION=${{ secrets.AWS_REGION }}" >> .env
echo "AWS_BUCKET_NAME=${{ secrets.AWS_BUCKET_NAME }}" >> .env
echo "ADMIN_EMAIL=${{ secrets.ADMIN_EMAIL }}" >> .env
echo "ADMIN_PASSWORD=${{ secrets.ADMIN_PASSWORD }}" >> .env
echo "AI_URL=${{ secrets.AI_URL }}" >> .env
echo "API_URL=${{ secrets.API_URL }}" >> .env
echo "API_URL=${{ secrets.API_URL }}" >> .env
echo "VOLUMES_PATH=${{ secrets.VOLUMES_PATH }}" >> .env
cat .env

- name: Running Docker Compose
Expand Down
85 changes: 38 additions & 47 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,52 +1,43 @@
packages/*/package-lock.json

# dependencies
node_modules/

# IDE
/.idea
/.awcache
/.vscode
/.devcontainer
/.classpath
/.project
/.settings
*.code-workspace

# Vim
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# bundle
packages/**/*.d.ts
packages/**/*.js

# misc
# compiled output
/dist
/node_modules
/postgres-data

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
pnpm-lock.yaml

# OS
.DS_Store
lerna-debug.log
npm-debug.log
yarn-error.log
/**/npm-debug.log
/packages/**/.npmignore
/packages/**/LICENSE
*.tsbuildinfo

# example
/quick-start
/example_dist
/example

# tests
/test
/benchmarks/memory
# Tests
/coverage
/.nyc_output
/packages/graphql
/benchmarks/memory
build/config\.gypi

.npmrc
pnpm-lock.yaml
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

.data
/files
.env
/ormconfig.json
/src/database/migrations
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM node:20-alpine AS base

RUN npm i -g pnpm

FROM base as dependencies
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile

FROM base AS build
WORKDIR /app
COPY . .
COPY --from=dependencies /app/node_modules ./node_modules
RUN pnpm run build
RUN pnpm prune --prod

FROM base AS deploy
RUN apk add --update curl && rm -rf /var/cache/apk/*

WORKDIR /app
COPY --from=build --chown=node:node /app/package.json /app/pnpm-lock.yaml ./
COPY --from=build --chown=node:node /app/dist ./dist
COPY --from=build --chown=node:node /app/node_modules ./node_modules
COPY --chown=node:node .env .env

USER node

EXPOSE 3000
CMD ["node", "dist/main.js"]
38 changes: 38 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: '3.8'

services:
db:
image: postgres:alpine3.20
container_name: ${DB_HOST}
restart: unless-stopped
ports:
- '${DB_PORT}:${DB_PORT}'
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_DATABASE}
volumes:
- ${VOLUMES_PATH}:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USERNAME}']
interval: 10s
timeout: 5s
retries: 5

app:
container_name: edusaig-api
image: edusaig-api
depends_on:
db:
condition: service_healthy
build:
context: .
restart: unless-stopped
env_file:
- .env
environment:
- TZ=Asia/Bangkok
ports:
- '${PORT}:${PORT}'
volumes:
- ./src/database/migrations:/app/dist/database/migrations
Loading