Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
d1e154c
fix(swagger): :zap: revert methodKey of swagger api
lehuygiang28 Mar 28, 2024
1248754
refactor(main): remove unused
lehuygiang28 Mar 29, 2024
21647a7
feat(mail): :sparkles: add `mail` module
lehuygiang28 Mar 29, 2024
caadb0c
feat(auth): :zap: update hash of confirmation approach
lehuygiang28 Mar 29, 2024
8d0ef82
feat(auth): :sparkles: add `confirm-email`
lehuygiang28 Mar 29, 2024
6faf027
fix(auth): remove redundant code and optimize user email verification
lehuygiang28 Mar 29, 2024
8e83b09
Merge pull request #8 from TechCell-Project/feat_mail
lehuygiang28 Mar 29, 2024
a058c53
update: add new directories for i18n language files and mail templates
lehuygiang28 Mar 29, 2024
53ba6a6
feat(auth): :sparkles: add forgot and reset password
lehuygiang28 Mar 29, 2024
7670539
feat(third-party): :sparkles: add `giaohangnhanh`
lehuygiang28 Mar 30, 2024
0b88d9c
feat(auth): :sparkles: add update user
lehuygiang28 Mar 30, 2024
4bffd85
ci: :rocket: trigger ci/cd
lehuygiang28 Mar 30, 2024
7dc307c
fix(workflows): :bug: fix missing sample env
lehuygiang28 Mar 30, 2024
fdd8512
fix(auth): :zap: update to handle check the `isDefalt` address
lehuygiang28 Mar 30, 2024
28cc79c
fix(main): :bug: fix api-stats auth
lehuygiang28 Mar 30, 2024
c8c1285
chore: :art: lint & format
lehuygiang28 Mar 31, 2024
43b63f0
feat(users): :sparkles: add get `users`
lehuygiang28 Mar 31, 2024
ca13cc1
feat(users): :sparkles: add get `users` by id
lehuygiang28 Mar 31, 2024
f239fc2
feat(users): :sparkles: add post/create `user`
lehuygiang28 Mar 31, 2024
81b4e90
refactor(swagger): :zap: using static example instead
lehuygiang28 Mar 31, 2024
cdc51b7
refactor(users): :bug: wrap user if user found
lehuygiang28 Mar 31, 2024
54335ff
fix(lib/common): :art: fix file structure
lehuygiang28 Mar 31, 2024
4d748f9
Merge pull request #9 from TechCell-Project/feat_users
lehuygiang28 Mar 31, 2024
973b0bb
feat(users): :sparkles: add change role, block/unblock users
lehuygiang28 Mar 31, 2024
a54f875
refactor(users): :fire: avoid duplicates
lehuygiang28 Mar 31, 2024
a9d74f6
Merge pull request #10 from TechCell-Project/feat_users
lehuygiang28 Mar 31, 2024
e44f851
docs(swagger): :memo: update swaggger docs
lehuygiang28 Apr 1, 2024
0a6d8f4
fix(swagger): :bug: fix wrong api response type
lehuygiang28 Apr 1, 2024
3f633ae
ci(sdk): publish to npm instead of github (#11)
lehuygiang28 Apr 1, 2024
fad5955
ci: :green_heart: update .npmignore [skip sdk]
lehuygiang28 Apr 1, 2024
2a09d46
ci: :green_heart: update step run [skip docker]
lehuygiang28 Apr 1, 2024
a4f5111
ci: :green_heart: add .npmrc to ignore list
lehuygiang28 Apr 1, 2024
4a2cb61
fix: :bug: fix update an immutable filed
lehuygiang28 Apr 2, 2024
5fefccd
fix: :bug: fix update an immutable filed [skip sdk]
lehuygiang28 Apr 2, 2024
f942dc7
feat(attributes): :sparkles: add create/read attributes
lehuygiang28 Apr 3, 2024
a54743c
docs(swagger): :memo: add extra models for get users
lehuygiang28 Apr 3, 2024
79503e2
fix: fix missing logger config
lehuygiang28 Apr 3, 2024
233c392
perf(auth): :zap: disable auth for quick development
lehuygiang28 Apr 3, 2024
7750da2
fix(auth): :bug: fix broken when update user's password
lehuygiang28 Apr 3, 2024
bc3cc75
fix(auth): :bug: fix register [skip sdk]
lehuygiang28 Apr 4, 2024
4136474
fix(auth): :bug: fix register with create user [skip sdk]
lehuygiang28 Apr 4, 2024
f49afb1
docs(swagger): :memo: update type
lehuygiang28 Apr 4, 2024
71cdf9c
docs(swagger): :memo: update enum type
lehuygiang28 Apr 4, 2024
9fdabbe
docs(swagger): :memo: update prop type
lehuygiang28 Apr 4, 2024
3527b77
feat(attributes): :sparkles: add update attributes
lehuygiang28 Apr 4, 2024
589a26f
feat(attributes): :sparkles: add delete attributes
lehuygiang28 Apr 4, 2024
f6b1ce6
feat(attributes): :zap: update get attributes with status filters
lehuygiang28 Apr 4, 2024
aa0368c
build: :arrow_up: upgrade yarn to 4.1.1
lehuygiang28 Apr 4, 2024
ee4b036
feat(auth): :zap: add return url to forgot password
lehuygiang28 Apr 5, 2024
dfb2893
fix(auth): :bug: fix broken refresh token
lehuygiang28 Apr 5, 2024
c23bf6e
fix(users): :bug: fix block/unblock users issue
lehuygiang28 Apr 5, 2024
fda0af3
refactor(users): :fire: remove `userName` field
lehuygiang28 Apr 5, 2024
7b6e164
ci: :zap: using package instead of sleep command
lehuygiang28 Apr 6, 2024
1b4b8fb
feat(brands): :sparkles: add `brands` api
lehuygiang28 Apr 6, 2024
b2e143b
fix: :bug: fi build failed on brands
lehuygiang28 Apr 6, 2024
7f1b5cd
fix(dtos): :bug: fix validate json issue
lehuygiang28 Apr 6, 2024
45f324a
feat(users): :bug: fix transform query data issue
lehuygiang28 Apr 6, 2024
1bf3219
feat(attributes): :sparkles: add validate attribute
lehuygiang28 Apr 6, 2024
396bb08
fix(typos): :pencil2: fix naming file typos
lehuygiang28 Apr 6, 2024
64187d1
feat(spus): :sparkles: add `spus` api
lehuygiang28 Apr 6, 2024
5a11258
feat(swagger): :memo: update extra models for `spus`
lehuygiang28 Apr 6, 2024
d7eaabf
feat(address): :sparkles: add `address` api
lehuygiang28 Apr 6, 2024
65d5ce0
feat(third-party): :sparkles: add `cloudinary` libs
lehuygiang28 Apr 6, 2024
6ac6498
feat(images): :sparkles: add `images` api
lehuygiang28 Apr 6, 2024
2b80dc5
refactor(images): :fire: remove upload single file
lehuygiang28 Apr 6, 2024
6fc44d8
feat(images): :zap: update auth required for upload images
lehuygiang28 Apr 6, 2024
ece3764
feat: :bug: fix issue with ObjectId serializer
lehuygiang28 Apr 6, 2024
dc171e4
ci(sdk): :zap: add files to sdk package.json
lehuygiang28 Apr 6, 2024
2e10dda
feat(sdk): :rocket: update sdk for dart and dart-dio
lehuygiang28 Apr 6, 2024
9aa3e7b
refactor: :recycle: update all enum is ending with `Enum`
lehuygiang28 Apr 7, 2024
49ca6ec
fix(swagger): :memo: fix wrong default data
lehuygiang28 Apr 7, 2024
2984951
feat(microservices): :boom: create `communication` service (#12)
lehuygiang28 Apr 8, 2024
fb2d65c
fix: :bug: fix broken path of Dockerfile
lehuygiang28 Apr 8, 2024
4bd00d4
fix: :bug: update assets i18n json for build
lehuygiang28 Apr 8, 2024
eb3d6b8
refactor(path): :recycle: refactor ts-path `~/module` to `~/server`
lehuygiang28 Apr 8, 2024
152bf7b
feat(users): :sparkles: update post image for user
lehuygiang28 Apr 8, 2024
5e3c190
feat(users): :sparkles: update post image for spus
lehuygiang28 Apr 8, 2024
eea4171
fix: :green_heart: fix ci run webserver
lehuygiang28 Apr 8, 2024
1cb7275
fix: :green_heart: fix ci run webserver
lehuygiang28 Apr 8, 2024
3a9e2d8
fix(sdk): :bug: fix sdk gitHost typos
lehuygiang28 Apr 8, 2024
eba671d
feat: :sparkles: auto generate uniq slug from `name`
lehuygiang28 Apr 9, 2024
0a3e2bc
feat(skus): :sparkles: create skus resource
lehuygiang28 Apr 9, 2024
cc5fdda
feat(skus): :sparkles: update feat create/read
lehuygiang28 Apr 9, 2024
3fa63c1
docs(swagger): :memo: update schema
lehuygiang28 Apr 9, 2024
94a737e
docs(swagger): :memo: update schema
lehuygiang28 Apr 9, 2024
b50f310
chore: :fire: remove unused modules
lehuygiang28 Apr 10, 2024
a31068c
feat(spus): :sparkles: add update spu, spu models
lehuygiang28 Apr 10, 2024
ac7f1e8
fix(attributes): :bug: fix `sort` & `filters` can be optional
lehuygiang28 Apr 10, 2024
4c2fc96
refactor(auth): :recycle: move refresh token to body field
lehuygiang28 Apr 10, 2024
425cfb4
feat: :sparkles: update status list when filter many
lehuygiang28 Apr 10, 2024
6983438
fix(spus): :bug: fix lost old model data when update
lehuygiang28 Apr 10, 2024
e08b28d
feat(skus): ✨ add `skus` api (#13)
lehuygiang28 Apr 12, 2024
e9591bd
fix(attributes): :bug: fix attributes filter json parse
lehuygiang28 Apr 12, 2024
eb5c4dd
fix(auth): :bug: fix update name of user
lehuygiang28 Apr 12, 2024
c145d15
fix(third-party): :pencil2: change naming snake_case to camelCase
lehuygiang28 Apr 12, 2024
67958f7
feat(tags): :sparkles: add `tags` apis (#14)
lehuygiang28 Apr 13, 2024
1900e9f
fix(auth): :bug: fix issue when tranform an invalid value data
lehuygiang28 Apr 14, 2024
b1ec2da
fix(skus): :bug: fix issue categories now is tags
lehuygiang28 Apr 14, 2024
b9d4df1
fix(dtos): :bug: fix issue dto and schema not match
lehuygiang28 Apr 15, 2024
7cc291c
docs(swagger): :bug: update optional for swagger property
lehuygiang28 Apr 15, 2024
4781fe9
fix(skus): :bug: fix issue not check duplicate attributes
lehuygiang28 Apr 15, 2024
09a2d5c
feat(products): ✨ add products apis (#16)
lehuygiang28 Apr 15, 2024
5bdfe4f
feat: :zap: update increase max limit of record can get
lehuygiang28 Apr 16, 2024
b14c6f2
fix(skus): :bug: fix issue find exists sku
lehuygiang28 Apr 16, 2024
5e44f65
feat(skus): :zap: update return sku after created
lehuygiang28 Apr 16, 2024
a2ad196
feat(spus): :zap: update return spu after created
lehuygiang28 Apr 16, 2024
e116a38
feat(carts): :sparkles: add `carts` apis (#17)
lehuygiang28 Apr 16, 2024
3c9d12c
fix(address): :zap: remove redundant cache
lehuygiang28 Apr 17, 2024
aea674d
feat(auth): :sparkles: update get `/me` return address with it name
lehuygiang28 Apr 17, 2024
92404e8
chore(seed): :bento: add samples json data
lehuygiang28 Apr 18, 2024
e676dd0
perf(auth): :zap: update auth role for spu and sku apis
lehuygiang28 Apr 18, 2024
d24e305
feat(attributes): :zap: add query attributes with `keyword`
lehuygiang28 Apr 18, 2024
2d0ed42
feat(skus): :zap: add query skus with `keyword`
lehuygiang28 Apr 18, 2024
b653f86
fix(skus): :bug: fix issue parse json string
lehuygiang28 Apr 18, 2024
1597d92
feat(products): :zap: cachable products search
lehuygiang28 Apr 18, 2024
97181aa
fix(products): :bug: fix unsafe usage of optional chaining
lehuygiang28 Apr 18, 2024
db74b52
fix(products): :bug: provide a compare function
lehuygiang28 Apr 18, 2024
439ca92
fix(products): :bug: fix null type of data from cache
lehuygiang28 Apr 18, 2024
e0154d7
chore: :sparkles: add samples data
lehuygiang28 Apr 18, 2024
78b8dbe
fix(attributes): :bug: fix issue when transform sort of attribute
lehuygiang28 Apr 19, 2024
a5e1c8c
feat(skus): :sparkles: add bullmq to release holding skus
lehuygiang28 Apr 19, 2024
fa5a9c2
feat(orders): :sparkles: add `preview` api for preview without create…
lehuygiang28 Apr 19, 2024
1b8b6e5
fix(bullmq): :zap: consider using 'await' for the promise inside this…
lehuygiang28 Apr 19, 2024
6f3fc03
refactor(orders): :zap: error handling third party `ghn`
lehuygiang28 Apr 19, 2024
64d461c
docs(products): :memo: update images swagger
lehuygiang28 Apr 19, 2024
4ad79b0
Merge pull request #18 from TechCell-Project/feat_order
lehuygiang28 Apr 19, 2024
b585daf
docs(products): :memo: update images swagger
lehuygiang28 Apr 19, 2024
3158c3a
fix: :fire: remove unused
lehuygiang28 Apr 19, 2024
35113bf
ci: :bug: fix generate sdk
lehuygiang28 Apr 19, 2024
e455a9b
docs(products): :memo: update id swagger
lehuygiang28 Apr 19, 2024
718cb91
docs(swagger): :memo: update `ImageSchema` for product
lehuygiang28 Apr 20, 2024
b306efd
feat(third-party): :sparkles: add `vnpay.vn` lib for payment with vnpay
lehuygiang28 Apr 20, 2024
c4720d9
feat(orders): :zap: auto calculate totalPrice of order
lehuygiang28 Apr 20, 2024
ec72335
refactor(third-party): :bug: use type of vnpay instead
lehuygiang28 Apr 21, 2024
539f7ed
feat(third-party): :sparkles: add create/cancel order for `ghn`
lehuygiang28 Apr 21, 2024
c5169fd
fix(abstract): :zap: update session/transaction
lehuygiang28 Apr 21, 2024
736e6d8
fix(redis): :zap: remove broken log
lehuygiang28 Apr 21, 2024
9b1ec1b
feat(orders): :sparkles: add create order api
lehuygiang28 Apr 21, 2024
a3a4976
feat: :fire: remove duplicate import
lehuygiang28 Apr 21, 2024
9fe1a91
ci: :rocket: enable request changes workflow
lehuygiang28 Apr 21, 2024
50d4e6c
Merge pull request #19 from TechCell-Project/feat_order
lehuygiang28 Apr 21, 2024
2f6e1ef
fix(orders): :bug: fix issue wrong amount of vnpay req
lehuygiang28 Apr 21, 2024
13275c6
feat(orders): :sparkles: add apis get user's orders
lehuygiang28 Apr 21, 2024
7313e78
Merge pull request #20 from TechCell-Project/feat_orders
lehuygiang28 Apr 21, 2024
8b8ef57
fix(orders): :bug: fix param id
lehuygiang28 Apr 21, 2024
3f921b3
chore(docs): :memo: add compodoc to create source code documentations
lehuygiang28 Apr 22, 2024
fe48110
ci(docs): :bug: fix unknown networks
lehuygiang28 Apr 22, 2024
75802e3
ci(docs): :bug: update config for compodoc
lehuygiang28 Apr 22, 2024
08033fc
feat(products): :zap: update product return array tag object instead
lehuygiang28 Apr 22, 2024
625dccb
feat(products): :zap: update filter products
lehuygiang28 Apr 22, 2024
36827b0
feat(products): :zap: assign tags object to product return
lehuygiang28 Apr 22, 2024
4903201
feat(products): :zap: assign tags object to product return
lehuygiang28 Apr 22, 2024
49a5674
feat(products): :zap: update pagination
lehuygiang28 Apr 22, 2024
6dfa60d
perf(lock): :zap: improve performance of distributed lock
lehuygiang28 Apr 23, 2024
e1790ca
fix(products): :bug: fix pagination issues
lehuygiang28 Apr 23, 2024
470067d
Merge branch 'development' into feat_orders
lehuygiang28 Apr 23, 2024
950f143
fix(products): :bug: fix search with tag
lehuygiang28 Apr 23, 2024
dad7e30
refactor: :fire: remove redundant type
lehuygiang28 Apr 23, 2024
f665716
refactor: :fire: remove redundant type
lehuygiang28 Apr 23, 2024
d8b9142
Merge branch 'development' of https://github.com/TechCell-Project/the…
lehuygiang28 Apr 23, 2024
863c5b0
fix: :bug: fix bug on maybe type
lehuygiang28 Apr 23, 2024
f1af2df
refactor: :recycle: change to not use nested string template
lehuygiang28 Apr 23, 2024
569a940
chore: :fire: remove comment
lehuygiang28 Apr 23, 2024
a9a7b55
refactor: :recycle: prefer optional chaining
lehuygiang28 Apr 23, 2024
b3ab817
refactor: :recycle: remove redundant assertion
lehuygiang28 Apr 23, 2024
442ad4b
fix(products): :bug: fix unsafe usage of optional chaining
lehuygiang28 Apr 23, 2024
a5a6c26
Merge branch 'development' into feat_orders
lehuygiang28 Apr 23, 2024
6ec7bae
refactor: :fire: remove unused
lehuygiang28 Apr 23, 2024
94cd2d7
feat(orders): :sparkles: get orders base on user role
lehuygiang28 Apr 23, 2024
a9b29a8
Merge pull request #22 from TechCell-Project/feat_orders
lehuygiang28 Apr 23, 2024
4b334a2
refactor(orders): :art: move orders-mnt to other module
lehuygiang28 Apr 23, 2024
c413fa9
test(orders-mnt): :white_check_mark: add test
lehuygiang28 Apr 23, 2024
f49de26
feat(orders-mnt): :sparkles: update get all order for accountant
lehuygiang28 Apr 23, 2024
80716c9
feat(orders-mnt): :sparkles: add get order with order id
lehuygiang28 Apr 23, 2024
54b4454
feat(skus): :sparkles: add get serial numbers
lehuygiang28 Apr 23, 2024
771a4a8
Merge pull request #23 from TechCell-Project/feat_orders
lehuygiang28 Apr 24, 2024
789556d
fix(skus): :bug: fix docs
lehuygiang28 Apr 24, 2024
b6804a3
feat(products): :sparkles: update brand to product return
lehuygiang28 Apr 24, 2024
996716e
feat(orders-mnt): :sparkles: update orders mnt status flow
lehuygiang28 Apr 24, 2024
0c44676
feat(orders): :memo: update order
lehuygiang28 Apr 24, 2024
dcc9881
feat(products): :sparkles: update brand to product return
lehuygiang28 Apr 24, 2024
e0bdd24
fix(orders-mnt): :bug: fix sold serial number issue
lehuygiang28 Apr 24, 2024
18818e8
Merge pull request #24 from TechCell-Project/feat_orders
lehuygiang28 Apr 24, 2024
327fc05
feat(orders): :sparkles: add trackingLink to order shipping
lehuygiang28 Apr 24, 2024
f2131b9
refactor(schemas): :memo: move online host to first
lehuygiang28 Apr 24, 2024
7a45eeb
fix(auth): :bug: fix auth google
lehuygiang28 Apr 24, 2024
fe1f98e
feat(task): :sparkles: cronjob to remove unused image
lehuygiang28 Apr 24, 2024
2d277b5
feat(products): :zap: update product list return
lehuygiang28 Apr 24, 2024
349df6c
fix(products): :bug: fix assigning product data
lehuygiang28 Apr 24, 2024
578736a
perf: :zap: update global rate limit
lehuygiang28 Apr 24, 2024
f07f492
docs(orders-mnt): :memo: update swagger docs
lehuygiang28 Apr 25, 2024
ae9efb9
fix(products): :bug: fix issue get productId
lehuygiang28 Apr 25, 2024
5af0768
fix(auth): :zap: auto verify email when login/signup with socials
lehuygiang28 Apr 25, 2024
3243bed
docs(me): :memo: update swagger docs
lehuygiang28 Apr 25, 2024
2148e31
fix(users): :recycle: user address type now is string only
lehuygiang28 Apr 25, 2024
5b289f2
fix(images): :bug: fix images res type
lehuygiang28 Apr 25, 2024
b3e64bc
feat: :bug: fix build failed
lehuygiang28 Apr 25, 2024
27e287c
docs(swagger): :memo: update docs
lehuygiang28 Apr 25, 2024
a67b8fd
refactor(products): :bug: avoid duplicate product with same id
lehuygiang28 Apr 25, 2024
d15eeb1
refactor(users): :recycle: update user to store with address name
lehuygiang28 Apr 25, 2024
d00faea
fix(spus): :bug: fix validate duplicate model on update
lehuygiang28 Apr 25, 2024
1565483
fix(spus): :bug: fix validate duplicate model on update
lehuygiang28 Apr 25, 2024
dee7d2c
fix(orders): :bug: fix error when transfrom create order data
lehuygiang28 Apr 25, 2024
9023e0d
docs(orders): :memo: update docs `paymentReturnUrl` is required
lehuygiang28 Apr 25, 2024
e75d9e4
fix(skus): :bug: fix sku tags return as buffer
lehuygiang28 Apr 25, 2024
626a940
fix(skus): :bug: fix found an exists serial number
lehuygiang28 Apr 25, 2024
9832f25
fix(orders-mnt): :bug: cancel order when order status change to failed
lehuygiang28 Apr 26, 2024
a7825a5
feat(orders): :sparkles: user can cancel their order
lehuygiang28 Apr 26, 2024
9b30310
feat(attributes): :zap: unit can update
lehuygiang28 Apr 26, 2024
849e813
feat(auth): :sparkles: update authorized roles
lehuygiang28 Apr 26, 2024
37823ba
docs(orders-mnt): :memo: update docs
lehuygiang28 Apr 26, 2024
e4b85e6
docs(orders-mnt): :memo: update docs
lehuygiang28 Apr 26, 2024
6dd65a0
fix(auth): :bug: fix auth issue
lehuygiang28 Apr 26, 2024
07fa809
fix(auth): :bug: fix auth issue
lehuygiang28 Apr 26, 2024
e14af99
fix(auth): :bug: fix return url issue
lehuygiang28 Apr 26, 2024
ef23416
feat: :zap: disable cache open
lehuygiang28 Apr 26, 2024
dd09c85
chore: :loud_sound: add logs giaohangnhanh
lehuygiang28 Apr 26, 2024
072b7fe
docs(swagger): hide controller
lehuygiang28 Apr 26, 2024
1639633
docs(swagger): hide controller
lehuygiang28 Apr 26, 2024
28a7b6d
feat(auth): :zap: update error code enum for http exceptions
lehuygiang28 Apr 29, 2024
2a25ac3
feat(auth): :zap: update error code enum for http exceptions
lehuygiang28 Apr 30, 2024
5ca7d2f
docs(skus): :memo: update swagger docs
lehuygiang28 May 2, 2024
e176b9c
fix(skus): :bug: fix issue find many serial number found wrong skuId
lehuygiang28 May 2, 2024
a5237d3
build: :zap: add provenance for npm package
lehuygiang28 May 2, 2024
b2467ae
build: :zap: add provenance for npm package
lehuygiang28 May 2, 2024
6ad3476
feat(mail): :zap: update mail template
lehuygiang28 May 4, 2024
a478056
[ImgBot] Optimize images (#26)
imgbot[bot] May 5, 2024
86f45f0
chore: update authentication middleware to handle API statistics auth…
lehuygiang28 May 7, 2024
a8aaa5d
chore: update .vscode settings.json
lehuygiang28 May 7, 2024
0562a47
feat: remove `accountant` & `data_entry` role
lehuygiang28 May 7, 2024
a8b06a7
chore: :memo: update docs
lehuygiang28 May 10, 2024
c6f9be4
fix(products): :bug: fix search products issue
lehuygiang28 May 14, 2024
c2da867
chore: Update cache expiration times for brands, products, skus, and …
lehuygiang28 May 14, 2024
68d3177
chore: remove redundant, unused code
lehuygiang28 May 14, 2024
a4860bf
fix: destructuring assignment customerId unnecessarily renamed
lehuygiang28 May 14, 2024
9901ba8
chore: update .prettierrc formatting settings
lehuygiang28 May 17, 2024
96789fd
feat(ghn): update GHN service to handle invalid phone numbers
lehuygiang28 May 17, 2024
2ac6c02
feat: add actionAt field to order logs
lehuygiang28 May 17, 2024
fda1413
feat: Add `actionAt` field to order logs
lehuygiang28 May 17, 2024
196c90d
feat: add OrderActionEnum for order actions
lehuygiang28 May 17, 2024
a23a9cf
refactor: update carts service to use upsertCart method
lehuygiang28 May 17, 2024
f101713
fix(order): update to expose timestamp to api docs
lehuygiang28 May 24, 2024
8896e34
chore: add indexes to SKU, Brand, and SPU schemas
lehuygiang28 May 27, 2024
ecc5255
feat: update vnpay npm dependency to version 1.5.0
lehuygiang28 May 27, 2024
aa25203
fix: :rocket: update env of docker compose
lehuygiang28 May 27, 2024
4d943fe
chore: trigger deploy [skip sdk]
lehuygiang28 May 27, 2024
f8bcc14
feat: add `docker-compose.dev.yaml` for development environment
lehuygiang28 May 28, 2024
e302bf5
feat: :zap: add options to disable logger, shorten request log
lehuygiang28 May 29, 2024
a83aa02
feat: add Firebase module and service
lehuygiang28 May 30, 2024
0d3d012
feat: :rocket: mount config file to container
lehuygiang28 Jun 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: true
reviews:
request_changes_workflow: true
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
ignore_title_keywords:
- "[skip review]"
- "Automatic PR"
drafts: false
base_branches:
- "development"
path_instructions:
- path: "**/*.ts"
instructions: "Review the TypeScript code to ensure it adheres to the NestJS coding standards and best practices. This includes proper use of modules, services, controllers, and decorators. Also, ensure the code follows the Express.js style guide. Pay attention to the use of middleware, routing, error handling, and data validation. The code should also conform to the ESLint rules configured in the codebase. Highlight any deviations and suggest appropriate corrections. Using repository patterns is encouraged."
chat:
auto_reply: true
62 changes: 62 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Ignore version control directories
.git/
.github/

# Ignore configuration files
.husky/

# Ignore IDE directories
.vscode/
.vs/

# Ignore build directories
node_modules/
dist/

# Ignore log directories
logs/

# Ignore environment files
.env
.env\*

# Ignore sample configuration files
\*.conf.sample

# Ignore documentation directories
compodoc/

# Ignore upload directories

uploads/

# Ignore SSL directories
ssl/

# Ignore generated directories
generated/

# Ignore build files
dist/

# Ignore API documentation files
swagger.yaml

# Ignore package manager files
.yarn/\*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# Ignore package manager cache files
.pnp.cjs
.pnp.loader.mjs

containers/
ssl/
uploads/

swagger.yaml

firebase.json
Empty file added .env.example
Empty file.
16 changes: 16 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Ignore node modules
node_modules/

# Ignore ESLint configuration files
.eslintrc.js

# Ignore build directories
dist/

# Ignore generated TypeScript files
*.generated.ts

.yarn/*

.pnp.cjs
.pnp.loader.mjs
45 changes: 22 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
root: true,
env: {
node: true,
jest: true,
},
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'prettier/prettier': ['warn'],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn'],
},
};
40 changes: 40 additions & 0 deletions .github/workflows/auto-merge-dev-into-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Auto Merge Development Branch

on:
schedule:
- cron: '0 0 * * 1'
workflow_dispatch:

jobs:
create_pull_request:
permissions:
pull-requests: write
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create pull request
run: |
title="Automatic PR: Merging development into stable ($(git rev-parse --short=7 remotes/origin/development))"

body="
# Description:

This pull request was automatically created by GitHub Actions, and it is automatically done at the start of every Monday or manually ran. It merges all of the changes that were made to the \`development\` branch into the \`stable\` branch.

The reason why the [\`development\`](https://github.com/TechCell-Project/the-next-server/tree/development) branch exists is to make sure that all of the code in [\`stable\`](https://github.com/TechCell-Project/the-next-server/tree/stable) has been properly reviewed and approved. **Some contributors** have to approve this pull request for it to be merged.

**Last commit to [\`development\`](https://github.com/TechCell-Project/the-next-server/tree/development):** https://github.com/TechCell-Project/the-next-server/commit/$(git rev-parse remotes/origin/development)
"

gitLog=$(git log remotes/origin/stable..remotes/origin/development)

if [ -n "$gitLog" ]; then
gh pr create -B "stable" -H "development" --title "$title" -l "auto-pr" --body "$body"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57 changes: 57 additions & 0 deletions .github/workflows/build-test-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and test on pull request

on:
pull_request:
branches: ['*']

jobs:
select-runner:
runs-on: ubuntu-latest
outputs:
runner-label: ${{ steps.set-runner.outputs.runner-label }}

steps:
- name: Set runner
id: set-runner
run: |
# This script checks if the pull request has the label "run-self-hosted" and if so, and a self-hosted runner is available, runs the job on the self-hosted runner.
runner_label="ubuntu-latest"
trap 'echo "runner-label=$runner_label" >> $GITHUB_OUTPUT' ERR

if [ "${{ github.event_name }}" = "pull_request" ]; then
labels=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.REPO_ACCESS_TOKEN }}" "${{ github.event.pull_request.url }}/labels")
if echo "$labels" | jq -e '.[] | select(.name == "run-self-hosted")' > /dev/null; then
runners=$(curl -s -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.REPO_ACCESS_TOKEN }}" "https://api.github.com/repos/${{ github.repository }}/actions/runners")
available=$(echo "$runners" | jq '.runners[] | select(.status == "online" and .busy == false and .labels[] .name == "self-hosted")')
if [ -n "$available" ]; then
runner_label="self-hosted"
fi
fi
fi

echo "runner-label=$runner_label" >> $GITHUB_OUTPUT

automation-tests:
needs: select-runner
runs-on: ${{ needs.select-runner.outputs.runner-label }}

steps:
- name: Log runner label
run: echo "Running on runner ${{ needs.select-runner.outputs.runner-label }}"

- name: Checkout code
uses: actions/checkout@v4

- name: Use Node.js 18
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: yarn install

- name: Build services
run: yarn run build:all

- name: Run tests
run: yarn test --passWithNoTests
50 changes: 50 additions & 0 deletions .github/workflows/close-pr-into-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Pull Request Filter

on: pull_request_target

jobs:
filter:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Close pull requests that directly commit to stable
run: |
comment="
You can not directly commit to the [\`stable\`](https://github.com/TechCell-Project/tech-cell-web-server/tree/stable) branch, read the [contribution guide](https://github.com/TechCell-Project/.git-docs#-l%C6%B0u-%C3%BD) and only commit to [\`development\`](https://github.com/TechCell-Project/tech-cell-web-server/tree/development).
"

exclude_labels="
bypass
auto-pr
"

no_run=false

for pr_number in $(gh pr list --json number --jq '.[].number'); do
echo "Processing pull request: #$pr_number"

for label in $(gh pr view $pr_number --json labels --jq '.labels[].name'); do
if [[ "$exclude_labels" == *"$label"* ]]; then
no_run=true
break
fi
done

if [ "$no_run" == "true" ]; then
echo "Pull request #$pr_number merges into stable, but it is being bypassed due to its labels."
else
if [ $(gh pr view $pr_number --json baseRefName --jq '.baseRefName') == 'stable' ]; then
echo "Closing pull request #$pr_number as it directly commits to stable..."
gh pr label $pr_number --add auto-close actions
gh pr close $pr_number --comment "$comment"
fi
fi
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading