[Railway] Railway CLI
Ref: https://docs.railway.com/guides/cli # installation brew install railway # login to your account via browser railway login # Link to our project to execute command railway link How to run migration / ssh Copy below command and pasted to current shell, then you will able to execute command. This post is imported from: https://thebrownbox.hashnode.dev/railway-railway-cli
[NestJS][TypeOrm] Some first note
Desc: Some note when using TypeOrm in NestJS app Active Records vs Data Mapper Patterns In this seriese we gonna use Data Mapper. (It more familiar with other tools, like mongo/mongoose, when it follow the Repository patterns) This post is imported from: https://thebrownbox.hashnode.dev/nestjstypeorm-some-first-note
[Stripe-Connect] Create a platform account
Story: Tạo ra một platform mà customer (seller) có thể tạo link thanh toán cho buyer Tạo một account để test Note these information This post is imported from: https://thebrownbox.hashnode.dev/stripe-connect-create-a-platform-account
[Stripe Connect] Onboarding
Story: Tạo platform cho seller với Stripe connect. Ref: https://docs.stripe.com/connect/accounts Tạo connect account 1.1 Cài đặt Controller a. stripe_dashboard Ref: https://docs.stripe.com/connect/migrate-to-controller-properties - https://docs.stripe.com/api/accounts/create#create_account-controller-stripe_dashboard Lựa chọn dashboard mà user có thể truy cập. - Nếu muốn chọn stripe_dashboard là express thì người thu thập requirement_collection phải là stripe. - Còn nếu requirement_collection là application thì không có quyền truy cập vào stripe dashboard và phải set stripe_dashboard về none => Như vậy là hơi bất cập ở một chỗ là mình muốn người cung cấp thông tin là application và vẫn muốn seller có thể truy cập vào stripe express dashboard....
test slide
This is how a google slide looks like This post is imported from: https://thebrownbox.hashnode.dev/test-slide
[NestJS] DTO validation
The problem Ví dụ chúng ta có một DTO dưới đây, nếu mà chúng ta ko manual kiểm tra hoặc convert kiểu của các fields này thì payload hoàn toàn có thể có bất kỳ dạng data nào: export class CreateUserDto { username: string; email: string; password: string; isAdmin: boolean; age: number; } The solution DTO validation là việc chúng ta kiểm soát kiểu của dữ liệu đầu vào của API để đảm bảo rằng chúng đúng với format mà chúng ta quy định ở các parameter khác trong handler của chúng ta....
I use tmux to start multiple cmd at once
If you like me, you have to open multiple terminals to start number of services (in my case 5,6 services) You gonna need to go to each folder and run some command. So I look for some solution to make this easy and faster, I found tmux tmux new-session \; \ send-keys 'cd ~/Work/Sources/customer-root && npm run start' C-m \; \ split-window -h \; \ send-keys 'cd ~/Work/Sources/customer-common && npm run serve' C-m \; \ split-window -v \; \ send-keys 'cd ~/Work/Sources/customer-dashboard && npm run start' C-m \; \ split-window -h \; \ send-keys 'cd ~/Work/Sources/customer-main && npm run start' C-m \; \ split-window -v \; \ send-keys 'cd ~/Work/Sources/customer-auth && npm run start' C-m \; \ select-layout tiled \; \ send-keys 'cd ~/Work/Sources/customer-root && npm run start' C-m \; \ add this to and ....
[POC] Tích hợp cổng thanh toán VietQR | payos
Link sourcecode và documents ở phần dưới cùng. B0: Thiết kế Tôi tạm thiết kế flow thanh toán như sau. Trong bài này chúng ta sẽ tích hợp với gateway, phần được khoanh đỏ. B1: Đăng ký tài khoản và xác thực KYC với payos Đăng ký tài khoản và xác thực danh tính. Một bước khá quen thuộc với các dịch vụ fintech. Chú ý mua thêm gói nếu ko có sẵn gói miễn phí!...
[POC] Generate Invoice PDF
I have a project need to generate invoices, so I have to looking for a tool. Looking for a PDF tool My results: Name Good Bad puppeteer Can generate from html/css (so easy to change template, and you can have a beautiful one) - big and havy, the package is large and take a lot of ram (due to it using Chrome). Generate much slower then others. pdfmake Superfast and Lightweight use physical fonts, hard to edit template (it using its own json format for the template) Due to I want to generate the PDF in backend side so the time and the ram of the pupeteer is unacceptable....
How I choose base color for my app
There are some color works nice together. Some websites help us to find those: https://colorhunt.co This post is imported from: https://thebrownbox.hashnode.dev/how-i-choose-base-color-for-my-app