This project is a simple waitlist signup page built with Next.js, TypeScript, and Tailwind CSS. It allows users to submit their email address, which is then stored in a Google Sheet via a server action. The UI features a flippable card design to showcase product features and includes a dark/light theme toggle.
waitlist-card.tsx)google-spreadsheet, google-auth-library)app/: Contains the core application routing, pages (page.tsx), layout (layout.tsx), global styles (globals.css), and server actions (actions.ts).components/: Reusable React components, including the main waitlist-card.tsx and UI elements from shadcn/ui.lib/: Utility functions (utils.ts).public/: Static assets like images and icons.hooks/: Custom React hooks (e.g., use-toast.ts).styles/: Global CSS files.Clone the repository:
bash
git clone <your-repository-url>
cd google-sheet-waitlist
Install dependencies:
This project uses pnpm as indicated by the pnpm-lock.yaml file.
bash
pnpm install
If you don't have pnpm, install it first (npm install -g pnpm) or use npm install / yarn install (though pnpm is recommended for consistency).
Set up Environment Variables:
Create a .env.local file in the root of the project and add the following variables:
plaintext
GOOGLE_SERVICE_ACCOUNT_EMAIL=your_service_account_email@developer.gserviceaccount.com
GOOGLE_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\nYourPrivateKeyHere\n-----END PRIVATE KEY-----\n
GOOGLE_SHEET_ID=your_google_sheet_id
GOOGLE_SERVICE_ACCOUNT_EMAIL: The email address of your Google Cloud service account.GOOGLE_PRIVATE_KEY: The private key associated with your service account. Make sure to format it correctly, replacing literal newlines in the key file with \n characters within the string.GOOGLE_SHEET_ID: The ID of the Google Sheet where you want to store the emails. You can find this in the URL of your Google Sheet (https://docs.google.com/spreadsheets/d/YOUR_SHEET_ID/edit).How to get Google Credentials (Detailed Steps):
Getting the necessary Google credentials involves interacting with the Google Cloud Platform. Follow these steps carefully:
.env.local:"client_email" value. Copy this entire email address (e.g., waitlist-sheet-updater@your-project-id.iam.gserviceaccount.com) and paste it as the value for GOOGLE_SERVICE_ACCOUNT_EMAIL in your .env.local file."private_key" value. Copy the entire string starting from -----BEGIN PRIVATE KEY----- all the way to -----END PRIVATE KEY-----\n..env.local file for the GOOGLE_PRIVATE_KEY variable, you MUST replace all the literal newline characters (\n within the key string itself in the JSON file) with the two characters \ and n. It should look like one long line in your .env.local file, containing \n where the line breaks were.
Example: -----BEGIN PRIVATE KEY-----\nMIIEvgIBADANBg...YourKey...\n...MoreKey...\n-----END PRIVATE KEY-----\n becomes GOOGLE_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----\nYourKey...\n...MoreKey...\n-----END PRIVATE KEY-----\nhttps://docs.google.com/spreadsheets/d/1aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPq/edit#gid=0./d/ and /edit is your Sheet ID (in the example: 1aBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPq).GOOGLE_SHEET_ID in your .env.local file.waitlist-sheet-updater@your-project-id.iam.gserviceaccount.com).Now your .env.local file should be correctly configured with the necessary credentials.
Run the development server:
bash
pnpm dev
Open http://localhost:3000 in your browser.
Build the application for production:
bash
pnpm build
Run the production server:
bash
pnpm start
Lint the codebase:
bash
pnpm lint
Vercel is a platform optimized for deploying Next.js applications. You can deploy this project with a single click:
Alternatively, follow the manual steps below:
https://github.com/dambrubaba/google-sheet-waitlist).pnpm build), and Output Directory. You typically don't need to change these..env.local file:GOOGLE_SERVICE_ACCOUNT_EMAILGOOGLE_PRIVATE_KEY (Paste the full key value here, including the \n replacements)GOOGLE_SHEET_IDYour waitlist page is now live! Any emails submitted will be added to your configured Google Sheet.
If you find this project helpful, consider buying me a coffee! Your support helps me maintain and improve this project.
$ claude mcp add google-sheet-waitlist \
-- python -m otcore.mcp_server <graph>