簡易的存提款交易系統,使用者除了存提款外,可於聊天室進行即時通訊。
.env.example
複製並命名為 .env
.env
請填入適當的 URL,例如在本機執行,請填入:
VUE_APP_API_BASE_URL=http://localhost:3001
VUE_APP_WEBSOCKET_BASE_URL=ws://localhost:3001
docker-compose -f docker-compose.yml up --build -d
建構完成後,可通過 http://localhost:3000 訪問。
以 Nginx 為例,請注意須將 /go-api/
的請求導到機器的 3001
port 上。
AppHome.vue
):所有用戶列表,可連接到每位用戶頁面,並顯示用戶最後一筆交易時間。SingleUserInfo.vue
):顯示用戶最近 10 筆交易記錄和當前餘額,可由此進入交易頁面。TransactionForm.vue
):允許用戶選擇進行存款或提款操作,交易完成後頁面會刷新。ChatRoom.vue
):使用者必須先選擇用戶才能進入聊天室,選中的用戶狀態會在離開聊天室時被清除。docker-compose.dev.yml
:可迅速建立本機開發所需要的資料庫build-go.sh
:Go server 本機開發時 build 的腳本。A simple deposit and withdrawal transaction system that allows users not only to deposit and withdraw but also to communicate in real-time via a chatroom.
.env.example
and rename it to .env
.env
, take local use for example:
VUE_APP_API_BASE_URL=http://localhost:3001
VUE_APP_WEBSOCKET_BASE_URL=ws://localhost:3001
docker-compose -f docker-compose.yml up --build -d
After construction, it can be accessed through http://localhost:3000
For instance, with Nginx, ensure that requests to /go-api/
are directed to the 3001
port on your machine.
AppHome.vue
): List of all users, with a link to each user's info page, displaying the last transaction time of the user.SingleUserInfo.vue
): Displays the user's recent 10 transaction records and current balance, from where you can enter the transaction operation page.TransactionForm.vue
): Allows users to perform deposit or withdrawal operations, and the page will refresh after the transaction is completed.ChatRoom.vue
): Users must select a user before entering the chatroom, and the selected user's status is cleared upon exiting the chatroom.docker-compose.dev.yml
: Quickly sets up the databases required for local development.build-go.sh
: A script for building the Go server during local development.