npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

example-ecommerce-mvc

v1.1.2

Published

**版本 1.1.0**

Readme

Gravito E-Commerce MVC Example

版本 1.1.0

這是一個基於 Gravito Framework 打造的高效能電子商務 MVC 示範專案。展示了如何結合 OrbitAtlas (ORM), OrbitIon (Inertia.js), OrbitSentinel (Auth), OrbitPulsar (Sessions) 以及 OrbitPrism (Vite/Views) 構建現代化的 Web 應用。

🗄️ 本地資料庫設置

使用 SQLite (預設)

應用程序預設使用 SQLite 記憶體模式 (:memory:),無需任何設置。資料會在每次伺服器重啟時重置。

使用 PostgreSQL (Docker)

  1. 啟動資料庫容器:
    docker-compose up -d
  2. 建立並配置 .env 檔案:
    cp .env.example .env
  3. 更新 .env 以使用 PostgreSQL:
    DB_CONNECTION=postgres
    DB_PASSWORD=password
  4. 重啟開發伺服器。

移除環境

若要停止並移除資料庫及其所有資料:

docker-compose down -v

🚀 快速開始

1. 安裝依賴

bun install

2. 啟動開發伺服器

bun run dev

伺服器將運行在:http://localhost:3070

✨ 主要功能 (v1.1.0)

  • 完整購物體驗: 商品瀏覽、搜尋、購物車管理與結帳流程。
  • 客戶服務中心: 完整的常見問題、運送政策、退換貨說明與聯絡我們頁面,具備互動式介面。
  • 後台管理系統: 商品、分類與訂單的後端管理 Dashboard。
  • 安全身份驗證: 用戶註冊、登入與安全的 Session 管理 (OrbitPulsar)。
  • 精緻 UI/UX: 響應式設計、深色模式支援 (Dark Mode)、細微動畫與骨架屏載入效果。

🔐 測試帳號資訊

為了方便開發測試,系統在初始化時已預建以下帳號:

管理員 (Admin)

  • 電子郵件: [email protected]
  • 密碼: admin123
  • 權限: 可訪問 /admin 後台,管理商品、分類與訂單。

一般客戶 (Customer)

  • 電子郵件: [email protected]
  • 密碼: password123
  • 權限: 一般購物流程、查閱個人訂單與個人資料管理。

🛠️ 技術棧

  • Backend: Gravito Core (Bun Runtime)
  • ORM: OrbitAtlas (SQLite)
  • Frontend: Vue 3 + Inertia.js (OrbitIon)
  • Styling: Vanilla CSS + UnoCSS (Tailwind compatible)
  • Session: OrbitPulsar
  • Build Tool: Vite

📂 專案結構

  • src/Http/Controllers: 業務邏輯處理中心 (含商店、購物車、訂單、後台與頁面控制器)。
  • src/Models: 數據模型與 Atlas ORM 定義。
  • src/client/pages: Vue 頁面組件 (Inertia),包含新增的 Support/ 目錄。
  • config/: 框架軌道 (Orbits) 與安全性設定。
  • database/: 包含遷移 (Migrations) 與種子數據 (Seeders)。

📸 圖片處理

本專案整合了 Unsplash 高品質 API 圖片,並使用自定義的 GImage 組件實作圖片懶加載 (Lazy Loading) 與骨架屏 (Skeleton) 載入效果。


Generated by Antigravity Protocol.