hansun

architects
Back to Knowledge
AI Workflow

20260718|Google AI Studio 工程管理報價系統|原始程式碼分享

分享以 Google AI Studio、Gemini API 與 Firebase 建立的工程管理報價系統原始程式碼,包含 AI 估價、施工日報分析、工地安全稽核、平面圖辨識與語音助理,並整理五步驟安裝流程。

2026-11-16
HanSun Architects | AI Workflow Handbook
+200 XP · Sign in and complete the article to earn XP
Contents

Contents

01原始程式碼下載
02安裝前準備
03五步驟完成安裝
04使用提醒
Chapter 01

原始程式碼下載

開啟 Google Drive:20260718-Google AI Studio-工程管理報價系統

請先下載完整專案,解壓縮後再依下列步驟安裝。

Chapter 02

安裝前準備

  • -Node.js 18 以上
  • -Google Gemini API 金鑰
  • -Firebase 帳號
Chapter 03

五步驟完成安裝

1. 安裝套件

在專案資料夾開啟終端機,執行:

npm install

2. 設定 Gemini 金鑰

前往 Google AI Studio API Key 建立金鑰。將 .env.local.example 複製並改名為 .env.local,再填入:

GEMINI_API_KEY=你的金鑰

金鑰應只存在後端環境,不要寫進前端程式碼,也不要提交到公開版本庫。正常流程為:瀏覽器 → 後端伺服器 → Gemini API。

3. 建立 Firebase 專案

前往 Firebase Console 建立專案與網頁應用程式,啟用 Google 與電子郵件/密碼登入,並建立 Firestore 資料庫。接著依專案內範例檔案填入 Firebase 設定。

4. 部署 Firestore 安全規則

請確認規則限制為僅本人或已授權帳號可存取,再執行:

firebase deploy --only firestore:rules

5. 啟動系統

npm run dev

完成後開啟 http://localhost:3000 即可開始使用。

Chapter 04

使用提醒

  • -首次啟動前,請先閱讀專案內的 README、環境變數範例與安全規則。
  • -AI 產出的估價、圖面辨識與工地安全分析,應由工程或設計專業人員覆核。
  • -請勿在公開畫面、截圖或版本庫中分享 API 金鑰與私人 Firebase 憑證。

本工具適合作為工程管理與 AI Workflow 的學習、測試與內部流程原型。正式專案仍應依公司權限、資料安全及專業審核流程調整。

Explore the topic

Put AI into architecture and interior-design practice

Continue from this article to the practical course, or learn about Shilun Yen's background in architecture, design and AI education.

Official LINE

Join HanSun Architects on LINE

Join our official LINE account for new knowledge articles, course updates and practical design-workflow notes.

Join Official LINE

For your security, never send full card numbers, one-time passwords or account passwords. HanSun Architects will not request transfers or passwords through LINE.

HanSun Architects official LINE QR code