-
首頁,可以容納所有播放清單的頁面,包含以下元素:
- 標題: WP Music 顯示於頁面上方的位置,My Playlists 顯示於其下。
- 播放清單:
- 「ADD」按鈕:
-
點擊後跳出彈窗,供使用者輸入清單名稱及清單敘述。完成輸入後,可馬上在首頁看到新的播放清單,並同時將清單資料新增至資料庫。
-
「DELETE」按鈕:
-
搜尋
-
播放清單頁, 包含以下功能:
-
播放清單資訊:可瀏覽播放清單之圖片、標題、敘述,且標題、敘述皆可編輯(按 enter 後才會儲存)。
-
歌曲資訊:
-
「ADD」按鈕:
-
「DELETE」按鈕:
-
連結: 可供使用者點擊,並以新分頁開啟該連結
-
- 使用者提示:當使用者未輸入資訊或是進行錯誤操作時,給予適當提示。例如使用者新增或編輯清單時,未輸入標題,以彈窗提示「請輸入標題」。
- 重複名稱檢測:新增播放清單、歌曲時,需檢查資料庫,確定名稱不可重複。
- 搜尋:在首頁實作搜尋功能,透過輸入關鍵字尋找相對應之清單。
- 自編播放清單圖片:播放清單圖片可自定義,並存到資料庫,且可從資料庫讀取正確圖片。
Follow the instructions in this section to run the app locally.
Start by copying the .env.example file to .env.
cd backend
cp .env.example .envThen, fill in the MONGO_URL field in .env with your MongoDB connection string and fill in the PORT field with the port you want to use. After that, you're .env file should look like this. If you don't want to use MongoDB Atlas, you can also run a local MongoDB server with Docker. You can find the instructions here.
PORT=8000
MONGO_URL="mongodb+srv://<username>:<password>@<cluster>.example.mongodb.net/?retryWrites=true&w=majority"若 port 有更改為非 8000 的數字則前端 .env 中的 port number 也須隨之更改。
Install dependencies
yarnStart by copying the .env.example file to .env.
cd frontend
cp .env.example .envThen, fill in the VITE_API_URL field in .env with the url of your backend server. After that, you're .env file should look like this. Note that the port should be the same as the one you set in the backend .env file.
VITE_API_URL="http://localhost:8000/api"Install dependencies
yarn cd backend
yarn devcd frontend
yarn devVisit http://localhost:5173 to see the app in action.















