This project is a web application for managing and sharing discount coupons and referral codes. The data is loaded from Google Sheets, and the application is hosted on Vercel.
- Create an account on Vercel: https://vercel.com
- Fork or clone this repository
- Import the project into Vercel
- Set up environment variables in the Vercel UI:
GOOGLE_SERVICE_ACCOUNT_KEY(JSON key content)SPREADSHEET_ID(Google Sheets spreadsheet ID)SHEET_NAME(Name of the sheet containing data)SHEET_NAME_MENU(Name of the sheet containing menu data)NEXT_PUBLIC_APP_NAME(Application name displayed in the UI)NEXT_PUBLIC_NAVBAR_COLOR(Navigation bar color)
- Deploy the application
To ensure the application functions correctly, create a .env.local file with the following values:
NEXT_PUBLIC_APP_NAME=My Referral App
NEXT_PUBLIC_NAVBAR_COLOR=#bd5d38
GOOGLE_SERVICE_ACCOUNT_KEY='{
"type": "service_account",
"project_id": "xxx",
"private_key_id": "xxx",
"private_key": "-----BEGIN PRIVATE KEY-----\nxxx\n-----END PRIVATE KEY-----\n",
"client_email": "xxx@xxx.iam.gserviceaccount.com",
"client_id": "xxx",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xxx.iam.gserviceaccount.com"
}'
SPREADSHEET_ID=1MMd28OsfrHJgnJ2qqfYSa3stEJKvtOOIPjdoI26djtM
SHEET_NAME=Coupons
SHEET_NAME_MENU=Menu⚠ IMPORTANT: Never share the
.envfile or its contents, as it contains sensitive information.
- Open Google Cloud Console: https://console.cloud.google.com/
- Create a new project or use an existing one.
- Navigate to API & Services > Credentials.
- Click + Create Credentials → Service Account.
- Enter a name (e.g.,
sheets-api) and create the account. - Go to the Keys tab → Add Key → Create New Key.
- Select JSON format, download the file, and save its content into
GOOGLE_SERVICE_ACCOUNT_KEYin.env.local.
- Open the Google Sheet containing coupons.
- Click Share.
- Add the service account email (found in the JSON key under
client_email). - Grant Viewer permission.
- SPREADSHEET_ID: Found in the spreadsheet URL between
d/and/edit, e.g.:
https://docs.google.com/spreadsheets/d/1MMd28OsfrHJgnJ2qqfYSa3stEJKvtOOIPjdoI26djtM/edit#gid=0 - SHEET_NAME: The sheet name at the bottom of the Google Sheet (e.g.,
Coupons). - SHEET_NAME_MENU: The sheet name at the bottom of the Google Sheet (e.g.,
Menu).
If this application has been helpful to you, you can support me by using one of the referral codes available at code.fukjemi.cz. Thank you! 🙌
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Open the application in your browser at
http://localhost:3000
- Next.js - React framework
- Material UI - Styling
- Google Sheets API - Data source
- Vercel - Hosting
This project is open-source, and I welcome any improvements! If you want to contribute or continue its development:
- Fork this repository and create your own branch.
- Explore the existing code and read the documentation.
- Suggest improvements or fix bugs – such as UI enhancements, new features, or API optimizations.
- Open a pull request and include a description of the changes.
If you need inspiration, try this prompt for ChatGPT:
Continue developing this Next.js application with Material UI. Focus on improving responsiveness, performance optimization, and expanding functionality. Ensure the application is accessible and well-structured. Add unit tests, enhance SEO, and keep the code clean. Utilize data from Google Sheets and maintain the current CI/CD workflow for Vercel.
If you have any questions or suggestions for improvement, feel free to contact me!
📧 Email: cupon-github@fukjemi.cz
- 👤 Main Developer: ChatGPT
- 👤 AI Supervisor: FukjemiCZ
- 👤 Owner: FukjemiCZ
Tento projekt je webová aplikace pro správu a sdílení slevových kuponů a referenčních kódů. Data jsou načítána z Google Sheets a aplikace je hostovaná na Vercelu.
- Vytvořte si účet na Vercelu: https://vercel.com
- Forkněte nebo naklonujte tento repozitář
- Importujte projekt do Vercelu
- Nastavte environment variables ve Vercel UI:
GOOGLE_SERVICE_ACCOUNT_KEY(obsah JSON klíče)SPREADSHEET_ID(ID Google Sheets tabulky)SHEET_NAME(Název listu s daty)SHEET_NAME_MENU(Název listu s menu)NEXT_PUBLIC_APP_NAME(Název aplikace zobrazovaný v UI)NEXT_PUBLIC_NAVBAR_COLOR(Barva navigace)
- Deployněte aplikaci
Pro správné fungování aplikace je nutné vytvořit .env.local soubor s následujícími hodnotami:
NEXT_PUBLIC_APP_NAME=Moje Referral Aplikace
NEXT_PUBLIC_NAVBAR_COLOR=#bd5d38
GOOGLE_SERVICE_ACCOUNT_KEY='{
"type": "service_account",
"project_id": "xxx",
"private_key_id": "xxx",
"private_key": "-----BEGIN PRIVATE KEY-----\nxxx\n-----END PRIVATE KEY-----\n",
"client_email": "xxx@xxx.iam.gserviceaccount.com",
"client_id": "xxx",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/xxx.iam.gserviceaccount.com"
}'
SPREADSHEET_ID=1MMd28OsfrHJgnJ2qqfYSa3stEJKvtOOIPjdoI26djtM
SHEET_NAME=Coupons
SHEET_NAME_MENU=Menu⚠ DŮLEŽITÉ: Nikdy nesdílejte
.envsoubor ani jeho obsah, protože obsahuje citlivé údaje.
- Otevřete Google Cloud Console: https://console.cloud.google.com/
- Vytvořte nový projekt nebo použijte existující.
- Přejděte na API a služby > Přihlašovací údaje.
- Klikněte na + Vytvořit přihlašovací údaje → Servisní účet.
- Zadejte název (např.
sheets-api), vytvořte účet. - Přejděte na záložku Klíče → Přidat klíč → Vytvořit nový klíč.
- Vyberte formát JSON, stáhněte si soubor a jeho obsah uložte do
GOOGLE_SERVICE_ACCOUNT_KEYv.env.local.
- Otevřete Google Sheet s kupony.
- Klikněte na Sdílet.
- Přidejte e-mail servisního účtu (najdete ho v JSON klíči pod
client_email). - Udělte oprávnění Čtenář.
- SPREADSHEET_ID: Najdete v URL tabulky mezi
d/a/edit, např.:
https://docs.google.com/spreadsheets/d/1MMd28OsfrHJgnJ2qqfYSa3stEJKvtOOIPjdoI26djtM/edit#gid=0 - SHEET_NAME: Název listu dole v Google Tabulce (např.
Coupons). - SHEET_NAME_MENU: Název listu dole v Google Tabulce (např.
Menu).
Pokud vám aplikace pomohla, můžete mě podpořit použitím některého z referral kódů dostupných na code.fukjemi.cz. Děkuji! 🙌
-
Nainstalujte závislosti
npm install
-
Spusťte vývojový server
npm run dev
-
Otevřete aplikaci v prohlížeči na
http://localhost:3000
- Next.js - React framework
- Material UI - Styling
- Google Sheets API - Datový zdroj
- Vercel - Hosting
Tento projekt je open-source a rád přivítám jakékoliv vylepšení! Pokud chcete přispět nebo pokračovat v jeho vývoji:
- Forkněte tento repozitář a vytvořte si vlastní větev.
- Prozkoumejte existující kód a přečtěte si dokumentaci.
- Navrhněte vylepšení nebo opravte chyby – třeba zlepšení UI, nové funkce nebo optimalizace API.
- Otevřete pull request a připojte popis změn.
Pokud potřebujete inspiraci, zkuste tento prompt pro ChatGPT:
Pokračuj ve vývoji této Next.js aplikace s Material UI. Zaměř se na vylepšení responzivity, optimalizaci výkonu a rozšíření funkcionality. Ujisti se, že aplikace je přístupná a dobře strukturovaná. Přidej unit testy, vylepši SEO a udržuj kód čistý. Využívej data z Google Sheets a zachovej aktuální CI/CD workflow pro Vercel.
Pokud máte jakékoliv dotazy nebo návrhy na vylepšení, neváhejte mě kontaktovat!
📧 Email: cupon-github@fukjemi.cz
- 👤 Main Developer: ChatGPT
- 👤 AI Supervisor: FukjemiCZ
- 👤 Owner: FukjemiCZ