Files
xstore/README.md
2025-10-04 11:46:59 +07:00

75 lines
3.5 KiB
Markdown

<h1>Hướng dẫn</h1>
<p>Link thiết kế: <a href="https://www.figma.com/design/qqipE1AsUMl31zk6wezduD/X-Store?node-id=110-11&t=eJARcn1sDXYeb031-0" target="_blank"> <strong>Giao diện Xstore</strong> </a></p>
<p>Repo: <a href="https://repo.hurasoft.com/tieptk/xstore" target="_blank">https://repo.hurasoft.com/tieptk/xstore</a></p>
<p>Theo dõi tiến độ: <a href="https://docs.google.com/spreadsheets/d/1Po3ANsG00pm_Y3dnrwuV81cidTCCqepYmR3yPDlIq6c/edit#gid=0" target="_blank">https://docs.google.com/spreadsheets/d/1Po3ANsG00pm_Y3dnrwuV81cidTCCqepYmR3yPDlIq6c/edit#gid=0</a></p>
<h2>Cài đặt hệ thống</h2>
<p>Test và làm việc chính tại web: <a href="http://local.hura8_admin/"> http://local.xstore/</a> </p>
<ul>
<li>Tải phần mềm XAMPP tại <a href="https://www.apachefriends.org/download.html" target="_blank">https://www.apachefriends.org/download.html</a> để chạy PHP</li>
<li>Chỉnh file hosts trong máy tính C:\Windows\System32\drivers\etc\hosts:
<pre><code>
127.0.0.1 local.xstore/
</code></pre>
</li>
<li>
Cài đặt ../xampp/apache/conf/extra/httpd-vhosts.conf của apache trong XAMPP
<pre><code>
&lt;VirtualHost *:80&gt;
DocumentRoot "/thuc-muc-check-out/xstore"
ServerName local.hura8_admin
&lt;Directory "/thuc-muc-check-out/xstore/"&gt;
Require all granted
&lt;/Directory&gt;
&lt;/VirtualHost&gt;
</code></pre>
</li>
<li>
Cài đặt ../xampp/apache/conf/httpd.conf của apache trong XAMPP
<pre><code>
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
AllowOverride All
</code></pre>
</li>
</ul>
<h2>Cấu trúc thư mục</h2>
<ul>
<li>/template: các file template html chia theo module/view</li>
<li>/data: cung cấp dữ liệu cho template và hiển thị dữ liệu trên template qua code Liquid <a href="https://shopify.github.io/liquid/" target="_blank">https://shopify.github.io/liquid/</a></li>
<li>/assets: lưu các file ảnh/css/js dùng cho giao diện</li>
<li>/package: thư viện code PHP hỗ trợ</li>
<li>/inc: các code PHP hỗ trợ</li>
<li>index.php: file gốc để truy cập nội dung</li>
<li>ajax.php: file gốc để gọi ajax</li>
</ul>
<h2>Cài đặt Composer (dùng tải package của PHP)</h2>
<p>Xem hướng dẫn: <a href="https://getcomposer.org/doc/00-intro.md#installation-windows" target="_blank">https://getcomposer.org/doc/00-intro.md#installation-windows</a> </p>
<p>Sau khi cài đặt xong. Mở cmd của Windows và thao tác lệnh sau để cài các thư viện code PHP cần cho dự án này.</p>
<pre><code>
> cd /thuc-muc-check-out/xstore/package
> composer i
</code></pre>
<h2> Sử dụng <u>Tailwind</u> để style giao diện.</h2>
<ul>
<li>[Dùng chính] <a href="https://daisyui.com/components/" target="_blank">https://daisyui.com/components/</a></li>
<li><a href="https://tailwindui.com/" target="_blank"> https://tailwindui.com/ </a></li>
<li><a href="https://tailblocks.cc/" target="_blank"> https://tailblocks.cc/ </a></li>
<li><a href="https://www.hyperui.dev/" target="_blank"> https://www.hyperui.dev/ </a></li>
<li><a href="https://flowbite.com/docs/plugins/charts/" target="_blank"> Biểu đồ </a></li>
</ul>