{"id":29099732,"url":"https://github.com/vic428-human/antd5-dashboard-practice","last_synced_at":"2025-07-21T13:33:06.735Z","repository":{"id":300770295,"uuid":"1007096529","full_name":"Vic428-human/antd5-dashboard-practice","owner":"Vic428-human","description":"antd5","archived":false,"fork":false,"pushed_at":"2025-07-15T17:25:21.000Z","size":336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-15T19:29:16.652Z","etag":null,"topics":["antd","brevo","cookie-parser","jwt","mongodb","nodejs","nodemailer","reactjs","smtp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vic428-human.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-23T13:07:12.000Z","updated_at":"2025-07-15T17:25:25.000Z","dependencies_parsed_at":"2025-07-15T10:31:05.880Z","dependency_job_id":"fcc91dec-9da2-4161-9647-a0583f9aacea","html_url":"https://github.com/Vic428-human/antd5-dashboard-practice","commit_stats":null,"previous_names":["vic428-human/antd5-dashboard-practice"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Vic428-human/antd5-dashboard-practice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vic428-human%2Fantd5-dashboard-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vic428-human%2Fantd5-dashboard-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vic428-human%2Fantd5-dashboard-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vic428-human%2Fantd5-dashboard-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vic428-human","download_url":"https://codeload.github.com/Vic428-human/antd5-dashboard-practice/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vic428-human%2Fantd5-dashboard-practice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266312000,"owners_count":23909742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antd","brevo","cookie-parser","jwt","mongodb","nodejs","nodemailer","reactjs","smtp"],"created_at":"2025-06-28T17:11:48.636Z","updated_at":"2025-07-21T13:33:06.728Z","avatar_url":"https://github.com/Vic428-human.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 前言\n\n\u003e 後台 基於 React + TypeScript + Vite + antd v5 + tailwindcss v4 + nodejs + mongodb + TanStack Query + redux toolkit\n\u003e 該項目已於 2025/0623 開始製作，預計會使用 redux toolkit 但尚未引入\n\n### 7/16 ~ 7/18 目標\n\n1.\n\n### 目前專案進度\n\n#### 後端功能:\n\n- [實現用戶註冊與登入驗證流程，並透過 JWT 與 OTP 郵件驗證保障安全性](https://github.com/Vic428-human/antd5-dashboard-practice/tree/main/backend/routes)\n- [x] 登入\n- [x] 登出\n- [x] 註冊\n- [x] nodemailer 發送郵件\n- [x] 用 OTP 驗證信箱身份\n- [x] 重新發送 OTP 驗證碼\n- [x] JWT 機制引用\n- [x] 中間件獲取 cookies 配合 cookie-parser 使用\n- [x] 重置密碼\n- [x] 獲取使用者資訊(基於 cookies 有存過 jwt 為前提，默認先前已經登入過，除非駭客知道你本地端 cookies 的資訊，不然無法得知使用者個人資料)\n\n---\n\n- [其他](https://github.com/Vic428-human/antd5-dashboard-practice/blob/main/src/routes/MainContent.tsx)\n\n#### 前端功能：\n\n- [x] 二級菜單\n- [x] 路由切換\n\n```\nnpm i\nnvm use 18\nnpm run dev\n\n```\n\n## CODEBASE\n\n#### 其他功能\n\n- [後端相關的路由](https://github.com/Vic428-human/antd5-dashboard-practice/blob/main/src/routes/MainContent.tsx)\n- [useHook 基礎的 tanstack-query 基本用法](https://github.com/Vic428-human/redux-toolkit-and-tanstack-query-demo/blob/main/src/hooks/useApplimittation.ts)\n- [QueryClient 獨立出來](https://github.com/Vic428-human/redux-toolkit-and-tanstack-query-demo/blob/main/src/hooks/useApplimittation.ts)\n\n####\n\n#### 全局預設的主要配色\n\n- [ConfigProvider](https://ant.design/docs/react/customize-theme#seed-token)\n\n```\n\u003cConfigProvider\n    theme={{\n        token: {\n            colorPrimary: \"#fcba03\",\n        },\n    }}\n\u003e\n```\n\n#### 該專案建置方式\n\n```js\nnpm create vite@latest my-app -- --template react-ts\n\n```\n\n### 備份\n\n### 菜單本體\n\n\u003e 這版不需要用到 先隱藏\n\n```\n      {/* \u003cSider\n        trigger={null}\n        collapsible\n        collapsed={collapsed}\n        breakpoint=\"lg\"\n        collapsedWidth=\"0\"\n        onBreakpoint={(broken) =\u003e {\n          console.log(broken);\n        }}\n        onCollapse={(collapsed, type) =\u003e {\n          console.log(collapsed, type);\n        }}\n      \u003e\n        \u003cdiv className=\"demo-logo-vertical\"\u003e\n          \u003cimg src={assets.logo} alt=\"\" className=\"w-28 sm:w-32\" /\u003e\n          \u003ch1 className=\"text-red-500\"\u003e後台管理系統\u003c/h1\u003e\n        \u003c/div\u003e\n        \u003cSidebarMenu onMenuClick={({ key }) =\u003e navigate(key as string)} /\u003e\n      \u003c/Sider\u003e */}\n```\n\n### 漢堡 ICON\n\n\u003e 菜單在這板不存在，但未來或許會用到\n\n```\n   \u003cdiv\u003e\n            {/* \u003cButton\n              type=\"primary\"\n              icon={collapsed ? \u003cMenuUnfoldOutlined /\u003e : \u003cMenuFoldOutlined /\u003e}\n              onClick={() =\u003e setCollapsed((prev) =\u003e !prev)}\n              style={{ marginLeft: \"-50px\" }} // className=\"-ml-[50px]\" 沒效，可能  Ant Design 的 Button 元件預設會覆蓋掉部分外部樣式\n            /\u003e */}\n          \u003c/div\u003e\n\n```\n\n### 原先 Swithc btn 切版\n\n\u003e 但 7/16 跟 UIUX 討論後，改用 antd 的 switch btn\n\n```\nimport React from \"react\";\nimport { assets } from \"../assets/assets.ts\";\n\nconst LuckyExchangeButton = ({ isActive = false, children = \"\" }) =\u003e {\n  const activeStyles = {\n    wrapper: \"bg-green-500 text-[#3A3B3E]\",\n    text: \"text-[#3A3B3E]\",\n    icon: assets.on,\n  };\n\n  const inactiveStyles = {\n    wrapper: \"bg-[#F9FAFC] text-[#CCCDD1]\",\n    text: \"text-[#3A3B3E]\",\n    icon: assets.off,\n  };\n\n  const currentStyle = isActive ? activeStyles : inactiveStyles;\n\n  return (\n    \u003cdiv className=\"flex items-center mb-2\"\u003e\n      \u003cdiv\n        className={`flex items-center w-full h-8 rounded-full shadow ${currentStyle.wrapper}`}\n      \u003e\n        \u003cspan className=\"w-7 h-7 rounded-full border-2 border-gray-300 bg-white cursor-pointer flex items-center justify-center font-bold text-xs\"\u003e\n          \u003cimg src={currentStyle.icon} alt=\"\" className=\"w-28 sm:w-28\" /\u003e\n        \u003c/span\u003e\n\n        \u003cspan\n          className={`${currentStyle.text} flex items-center justify-center w-full text-base font-['Roboto']`}\n        \u003e\n          {children}\n        \u003c/span\u003e\n      \u003c/div\u003e\n    \u003c/div\u003e\n  );\n};\n\nexport default LuckyExchangeButton;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic428-human%2Fantd5-dashboard-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvic428-human%2Fantd5-dashboard-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvic428-human%2Fantd5-dashboard-practice/lists"}