Building Firebase Genkit APIs using TypeScript and Golang with Google's Gemini AI models. This project features a creative Restaurant Menu Generator that creates themed restaurant menus based on your specifications!
- TypeScript Implementation: Restaurant menu generator using Firebase Genkit
- Go Implementation: Coming soon!
- Google Gemini Integration: Powered by Gemini 2.5 Flash model
- Creative AI Outputs: Generate complete restaurant menus with themed items, descriptions, and pricing
- Interactive UI: Built-in Genkit developer UI for testing
Before you begin, ensure you have the following installed:
- Node.js (v18 or higher)
- pnpm (recommended) or npm
- Go (v1.24.1 or higher)
- Gemini API Key
-
Download the latest Go version:
# Check the latest version at https://golang.org/dl/ wget https://go.dev/dl/go1.24.1.linux-amd64.tar.gz -
Remove any previous Go installation and extract:
sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz
-
Add Go to your PATH:
# Add to your ~/.bashrc or ~/.zshrc echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.zshrc echo 'export GOPATH=$HOME/go' >> ~/.zshrc echo 'export PATH=$PATH:$GOPATH/bin' >> ~/.zshrc source ~/.zshrc
-
Verify installation:
go version
npm install -g pnpm# Install using the official installer script
curl -fsSL https://get.pnpm.io/install.sh | sh -
# Add pnpm to your PATH (add to ~/.bashrc or ~/.zshrc)
echo 'export PNPM_HOME="$HOME/.local/share/pnpm"' >> ~/.zshrc
echo 'case ":$PATH:" in *":$PNPM_HOME:"*) ;; *) export PATH="$PNPM_HOME:$PATH" ;; esac' >> ~/.zshrc
source ~/.zshrc# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
source ~/.zshrc
# Install latest LTS Node.js
nvm install --lts
nvm use --lts
# Install pnpm
npm install -g pnpmgit clone https://github.com/dinocodesx/gemini-genkit-api.git
cd gemini-genkit-apiRun the bash command into your terminal to export the Gemini API Key:
export GEMINI_API_KEY="your_gemini_api_key_here"To get your Gemini API Key:
- Visit Google AI Studio
- Create a new API key
- Set up billng via GCP
Navigate to the Go directory and install dependencies:
cd go
go mod tidyNavigate to the TypeScript directory and install dependencies:
cd ts
pnpm install # or npm installcd ts
pnpm install -g genkit-cli
pnpm genkit:uiThis starts the Genkit developer UI at http://localhost:4000 where you can:
- Test the
restaurantMenuGeneratorFlowinteractively - View detailed request/response data
- Experiment with different inputs
- Debug and monitor your flows
cd go
go run main.goWhen using the Genkit UI or calling the flow programmatically, use this JSON structure:
{
"name": "The Cosmic Cantina",
"theme": "intergalactic space diner with retro-futuristic vibes",
"cuisineType": "fusion comfort food",
"priceRange": "mid-range",
"atmosphere": "quirky and family-friendly with neon lights and space memorabilia",
"specialFeature": "all dishes are served on LED-lit plates and the waitstaff wear space suits"
}{
"name": "The Rusty Anchor",
"theme": "pirate tavern with nautical adventures",
"cuisineType": "seafood and hearty pub food",
"priceRange": "budget",
"atmosphere": "rowdy and adventurous with wooden barrels and treasure maps",
"specialFeature": "meals are served in treasure chests and drinks come in skull mugs"
}{
"name": "Dragon's Den Feast Hall",
"theme": "medieval castle dining with knights and dragons",
"cuisineType": "European medieval fare",
"priceRange": "upscale",
"atmosphere": "grand and majestic with stone walls and candlelight",
"specialFeature": "waiters dress as knights and meals are announced with a horn"
}{
"name": "Zen Garden Bistro",
"theme": "minimalist zen garden",
"cuisineType": "Japanese fusion",
"priceRange": "fine-dining",
"atmosphere": "peaceful and serene"
}| Field | Type | Required | Description |
|---|---|---|---|
name |
string | β | Name of the restaurant |
theme |
string | β | Restaurant theme or concept |
cuisineType |
string | β | Type of cuisine |
priceRange |
enum | β | "budget", "mid-range", "upscale", or "fine-dining" |
atmosphere |
string | β | Atmosphere or vibe description |
specialFeature |
string | β | Special feature or gimmick (optional) |
The generator creates a complete restaurant menu including:
- Restaurant Details: Name, tagline, ambiance description
- Menu Sections: Appetizers, mains, desserts, beverages
- Menu Items: Creative names, detailed descriptions, themed pricing
- Specialties: Chef's special dishes (optional)
- Fun Elements: Amusing restaurant facts and themed wordplay
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Firebase Genkit for the amazing AI development framework
- Google Gemini for the powerful AI models
- The open-source community for continuous inspiration
Happy Coding! πβ¨