MCPcopy Index your code
hub / github.com/FatDoge/receipt-generator

github.com/FatDoge/receipt-generator @v0.1.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.5 ↗ · + Follow
38 symbols 90 edges 20 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

收据生成器

License Live Demo

中文 | English

一个由 Trae AI 完全生成的现代化收据生成器应用,支持多种模板、多语言和收据导出功能。基于React + TypeScript + Tailwind CSS构建,提供PWA支持。

🦄 一键部署

已支持 Vercel,快来私有化部署拥有属于你自己的应用。后续更新可以在 fork 的仓库中 sync 一下到最新 commit 即可触发重新部署。

Deploy with Vercel

✨ 功能特性

  • 📝 多种收据模板选择
  • 🌍 支持多语言(中文/英文)与对应货币格式
  • 🖨️ 一键生成收据
  • 💾 下载收据为图片
  • 🧾 自定义商家名称、日期、商品项等
  • 📱 响应式设计,适配各种设备
  • 📲 PWA支持,可安装为桌面应用并离线使用

🛠️ 技术栈

  • 框架: React 18
  • 语言: TypeScript
  • 样式: Tailwind CSS
  • 状态管理: React Context
  • 国际化: i18next
  • 构建工具: Vite
  • PWA支持: Service Worker + Web Manifest

🚀 快速开始

开发环境要求

  • Node.js 18+
  • pnpm 9+

安装

# 克隆项目
git clone https://github.com/FatDoge/receipt-generator.git

# 进入项目目录
cd receipt-generator

# 安装依赖
pnpm install

开发

# 启动开发服务器
pnpm run dev

构建

# 构建生产版本
pnpm run build

📁 项目结构

src/
├── components/     # React组件
├── context/        # React Context
├── data/          # 静态数据和模板
├── locales/       # 国际化文件
├── styles/        # 全局样式
├── utils/         # 工具函数
└── App.tsx        # 应用入口

📄 使用说明

  1. 选择收据模板
  2. 填写商家信息
  3. 添加商品项
  4. 点击"生成收据"按钮
  5. 可下载收据图片

📜 许可证

本项目采用 MIT 许可证

🙏 致谢

Extension points exported contracts — how you extend this code

ItemFormProps (Interface)
(no doc)
src/components/ItemForm.tsx
ReceiptItem (Interface)
(no doc)
src/utils/receipt.ts
ThemeContextType (Interface)
(no doc)
src/context/ThemeContext.tsx
GithubLinkProps (Interface)
(no doc)
src/components/GithubLink.tsx
PaymentInfo (Interface)
(no doc)
src/utils/receipt.ts
UpdateNotificationProps (Interface)
(no doc)
src/components/UpdateNotification.tsx
Receipt (Interface)
(no doc)
src/utils/receipt.ts
ReceiptPreviewProps (Interface)
(no doc)
src/components/ReceiptPreview.tsx

Core symbols most depended-on inside this repo

generateReceiptNumber
called by 4
src/utils/receipt.ts
calculateTotal
called by 2
src/App.tsx
getInitialReceiptData
called by 2
src/data/initialData.ts
changeLanguage
called by 1
src/App.tsx
handleRemoveItem
called by 1
src/App.tsx
handleEditItem
called by 1
src/App.tsx
handleTemplateChange
called by 1
src/App.tsx
handleRipReceipt
called by 1
src/components/ReceiptPreview.tsx

Shape

Function 29
Interface 9

Languages

TypeScript100%

Modules by API surface

src/App.tsx12 symbols
src/utils/receipt.ts6 symbols
src/context/ThemeContext.tsx5 symbols
src/components/ReceiptPreview.tsx4 symbols
src/components/UpdateNotification.tsx3 symbols
src/components/ItemForm.tsx3 symbols
src/components/ThemeToggle.tsx2 symbols
src/components/GithubLink.tsx2 symbols
src/data/initialData.ts1 symbols

For agents

$ claude mcp add receipt-generator \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact