A Google Drive based CMS for quick restaurant menu creation. This Next.js application fetches menu data from Google Sheets and displays it in a responsive, print-ready format.
- Multi-language support
- Allergen information display
- Responsive design with print optimization
- Google Sheets integration
- Custom theming support
- Node.js v18+ (recommended: v20+)
- pnpm (package manager)
- Google Cloud Project with Sheets API enabled
- Google Service Account credentials
git clone https://github.com/your-repo/plu-exporter.git
cd plu-exporterpnpm installCreate a .env.local file in the root directory with the following variables:
# Google Sheets Configuration
SHEET_ID="Your Google Sheet ID"
CREDENTIALS="Base64 encoded service account credentials JSON"
# Application Configuration
NEXT_PUBLIC_CUSTOM_THEME_URL="URL to custom CSS file (optional)"
NEXT_PUBLIC_LANGUAGES="en,de,it" # Comma-separated language codes
# Security (optional)
TOTP_SECRET="Your secret for API authentication"- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the "Google Sheets API"
- Create a service account and download the JSON credentials file
- Encode the JSON file to base64:
base64 credentials.json - Share your Google Sheet with the service account email
Your Google Sheet should have two sheets:
-
Menu: Contains product data with these columns:
- plu (number)
- group (string)
- name (string)
- image (string - filename)
- allergies (string)
- details (string)
- description (string)
- size (string)
- price (string)
- page (number)
- language (string - language code)
-
Groups: Contains group data with these columns:
- name (string)
- description (string)
- pre (string)
- post (string)
- page (number)
- language (string - language code)
Start the development server:
pnpm devThe app will be available at http://localhost:3000
pnpm buildpnpm startReturns menu data in JSON format.
Response:
{
"values": [
{
"group": {
"name": "string",
"description": "string",
"pre": "string",
"post": "string",
"page": number,
"language": "string"
},
"products": [
{
"plu": number,
"group": "string",
"name": "string",
"image": "string",
"allergies": "string",
"details": "string",
"description": "string",
"size": "string",
"price": "string",
"page": number,
"language": "string"
}
]
}
]
}Add your custom CSS file and set NEXT_PUBLIC_CUSTOM_THEME_URL to override default styles.
Configure supported languages via NEXT_PUBLIC_LANGUAGES environment variable.
- Create a new project on Vercel
- Connect your GitHub repository
- Add environment variables in project settings
- Deploy
The app can be deployed to any Node.js hosting platform:
- Add build command:
pnpm build - Add start command:
pnpm start - Set all required environment variables
src/
├── app/ # Next.js app router
│ ├── api/ # API routes
│ └── [lang]/ # Language-specific pages
├── components/ # React components
├── models/ # Data models and types
├── styles/ # Global styles
└── utils/ # Utility functions
pnpm dev: Start development serverpnpm build: Create production buildpnpm start: Start production serverpnpm lint: Run ESLintpnpm format: Format code with Prettier
MIT