Table of Contents
TIDTU là ứng dụng web giúp sinh viên Đại học Duy Tân lịch thi. Dự án được xây dựng theo kiến trúc monorepo với Turborepo, gồm frontend Vue 3 và các Cloudflare Workers phục vụ backend.
tidtu/
├── apps/
│ ├── website/ # Frontend — Vue 3 + Vite + TailwindCSS
│ ├── worker-cache/ # Cache service — Express + Cheerio + Cloudflare KV
│ ├── worker-gateway/ # API Gateway — Hono trên Cloudflare Workers
│ └── worker-pdaotao/ # Scraper Worker — Cloudflare Workers
└── packages/ # Shared packages (reserved)
-
Node.js >= 18
-
pnpm >= 9 (recommended)
npm install -g pnpm
-
Wrangler CLI (để phát triển Cloudflare Workers)
pnpm add -g wrangler
-
Clone the repo
git clone https://github.com/tidtulabs/tidtu.git cd tidtu -
Install all dependencies (từ root của monorepo)
pnpm install
-
Change git remote url to avoid accidental pushes to base project
git remote set-url origin github_username/repo_name git remote -v # confirm the changes
Mỗi app có file .env.example / .dev.vars.example riêng. Cần copy và điền giá trị thật trước khi chạy.
cp apps/website/.env.example apps/website/.env| Variable | Default | Description |
|---|---|---|
VITE_GATEWAY_SERVICE |
http://localhost:3001 |
URL tới worker-gateway (local) |
VITE_CACHE_SERVICE |
http://localhost:3000 |
URL tới worker-cache (local) |
cp apps/worker-gateway/.dev.vars.example apps/worker-gateway/.dev.vars| Variable | Description |
|---|---|
TURNSTILE_SECRET_KEY |
Cloudflare Turnstile secret key |
DISCORD_WEBHOOK_URL |
Discord webhook URL (để nhận notification) |
Note
Với môi trường production, secrets được set qua wrangler secret put <NAME> thay vì file .dev.vars.
Lệnh này khởi động đồng thời tất cả apps (website + workers):
pnpm dev[!TIP] >
pnpm devtự động kill các port đang dùng (5173,3000,3001) trước khi khởi động lại.
| App | Command | Port |
|---|---|---|
website |
pnpm --filter website dev |
5173 |
worker-cache |
pnpm --filter worker-cache dev |
3000 |
worker-gateway |
pnpm --filter worker-gateway dev |
3001 |
pnpm dev:remotepnpm buildpnpm lint
pnpm format- Tra cứu lịch thi
- API Gateway với Cloudflare Workers
- Bộ nhớ đệm với Cloudflare KV
- Sao lưu tệp
- Phân tích tệp
- Thông báo khi có lịch thi
- Hỗ trợ đa ngôn ngữ
- Tiếng Anh
Xem open issues để biết thêm các tính năng đang đề xuất và lỗi đã biết.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feat/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt for more information.