Sitelet https://github.com/wizelements/Gratog
Skip to content

Latest commit

 

History

1,416 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gratog - Taste of Gratitude

Production web and commerce platform for Taste of Gratitude, the beverage and sea moss brand, with Square payments, product and order flows, automated campaigns, and customer-facing sales experiences.

🚀 Live

Production: https://tasteofgratitude.shop

📋 Overview

Gratog is the full-featured Next.js commerce platform behind Taste of Gratitude's beverage and sea moss sales. It combines payment processing, automated marketing campaigns, and order management for the live brand.

🏗️ Architecture

Frontend

  • Framework: Next.js 14 with TypeScript
  • Styling: Tailwind CSS
  • State: Zustand (if used) or React Context
  • UI Components: Radix UI (extensive)
  • 3D Visualization: Three.js for product previews

Backend

  • API: Next.js API routes
  • Payments: Square SDK
  • Email: Resend
  • SMS: Twilio
  • Scheduling: Vercel Cron Jobs
  • Webhooks: Square webhook handlers

Infrastructure

  • Hosting: Vercel
  • Database: (Configured in env)
  • Caching: (Configured in env)
  • Monitoring: Sentry

🔧 Getting Started

Prerequisites

node 18+
npm or pnpm

Installation

pnpm install

Development

pnpm dev

Build

pnpm build
pnpm start

📦 Environment Variables

Create .env.local with:

# Payments
SQUARE_ACCESS_TOKEN=
SQUARE_APPLICATION_ID=
SQUARE_LOCATION_ID=
SQUARE_ENVIRONMENT=sandbox

# Email
RESEND_API_KEY=

# SMS
TWILIO_ACCOUNT_SID=
TWILIO_AUTH_TOKEN=
TWILIO_PHONE_NUMBER=

# App
NEXT_PUBLIC_APP_URL=https://tasteofgratitude.shop

🔄 Cron Jobs

Automated tasks running on schedule via Vercel Cron:

  • Health Check (every 5 minutes): GET /api/cron/health-check
  • Scheduled Campaigns (every 5 minutes): GET /api/cron/scheduled-campaigns
  • Pickup Reminders (Fridays at 9 AM): GET /api/cron/pickup-reminders
  • Morning Reminders (Saturdays at 8 AM): GET /api/cron/morning-reminders
  • Email Scheduler (hourly): GET /api/quiz/email-scheduler

🧪 Testing

# Unit tests
pnpm test:unit

# E2E tests (Playwright)
pnpm test:e2e:headless

# Smoke tests
pnpm test:smoke

# Lighthouse performance
pnpm lighthouse

📝 API Endpoints

Products

  • GET /api/products - List all products
  • GET /api/products/:id - Get product details
  • POST /api/products - Create product (admin)

Orders

  • POST /api/orders - Create order
  • GET /api/orders/:id - Get order status
  • POST /api/orders/:id/cancel - Cancel order

Payments

  • POST /api/payments - Process payment
  • POST /api/square-webhook - Handle Square webhooks

Campaigns

  • POST /api/campaigns - Create campaign
  • GET /api/campaigns/:id - Get campaign details
  • POST /api/campaigns/:id/send - Send campaign

🚀 Deployment

Deployed on Vercel with:

  • Automatic deploys on main push
  • Preview deploys for PRs
  • Environment variables configured in Vercel dashboard
  • Cron jobs configured in vercel.json

Deploy Status

🛠️ Stack Compliance

✅ Uses official tech stack:

  • ✅ Resend for email
  • ✅ Square for payments
  • ✅ Twilio for SMS
  • ❌ SendGrid (deprecated, removed)

📊 Key Files

File Purpose
vercel.json Deployment config, cron jobs
package.json Dependencies and scripts
app/ Next.js App Router
app/api/ API routes
lib/ Utilities and helpers
public/ Static assets

🤝 Contributing

  1. Clone repository
  2. Create feature branch: git checkout -b feat/your-feature
  3. Make changes and test: pnpm test
  4. Commit: git commit -m "feat: description"
  5. Push: git push origin feat/your-feature
  6. Create Pull Request

📄 License

(Check LICENSE file)

📞 Support

For issues, questions, or suggestions, please create a GitHub issue.


Last Updated: February 2, 2026
Maintainer: Nomolos Sniktaw

Sun Apr 19 03:29:23 EDT 2026 - Push to trigger CI

About

Taste of Gratitude production commerce and operations platform for beverages, sea moss, markets, preorders, and Square payments.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages