{"id":345,"date":"2025-05-23T16:10:17","date_gmt":"2025-05-23T16:10:17","guid":{"rendered":"https:\/\/docs.quantri.online\/?docs=developer-guide\/introduction\/quy-tac-va-quy-dinh-phat-trien-phan-mem-bm"},"modified":"2025-07-07T02:37:29","modified_gmt":"2025-07-07T02:37:29","slug":"quy-tac-va-quy-dinh-phat-trien-phan-mem-bm","status":"publish","type":"docs","link":"https:\/\/docs.quantri.online\/?docs=developer-guide\/introduction\/quy-tac-va-quy-dinh-phat-trien-phan-mem-bm","title":{"rendered":"Quy t\u1eafc v\u00e0 quy \u0111\u1ecbnh ph\u00e1t tri\u1ec3n ph\u1ea7n m\u1ec1m BM"},"content":{"rendered":"\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\"><strong>1. C\u1ea5u tr\u00fac d\u1ef1 \u00e1n &amp; m\u00f4i tr\u01b0\u1eddng l\u00e0m vi\u1ec7c<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ngo\u00e0i c\u00e1c th\u01b0 m\u1ee5c m\u1eb7c \u0111\u1ecbnh c\u1ee7a suiteCRM khi thi\u1ebft l\u1eadp d\u1ef1 \u00e1n th\u00ec c\u1ea7n l\u01b0u \u00fd m\u1ed9t s\u1ed1 th\u01b0 m\u1ee5c custom sau:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>logs<\/strong>: L\u01b0u tr\u1eef th\u00f4ng tin log h\u1ec7 th\u1ed1ng. Bao g\u1ed3m log cu\u1ed9c g\u1ecdi, log c\u1ea3nh b\u00e1o t\u1eeb h\u1ec7 th\u1ed1ng<\/li>\n\n\n\n<li><strong>sessions<\/strong>: L\u01b0u tr\u1eef th\u00f4ng tin sessions hi\u1ec7n t\u1ea1i tr\u00ean h\u1ec7 th\u1ed1ng. Phi\u00ean l\u00e0m vi\u1ec7c<\/li>\n\n\n\n<li><strong>archives<\/strong>: Th\u01b0 m\u1ef1c l\u01b0u tr\u1eef t\u00e0i nguy\u00ean (L\u01b0u tr\u1eef file ghi \u00e2m, file mp3, text transcript, &#8230;)<\/li>\n\n\n\n<li>&#8230;&#8230;&#8230;.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>C\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd c\u00f4ng vi\u1ec7c<\/strong>: D\u00f9ng <a href=\"https:\/\/op.quantri.online\/\" data-type=\"link\" data-id=\"https:\/\/op.quantri.online\/\"><strong><span style=\"text-decoration: underline;\">op.quantri.online<\/span><\/strong><\/a> \u0111\u1ec3 qu\u1ea3n l\u00fd task, c\u1eadp nh\u1eadt ti\u1ebfn \u0111\u1ed9 theo ng\u00e0y.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>M\u1ed7i task c\u1ea7n c\u00f3<\/strong>: Ti\u00eau \u0111\u1ec1 r\u00f5 r\u00e0ng, m\u00f4 t\u1ea3 chi ti\u1ebft, ng\u01b0\u1eddi th\u1ef1c hi\u1ec7n, deadline, \u0111\u1ed9 \u01b0u ti\u00ean.<\/li>\n\n\n\n<li><strong>Lu\u1ed3ng x\u1eed l\u00fd code<\/strong>:\n<ul class=\"wp-block-list\">\n<li>L\u1eadp task tr\u00ean h\u1ec7 th\u1ed1ng.<\/li>\n\n\n\n<li>T\u1ea1o nh\u00e1nh Git t\u01b0\u01a1ng \u1ee9ng: [username]_[<code>feature]_[optional]<\/code>, [<code>hotfix]_[issue_name]<\/code>, <code>hotfix_...<\/code><\/li>\n\n\n\n<li>Code, vi\u1ebft t\u00e0i li\u1ec7u v\u00e0 test.<\/li>\n\n\n\n<li>T\u1ea1o Merge Request (MR) l\u00ean nh\u00e1nh <code><strong>develop<\/strong><\/code>.<\/li>\n\n\n\n<li>Code ph\u1ea3i \u0111\u01b0\u1ee3c review k\u1ef9 c\u00e0ng tr\u01b0\u1edbc khi \u0111\u01b0\u1ee3c merge v\u00e0o <strong>main<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\"><strong>2. Chu\u1ea9n code (Coding Standards) v\u00e0 T\u00e0i li\u1ec7u h\u00f3a<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>T\u00ean bi\u1ebfn, h\u00e0m: \u0111\u1eb7t theo camelCase.<\/li>\n\n\n\n<li>T\u1ea1o module c\u00fa ph\u00e1p: \u0110\u1eb7t t\u00ean ti\u1ebfng anh (vi\u1ebft hoa ch\u1eef \u0111\u1ea7u, c\u00e1ch nhau b\u1eb1ng d\u1ea5u &#8220;_&#8221;) Key (Prefix): <strong>BM<\/strong> (vi\u1ebft hoa). Ph\u1ea3i c\u00f3 m\u00f4 t\u1ea3 l\u00e0 module g\u00ec.<\/li>\n\n\n\n<li>Lu\u00f4n comment \u0111\u1ee7 cho class, function v\u00e0 logic ph\u1ee9c t\u1ea1p.<\/li>\n\n\n\n<li>C\u00e1c folder nh\u01b0:<strong><em> js, css, language, metadata, tpls, views,&#8230;<\/em><\/strong> th\u00ec \u0111i\u1ec1u ch\u1ec9nh tr\u1ef1c ti\u1ebfp trong folder g\u1ed1c <strong>modules\/<\/strong>. Ngo\u1ea1i tr\u1eeb tr\u01b0\u1eddng h\u1ee3p nh\u01b0 <strong><em>logic_hook <\/em><\/strong>th\u00ec \u0111i\u1ec1u ch\u1ec9nh trong folder <strong>custom\/modules\/<\/strong><\/li>\n\n\n\n<li>T\u1ed1i \u01b0u h\u00f3a code c\u0169. H\u1ea1n ch\u1ebf hardcode.<\/li>\n\n\n\n<li>M\u1ed7i module ph\u1ea3i c\u00f3 t\u00e0i li\u1ec7u c\u1ea5u tr\u00fac, h\u01b0\u1edbng d\u1eabn s\u1eed d\u1ee5ng ho\u1eb7c t\u00edch h\u1ee3p.<\/li>\n\n\n\n<li>API ph\u1ea3i c\u00f3 docs <strong>(Swagger\/Postman\/Redoc).<\/strong><\/li>\n\n\n\n<li>Ghi ch\u00fa c\u00e1ch deploy, migrate DB, c\u1ea5u h\u00ecnh cronjob n\u1ebfu c\u00f3.<\/li>\n\n\n\n<li><strong>Ghi log truy c\u1eadp v\u00e0 h\u00e0nh vi ng\u01b0\u1eddi d\u00f9ng<\/strong> n\u1ebfu li\u00ean quan \u0111\u1ebfn th\u00f4ng tin quan tr\u1ecdng.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading has-medium-font-size\"><strong>3. Giao ti\u1ebfp v\u00e0 ph\u1ed1i h\u1ee3p nh\u00f3m<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>S\u1eed d\u1ee5ng Telegram<\/strong> n\u1ed9i b\u1ed9 \u0111\u1ec3 trao \u0111\u1ed5i nhanh.<\/li>\n\n\n\n<li><strong>Review tu\u1ea7n\/th\u00e1ng<\/strong> \u0111\u1ec3 t\u1ed5ng k\u1ebft v\u1ea5n \u0111\u1ec1, chia s\u1ebb kinh nghi\u1ec7m.<\/li>\n\n\n\n<li><strong>H\u1ea1n ch\u1ebf<\/strong> nh\u1eafn tin ri\u00eang khi trao \u0111\u1ed5i c\u00f4ng vi\u1ec7c.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>L\u01b0u \u00fd:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Kh\u00f4ng push th\u00f4ng tin nh\u1ea1y c\u1ea3m l\u00ean Git<em> <\/em><strong><em>(Api key\/Token\/Password).<\/em><\/strong><\/li>\n\n\n\n<li>T\u1ed1i thi\u1ec3u ph\u1ea3i c\u00f3 test th\u1ee7 c\u00f4ng cho c\u00e1c ch\u1ee9c n\u0103ng ch\u00ednh.<\/li>\n\n\n\n<li>Kh\u00f4ng s\u1eeda code c\u1ee7a ng\u01b0\u1eddi kh\u00e1c m\u00e0 kh\u00f4ng th\u00f4ng b\u00e1o.<\/li>\n\n\n\n<li>Lu\u00f4n backup tr\u01b0\u1edbc khi ch\u1ec9nh s\u1eeda nh\u1eefng ph\u1ea7n quan tr\u1ecdng.<\/li>\n\n\n\n<li><\/li>\n\n\n\n<li><strong>T\u00f4n tr\u1ecdng th\u1eddi h\u1ea1n<\/strong>, tr\u00e1nh tr\u1ec5 task m\u00e0 kh\u00f4ng b\u00e1o tr\u01b0\u1edbc.<\/li>\n\n\n\n<li><strong>Ch\u1ee7 \u0111\u1ed9ng c\u1eadp nh\u1eadt tr\u1ea1ng th\u00e1i task<\/strong>, tr\u00e1nh \u0111\u1ec3 b\u1ecb \u201ctreo\u201d.<\/li>\n\n\n\n<li><strong>H\u1ed7 tr\u1ee3 \u0111\u1ed3ng \u0111\u1ed9i<\/strong>, tr\u00e1nh gi\u1eef ki\u1ebfn th\u1ee9c ri\u00eang.<\/li>\n\n\n\n<li><strong>\u0110\u1ec1 cao tinh th\u1ea7n t\u1ef1 h\u1ecdc<\/strong> v\u00e0 c\u1ea3i ti\u1ebfn li\u00ean t\u1ee5c.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. C\u1ea5u tr\u00fac d\u1ef1 \u00e1n &amp; m\u00f4i tr\u01b0\u1eddng l\u00e0m vi\u1ec7c Ngo\u00e0i c\u00e1c th\u01b0 m\u1ee5c m\u1eb7c \u0111\u1ecbnh c\u1ee7a suiteCRM khi thi\u1ebft l\u1eadp d\u1ef1 \u00e1n th\u00ec c\u1ea7n l\u01b0u \u00fd m\u1ed9t s\u1ed1 th\u01b0 m\u1ee5c custom sau: C\u00f4ng c\u1ee5 qu\u1ea3n l\u00fd c\u00f4ng vi\u1ec7c: D\u00f9ng op.quantri.online \u0111\u1ec3 qu\u1ea3n l\u00fd task, c\u1eadp nh\u1eadt ti\u1ebfn \u0111\u1ed9 theo ng\u00e0y. 2. Chu\u1ea9n code (Coding [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":316,"menu_order":2,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-345","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/docs.quantri.online\/index.php?rest_route=\/wp\/v2\/docs\/345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.quantri.online\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.quantri.online\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.quantri.online\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.quantri.online\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345"}],"version-history":[{"count":17,"href":"https:\/\/docs.quantri.online\/index.php?rest_route=\/wp\/v2\/docs\/345\/revisions"}],"predecessor-version":[{"id":367,"href":"https:\/\/docs.quantri.online\/index.php?rest_route=\/wp\/v2\/docs\/345\/revisions\/367"}],"up":[{"embeddable":true,"href":"https:\/\/docs.quantri.online\/index.php?rest_route=\/wp\/v2\/docs\/316"}],"wp:attachment":[{"href":"https:\/\/docs.quantri.online\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.quantri.online\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}