Diễn đàn học sinh Chuyên Biên Hòa thuộc Trường THPT Chuyên Hà Nam
Translation pending
SocialJavaScript · CSSGitHub @tunnaduongOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Loading the full README. The saved excerpt is shown below.
Giao diện web của cộng đồng CBH Youth Online được xây dựng bằng Next.js 14 (App Router). Ứng dụng cung cấp bảng tin, diễn đàn, chat riêng tư/công khai, stories, thư viện ghi âm, trung tâm trợ giúp và hệ thống thông báo đẩy dành cho học sinh tại THPT Chuyên Biên Hòa. Nội dung chính • Tính năng nổi bật • Kiến trúc & công nghệ • Cấu trúc thư mục • Yêu cầu hệ thống • Thiết lập môi trường • Scripts hữu ích • Luồng dữ liệu & API • Thông báo đẩy & realtime • Chất lượng mã & lint • Triển khai • Tài liệu tham khảoRead the full README ↗
Giao diện web của cộng đồng CBH Youth Online được xây dựng bằng Next.js 14 (App Router). Ứng dụng cung cấp bảng tin, diễn đàn, chat riêng tư/công khai, stories, khám phá (trò chơi, quiz, tài liệu học tập, tra cứu đại học), ví điểm, cửa hàng, trung tâm trợ giúp, trang quản trị /admin và hệ thống thông báo đẩy dành cho học sinh tại THPT Chuyên Biên Hòa.
Các repo liên quan: cbh-youth-online-api (backend Laravel), cbh-youth-online-mobile (ứng dụng Expo) và cbh-youth-online-gift-shop (cửa hàng quà tặng, dùng chung cookie đăng nhập auth_token trên .chuyenbienhoa.com).
src/app/feed, src/app/forum, src/components/forum).src/app/[username], src/contexts/TopUsersContext.js).src/components/stories).src/components/chat).src/components/notifications, src/app/saved).src/app/help, src/data/helpArticles.js).src/app/explore).src/app/wallet, src/app/shop)./admin (Ant Design) quản lý bài viết, bình luận, người dùng, báo cáo (cảnh cáo hoặc xóa nội dung kèm thông báo cho người đăng), báo cáo vi phạm học sinh & lớp, kiểm duyệt, nạp/rút, cửa hàng, xác minh học sinh, góp ý (src/app/admin).?app=true (ghi nhớ theo phiên, src/utils/appMode.js) ẩn màn chờ, banner tải app và các nút đăng xuất/về trang chủ trong admin; /auth/set-token?code= nhận mã đăng nhập một lần từ app để mở web đã đăng nhập sẵn.src/app/api/og, src/lib/og).src/components/settings, src/app/login).layout.js, not-found.js, và các route động như [username]/[tab].src/app/Api.js kết nối đến backend Laravel qua Axios tuỳ biến (src/services/api/ApiByAxios.js, src/services/api/AxiosCustom.js).src/utils/serverFetch.js cung cấp tiện ích fetch trên server, tránh viết thủ công.src/contexts quản lý xác thực, thông báo, chat, dữ liệu diễn đàn, top users…src/lib/echo.js).src/utils/momentConfig.js), Markdown editor (src/components/ui/MarkdownToolbar.js), service worker push.src/
├── app/ # Route Next.js (App Router)
├── components/ # UI & widget dùng lại (chat, stories, modals…)
├── contexts/ # React Context + provider tương ứng
├── hooks/ # Custom hooks (loading, service worker…)
├── services/api/ # Tầng gọi API bằng Axios
├── lib/ # Echo realtime, deep link, profile theme…
├── utils/ # Helpers (assets, cookies, SEO, push notifications, app mode…)
├── layouts/ # Các layout chia sẻ
└── assets/ # File Lottie, JSON tĩnh
public/
├── sw.js # Service Worker push notification
└── icons, ảnh, fonts…
e2e/ # Kiểm thử Playwright
package-lock.json).https://api.chuyenbienhoa.com hoặc môi trường staging.npm install
cp .env.example .env.local
| Biến | Mô tả |
|---|---|
NEXT_PUBLIC_API_URL | Host backend Laravel, không kèm /v1.0 (ví dụ https://api.chuyenbienhoa.com). |
NEXT_PUBLIC_HIDE_LOADING | Ẩn/hiện layer loading toàn cục (false để debug). |
NEXT_PUBLIC_GOOGLE_* | Client ID/secret & redirect URI cho OAuth Google. |
NEXT_PUBLIC_FACEBOOK_* | Client ID/secret & redirect URI cho OAuth Facebook. |
NEXT_PUBLIC_REVERB_* | App key, host, port, scheme cho realtime (Reverb). |
npm run dev
npm run build
npm start
npm run lint
📌 Lưu ý: Nếu cần kiểm thử API từ server components, sử dụng
src/utils/serverFetch.jsthay vì fetch thủ công để giữ nguyên header và token.
npm run dev: Khởi chạy Next.js ở http://localhost:3000.npm run build: Build sản phẩm cho production.npm start: Chạy server production sau khi build.npm run lint: Chạy next lint với cấu hình trong .eslintrc.json.npm run test:e2e: Chạy kiểm thử Playwright trong e2e/.postinstall: Chạy patch-package (hiện chưa có thư mục patches/).src/app/Api.js, tương ứng với danh sách route /v1.0/.... Xác thực bằng Sanctum bearer token lưu trong cookie auth_token (dùng chung cho mọi subdomain .chuyenbienhoa.com).src/services/api/AxiosCustom.js cấu hình base URL, interceptor token và xử lý lỗi mặc định.src/app/forum, src/app/help), dữ liệu được tải server-side rồi truyền vào client component để tối ưu SEO.src/contexts để tránh lặp lại (ví dụ NotificationProvider, ChatProvider).public/sw.js được đăng ký trong src/app/ClientProviders.js.src/utils/pushNotifications.js chịu trách nhiệm xin quyền, đăng ký VAPID key và gửi subscription thông qua các hàm trong src/app/Api.js.WEB_PUSH_NOTIFICATIONS.md.npm run lint.src/components/ui) và hook tái sử dụng để giữ codebase gọn gàng.patches/ và khai báo rõ ràng.NEXT_PUBLIC_* trong dashboard môi trường.https://chuyenbienhoa.com) để khớp với API backend.main - nếu không có yêu cầu khác, tạo nhánh mới từ main mới nhất rồi mở pull request vào main.main được bảo vệ: mọi thay đổi phải qua pull request, cần review và vượt qua kiểm thử Playwright E2E cùng các bản deploy Vercel.npm run build && npm start sau khi reverse proxy qua Nginx/PM2.BACKGROUND_PUSH_ANALYSIS.md: Ghi chú phân tích push notification.WEB_PUSH_NOTIFICATIONS.md: Hướng dẫn chi tiết tích hợp Web Push.CHAT_NOTIFICATION_SUMMARY.md: Tổng quan xử lý thông báo trong chat.SEPAY_QR_CODE_DOCS.md, SEPAY_WEBHOOK_DOCS.md, SEPAY_LARAVEL_DOCS.md: Tích hợp thanh toán SePay.💬 Cần hỗ trợ thêm? Tạo issue hoặc ping team FE để được giải đáp nhanh chóng!
src/app/youth-news, src/app/jobs, src/app/ads, src/app/policy).