A simple Progressive Web App (PWA) for receiving orders via Telegram notifications.
Live Demo: https://il-ristoro.vercel.app/
┌─────────────────────────────────────────────────────────────────────────┐
│ CUSTOMER │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Scan QR │───►│ Browse & │───►│ Submit │ │
│ │ Install PWA │ │ Build Cart │ │ Order │ │
│ └──────────────┘ └──────────────┘ └──────┬───────┘ │
│ │ │
└───────────────────────────────────────────────────┼──────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ VERCEL (Free Tier) │
│ │
│ ┌────────────────────────┐ ┌────────────────────────┐ │
│ │ Static PWA Files │ │ /api/order │ │
│ │ (React App) │ │ Serverless Function │ │
│ └────────────────────────┘ └───────────┬────────────┘ │
│ │ │
└──────────────────────────────────────────────┼───────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ TELEGRAM BOT API │
└──────────────────────────────────────────────┬───────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ SHOP OWNER │
│ 📱 Receives order notification on Telegram │
└─────────────────────────────────────────────────────────────────────────┘
| Component | Technology |
|---|---|
| Frontend | React + TypeScript + Vite |
| Styling | Tailwind CSS |
| Hosting | Vercel (free tier) |
| Backend | Vercel Serverless Function |
| Notifications | Telegram Bot API |
IlRistoro/
├── api/
│ └── order.ts # Serverless function (Telegram proxy)
├── public/
│ ├── icons/ # PWA icons
│ │ ├── icon-192.png
│ │ └── icon-512.png
│ ├── logo.jpg # Shop logo
│ ├── bg.jpg # Background image
│ ├── manifest.json # PWA manifest
│ └── sw.js # Service worker
├── src/
│ ├── components/ # React components
│ │ ├── Cart.tsx
│ │ ├── CategoryTabs.tsx
│ │ ├── Confirmation.tsx
│ │ ├── Header.tsx
│ │ ├── Menu.tsx
│ │ ├── OrderForm.tsx
│ │ └── ProductCard.tsx
│ ├── data/
│ │ └── products.ts # Menu items (edit this!)
│ ├── hooks/
│ │ └── useCart.ts # Cart state management
│ ├── types/
│ │ └── index.ts # TypeScript interfaces
│ ├── App.tsx # Main app component
│ ├── main.tsx # App entry point
│ └── index.css # Global styles
├── .env # Environment variables (local)
├── eslint.config.js # ESLint configuration
├── index.html
├── vercel.json # Vercel deployment config
├── vite.config.ts # Vite configuration
└── package.json
- Open Telegram and search for
@BotFather - Send
/newbotand follow the prompts - Save the bot token (looks like
123456789:ABCdefGHIjklMNOpqrsTUVwxyz) - Start a chat with your new bot
- Get your chat ID:
- Send a message to your bot
- Visit
https://api.telegram.org/bot<TOKEN>/getUpdates - Find
"chat":{"id":XXXXXXXXX}— that's your chat ID
yarnCreate .env.local:
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_CHAT_ID=your_chat_id_hereEdit src/data/products.ts to update prices or add items.
npx vercel devyarn global add vercel
vercelThen set environment variables in Vercel dashboard:
TELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID
Generate a QR code for your Vercel URL and display it in the shop!
Edit src/data/products.ts and redeploy:
npx vercel --prod| Service | Cost |
|---|---|
| Vercel Hosting | Free |
| Telegram Bot | Free |
| Domain (optional) | ~€10/year |
Total: €0/year (or ~€10 with custom domain)
- Add prices for Taglieri (piccolo, medio, grande)
- Add prices for Fritti (Supplì, Patatine fritte)