{"id":21956788,"url":"https://github.com/tiennhm/x2mint","last_synced_at":"2025-07-23T06:35:39.095Z","repository":{"id":179900994,"uuid":"421804701","full_name":"TienNHM/x2mint","owner":"TienNHM","description":"X2MINT - Website for create and take a test online 💯","archived":false,"fork":false,"pushed_at":"2025-05-07T18:24:35.000Z","size":89508,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-07T19:34:11.244Z","etag":null,"topics":["heroku","mernstack","multichoice","online","react-hooks","vercel"],"latest_commit_sha":null,"homepage":"https://x2mint.vercel.app","language":"JavaScript","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/TienNHM.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":"2021-10-27T12:15:46.000Z","updated_at":"2025-02-23T13:23:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"86f8de20-37a5-49d5-a850-ec4eec13e6ae","html_url":"https://github.com/TienNHM/x2mint","commit_stats":null,"previous_names":["tiennhm/x2mint"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/TienNHM/x2mint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TienNHM%2Fx2mint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TienNHM%2Fx2mint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TienNHM%2Fx2mint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TienNHM%2Fx2mint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TienNHM","download_url":"https://codeload.github.com/TienNHM/x2mint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TienNHM%2Fx2mint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266631582,"owners_count":23959420,"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-23T02:00:09.312Z","response_time":66,"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":["heroku","mernstack","multichoice","online","react-hooks","vercel"],"created_at":"2024-11-29T08:39:00.018Z","updated_at":"2025-07-23T06:35:39.075Z","avatar_url":"https://github.com/TienNHM.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# X2MINT\n\n![GitHub contributors](https://img.shields.io/github/contributors/x2mint/x2mint)\n![GitHub issues](https://img.shields.io/github/issues/x2mint/x2mint?color=red)\n![GitHub top language](https://img.shields.io/github/languages/top/x2mint/x2mint?color=cyan)\n![GitHub repo size](https://img.shields.io/github/repo-size/x2mint/x2mint)\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/x2mint/x2mint)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/m/x2mint/x2mint?color=g)\n![GitHub last commit](https://img.shields.io/github/last-commit/x2mint/x2mint?color=yellow)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/x2mint/x2mint)\n\n## Cấu trúc thư mục\n\n\u003cdetails\u003e\n  \u003csummary\u003eTổng quan\u003c/summary\u003e\n  \n  #### Cấu trúc tổng quan của project:\n  \n  ```\n  x2mint\n│   README.md\n├───.vscode\n│       settings.json\n└───clients\n    │   .eslintignore\n    │   .eslintrc.json\n    │   .gitignore\n    │   jsconfig.json\n    │   package.json\n    │   README.md\n    │   yarn.lock\n    ├───public\n    │   │   favicon.ico\n    │   │   index.html\n    │   │   manifest.json\n    │   │   robots.txt\n    │   └───assets\n    │       ├───avatars\n    │       ├───backgrounds\n    │       ├───icons\n    │       ├───images\n    │       └───samples\n    └───src\n        │   App.js\n        │   App.scss\n        │   index.css\n        │   index.js\n        │   reportWebVitals.js\n        ├───actions\n        │   └───api\n        ├───app\n        ├───components\n        │   ├───account\n        │   │   ├───handlePassword\n        │   │   ├───login\n        │   │   ├───profile\n        │   │   └───register\n        │   ├───admin\n        │   │   ├───AppContent\n        │   │   │   ├───Account\n        │   │   │   │   ├───AccountGrantPermissions\n        │   │   │   │   ├───AccountManagement\n        │   │   │   │   └───AccountStatistics\n        │   │   │   ├───Contest\n        │   │   │   │   ├───ContestArchive\n        │   │   │   │   ├───ContestParticipants\n        │   │   │   │   └───ContestStatistics\n        │   │   │   ├───Dashboard\n        │   │   │   └───Revenue\n        │   │   ├───AppNavbar\n        │   │   └───AppSidebar\n        │   ├───common\n        │   │   ├───appNavbar\n        │   │   ├───browseLibrary\n        │   │   ├───confirmModal\n        │   │   ├───myImage\n        │   │   └───share\n        │   ├───contest\n        │   │   ├───contestInfo\n        │   │   ├───modalCreateContest\n        │   │   └───statistics\n        │   ├───exam\n        │   │   ├───answer\n        │   │   ├───panelPreview\n        │   │   ├───panelQuestionPicker\n        │   │   ├───panelSettings\n        │   │   ├───question\n        │   │   └───submitResult\n        │   ├───payments\n        │   └───statistics\n        ├───pages\n        │   └───home\n        ├───reducers\n        ├───redux\n        └───utils\n  ```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eChi tiết\u003c/summary\u003e\n  \n  #### Project được xây dựng theo cấu trúc như sau:\n  \n  \n  ```\n  x2mint\n│   README.md\n├───.vscode\n│       settings.json\n└───clients\n    │   .eslintignore\n    │   .eslintrc.json\n    │   .gitignore\n    │   jsconfig.json\n    │   package.json\n    │   README.md\n    │   yarn.lock\n    ├───public\n    │   │   favicon.ico\n    │   │   index.html\n    │   │   manifest.json\n    │   │   robots.txt\n    │   └───assets\n    │       ├───avatars\n    │       ├───backgrounds\n    │       ├───icons\n    │       ├───images\n    │       └───samples\n    │               sample_test.xlsx\n    └───src\n        │   App.js\n        │   App.scss\n        │   index.css\n        │   index.js\n        │   logo.svg\n        │   reportWebVitals.js\n        │   _setting.scss\n        ├───actions\n        │   │   initialData.js\n        │   │   useAxios.js\n        │   └───api\n        │           AnswerAPI.js\n        │           AuthAPI.js\n        │           BillAPI.js\n        │           ContestAPI.js\n        │           QuestionAPI.js\n        │           StatisticsAPI.js\n        │           TakeTestAPI.js\n        │           TestAPI.js\n        │           UserAPI.js\n        │           VNPayAPI.js\n        ├───app\n        │       store.js\n        ├───components\n        │   │   ProtectedRoute.js\n        │   ├───account\n        │   │   ├───handlePassword\n        │   │   │       ChangePassword.js\n        │   │   │       ForgotPassword.js\n        │   │   │       ForgotPassword.scss\n        │   │   │       ResetPassword.js\n        │   │   │       ResetPassword.scss\n        │   │   ├───login\n        │   │   │       Login.js\n        │   │   │       Login.scss\n        │   │   ├───profile\n        │   │   │       ModalUpdateUserInfo.js\n        │   │   │       Profile.js\n        │   │   │       Profile.scss\n        │   │   │       UserTakeTest.js\n        │   │   └───register\n        │   │           ActivationEmail.js\n        │   │           Register.js\n        │   │           Register.scss\n        │   ├───admin\n        │   │   │   Admin.js\n        │   │   │   Admin.scss\n        │   │   ├───AppContent\n        │   │   │   │   AppContent.js\n        │   │   │   ├───Account\n        │   │   │   │   │   data.js\n        │   │   │   │   ├───AccountGrantPermissions\n        │   │   │   │   │       AccountGrantPermissions.js\n        │   │   │   │   │       AccountGrantPermissions.scss\n        │   │   │   │   ├───AccountManagement\n        │   │   │   │   │       AccountManagement.js\n        │   │   │   │   │       AccountManagement.scss\n        │   │   │   │   └───AccountStatistics\n        │   │   │   │           AccountStatistics.js\n        │   │   │   │           AccountStatistics.scss\n        │   │   │   ├───Contest\n        │   │   │   │   │   data.js\n        │   │   │   │   ├───ContestArchive\n        │   │   │   │   │       ContestArchived.js\n        │   │   │   │   │       ContestArchived.scss\n        │   │   │   │   ├───ContestParticipants\n        │   │   │   │   │       ContestParticipants.js\n        │   │   │   │   │       ContestParticipants.scss\n        │   │   │   │   └───ContestStatistics\n        │   │   │   │           ContestStatistics.js\n        │   │   │   ├───Dashboard\n        │   │   │   │       Dashboard.js\n        │   │   │   │       Dashboard.scss\n        │   │   │   └───Revenue\n        │   │   │           data.js\n        │   │   │           Revenue.js\n        │   │   ├───AppNavbar\n        │   │   │       AppNavbar.js\n        │   │   │       AppNavbar.scss\n        │   │   └───AppSidebar\n        │   │           AppSidebar.js\n        │   │           AppSidebar.scss\n        │   ├───common\n        │   │   ├───appNavbar\n        │   │   │       AppNavbar.js\n        │   │   │       AppNavbar.scss\n        │   │   ├───browseLibrary\n        │   │   │       BrowseLibrary.js\n        │   │   │       BrowseLibrary.scss\n        │   │   ├───confirmModal\n        │   │   │       ConfirmModal.js\n        │   │   │       ConfirmModal.scss\n        │   │   ├───myImage\n        │   │   │       MyImage.js\n        │   │   │       MyImage.scss\n        │   │   └───share\n        │   │           Share.js\n        │   │           Share.scss\n        │   ├───contest\n        │   │   │   Contest.js\n        │   │   │   Contest.scss\n        │   │   ├───contestInfo\n        │   │   │       ContestInfo.js\n        │   │   │       ContestInfo.scss\n        │   │   ├───modalCreateContest\n        │   │   │       ModalCreateContest.js\n        │   │   │       ModalCreateContest.scss\n        │   │   └───statistics\n        │   │           StatisticContest.js\n        │   │           StatisticTest.js\n        │   │           StatisticTest.scss\n        │   ├───exam\n        │   │   │   MultiChoices.js\n        │   │   │   MultiChoices.scss\n        │   │   ├───answer\n        │   │   │       Answer.js\n        │   │   │       Answer.scss\n        │   │   ├───panelPreview\n        │   │   │       PanelPreview.js\n        │   │   │       PanelPreview.scss\n        │   │   ├───panelQuestionPicker\n        │   │   │       PanelQuestionPicker.js\n        │   │   │       PanelQuestionPicker.scss\n        │   │   ├───panelSettings\n        │   │   │       ModalTestInfo.js\n        │   │   │       PanelSettings.js\n        │   │   │       PanelSettings.scss\n        │   │   ├───question\n        │   │   │       Question.js\n        │   │   │       Question.scss\n        │   │   └───submitResult\n        │   │           data.js\n        │   │           SubmitResult.js\n        │   │           SubmitResult.scss\n        │   ├───payments\n        │   │       PaymentReturn.js\n        │   │       PaymentReturn.scss\n        │   │       Payments.js\n        │   └───statistics\n        │           ContestStatistics.js\n        │           TakeTestStatistics.js\n        ├───pages\n        │   │   Page404.js\n        │   │   Page500.js\n        │   └───home\n        │           About.js\n        │           Contact.js\n        │           Footer.js\n        │           Homepage.js\n        │           Homepage.scss\n        │           MainBanner.js\n        ├───reducers\n        │       authReducer.js\n        ├───redux\n        │       authSlice.js\n        └───utils\n                colors.js\n                constants.js\n                dragDrop.js\n                EventListener.js\n                ExportToExcel.js\n                ImportTestData.js\n                setAuthToken.js\n                sorts.js\n                timeUtils.js\n                Validation.js\n  ```\n\u003c/details\u003e\n\n## Hướng dẫn cài đặt\n\n- Bước 1: Clone project\n```bash\ngit clone https://github.com/TienNHM/x2mint.git\n```\n\n- Bước 2: Install\n```bash\nnpm install\n```\n\nHoặc:\n```bash\nyarn install\n```\n\n- Bước 3: Thêm file `.env` chứa thông tin các biến môi trường\n\nChuyển đến thư mục `/clients`, tạo mới file `.env` chứa thông tin các biến môi trường:\n\n| Tên biến | Mô tả |\n| :---: | :--- |\n| CI | Bắt buộc là `False`, dùng để deploy trên vercel.com. |\n| REACT_APP_WEBSITE | Domain nơi deploy website, VD: `https://x2mint.vercel.app`. |\n| REACT_APP_API_ROOT | Root endpoint gọi API, VD: `http://api-x2mint.herokuapp.com/app/api/v1`. |\n| REACT_APP_PEXELS_ID | Pexels ID, đăng ký và tạo mới tài khoản [tại đây](https://www.pexels.com/api/new/), sau đó tạo mới API key. |\n| REACT_APP_FB_APP_ID | Facebook App ID, đăng ký vào tạo một ứng dụng trên Facebook [tại đây](https://developers.facebook.com/apps/create/). Sau khi tạo thành công, có thể copy ID tại trang Dashboard của ứng dụng. |\n| REACT_APP_GOOGLE_CLIENT_ID | Google Client ID, đăng ký vào tạo mới project. Xem hướng dẫn chi tiết [tại đây](https://dev.to/chandrapantachhetri/sending-emails-securely-using-node-js-nodemailer-smtp-gmail-and-oauth2-g3a#:~:text=Step%201%3A%20Creating%20a%20Google%20Project). |\n\n- Bước 4: Khởi chạy\n\nTại thư mục `x2mint`, mở terminal và chạy các lệnh sau:\n\n```bash\ncd clients\nnpm run start\n```\n\nHoặc:\n\n```bash\ncd clients\nyarn start\n```\n\n**Kết quả:**\n\n```\nCompiled successfully!\n\nYou can now view clients in the browser.\n\n  Local:            http://localhost:3000        \n  On Your Network:  http://192.168.56.1:3000\n\nNote that the development build is not optimized.\nTo create a production build, use yarn build.\n```\n\nTry cập vào [http://localhost:3000](http://localhost:3000) để xem trang web.\n\n## Hướng dẫn deploy\n\n- Bước 1: Tạo tài khoản trên [https://vercel.com/](https://vercel.com/), chọn phương thức đăng nhập với tài khoản `Github`.\n- Bước 2: Import project từ `Github` repo, xem hướng dẫn chi tiết [tại đây](https://vercel.com/guides/deploying-react-with-vercel-cra)\n- Bước 3: Cấu hình cho ứng dụng:\n  + Project Name: Tên ứng dụng (tuy chọn).\n  + Framework Preset: Chon `Create React App`.\n  + Root Directory: Chọn `clients`.\n  + Environment Variables: Thêm tất cả các biến môi trường chứa trong file `.env` (nằm trong thư mục `clients`).\n- Bước 4: Bấm `Deploy` và chờ đợi ứng dụng deploy thành công.\n- Bước 5: Sau khi deploy thành công, chuyển tới phần `Settings` của ứng dụng. Tại đây, thay đổi lại domain của ứng dụng tại mục `Domain`. Lưu ý: domain này phải tương tự như giá trị lưu tại biến môi trường `REACT_APP_WEBSITE`.\n- Bước 6: Truy cập domain ứng dụng (VD: [http://x2mint.vercel.app](http://x2mint.vercel.app/)) để xem ứng dụng.\n\n## Tài liệu liên quan\n\n- [Thanh toán VNPay với tài khoản demo](https://sandbox.vnpayment.vn/apis/vnpay-demo/)\n- [Tạo project trên Google Cloud](https://dev.to/chandrapantachhetri/sending-emails-securely-using-node-js-nodemailer-smtp-gmail-and-oauth2-g3a)\n\n## Contributors\n\n[![](https://avatars.githubusercontent.com/u/33385777?v=4\u0026s=100)](https://fb.com/01.tien) \n[![](https://avatars.githubusercontent.com/u/58748687?v=4\u0026s=100)](https://www.facebook.com/tadeothien)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiennhm%2Fx2mint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiennhm%2Fx2mint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiennhm%2Fx2mint/lists"}