跳到正文
GitHub·· 6 天前AI 评分12

Vegangenius Chef:基于 Angular 22 与 Gemini 的全栈纯素食谱应用

adamtasteslikegood/tasteslikegoodtheangularsvegancookbook

AI 导读

Vegangenius Chef 是一个三层架构的全栈纯素食谱应用,前端为 Angular 22 SPA,经 Express 反向代理(:8080)接入 Flask API(:5000)与 Cloud SQL。

正文

Overview

Vegangenius Chef is a full-stack vegan recipe app with three tiers:

Browser → Angular 22 SPA → Express reverse-proxy (:8080) → Flask API (:5000) → Cloud SQL
  • Generate vegan recipes via Google Gemini (gemini-3.8-flash in production)
  • AI food photos via Google Gemini (gemini-3-pro-image in production)
  • Save & organize recipes into named cookbooks
  • Publish recipes as SSR pages at /r/<slug> for SEO & sharing
  • Auth via Google OAuth or guest mode (localStorage)

Quick Start

Prerequisites: Node.js 26+, Python 3.11+, uv

# 1. Clone with submodules
git clone --recurse-submodules https://github.com/adamtasteslikegood/tasteslikegoodtheangularsvegancookbook.git
cd tasteslikegoodtheangularsvegancookbook

# 2. Frontend + Express proxy
npm install
cp .env.example .env.local   # Set GEMINI_API_KEY, FLASK_BACKEND_URL

# 3. Flask backend
cd Backend
uv sync
cp .env.example .env         # Set GOOGLE_API_KEY, GOOGLE_CLIENT_ID, etc.
./init_database.sh
cd ..

# 4. Run (two terminals)
cd Backend && uv run python app.py          # Flask on :5000
npm run dev                                  # Angular :3000 + Express :8080; dev routes are proxied

Commands

Command Description
npm run dev Angular :3000 + Express :8080
npm run build Production build (Angular + Express)
npm start Production server (port 8080)
npm run lint ESLint check
npm run format Prettier format
npm run type-check TypeScript type check
npm test Vitest (server tests)

Architecture

See docs/architecture/ for ADRs and diagrams.

├── src/                 # Angular 22 SPA (signals, standalone components)
├── server/              # Express reverse proxy + static hosting
├── Backend/             # Flask API (submodule: tasteslikegood.com)
├── scripts/             # Utility scripts (PM tooling, git, gcloud)
├── specs/               # PM planning docs (synced to Confluence)
├── docs/                # All documentation
│   ├── architecture/    # ADRs, diagrams, rate limiting
│   ├── guides/          # Developer guides, quickstart
│   ├── deployment/      # Cloud Build, CI/CD checklists
│   ├── security/        # Security docs & guidelines
│   └── phases/          # Historical phase documentation
└── public/              # Static assets (privacy policy, etc.)

Deployment

Two Cloud Run services in us-central1:

  • express-frontend — Node.js (Angular + proxy)
  • flask-backend — Python (API + AI + auth + DB)

See docs/deployment/DEPLOYMENT_CHECKLIST.md for the full checklist.

gcloud builds submit --config=cloudbuild.yaml

Atlassian PM workflow

This repo has an official cross-agent PM workflow outside git (all on tasteslikegood.atlassian.net — the only Atlassian site for work items):

  • Jira KAN = active execution state, who is working on what now
  • Jira RCP = delivery state, epics, sprints, acceptance scope
  • Confluence TLG = durable planning/session context and documentation
  • specs/*.md = local working copies that sync non-destructively into Confluence

The PM tooling is hard-locked to that site by scripts/pm/_atlassian_guard.py: Jira writes are limited to KAN/RCP, read-only rollups/briefings may also include PLZG/TO, and any other site or project key is refused with an error.

Quick commands:

npm run pm:start             # connectivity check + local PM briefing
npm run pm:brief             # refresh local PM briefing
npm run pm:reflect           # compare local git state to Jira/KAN linkage
npm run pm:sync              # publish/update Confluence briefing
npm run pm:status            # live Jira + PR + Confluence + prod snapshot
npm run pm:daemon            # start daemon in background on this VM
npm run pm:daemon:status     # show pid + log path
npm run pm:daemon:logs       # tail daemon log
npm run pm:daemon:stop       # stop background daemon
npm run pm:daemon:foreground # run watcher/MCP helper in foreground for debugging

Put real Atlassian credentials in .env using the variables shown in .env.example.

Contributing

See CONTRIBUTING.md for workflow, branching strategy, and code style.

License

MIT

来源:GitHub · github.com