Skip to content

guibs-code/amber-landing-page

Repository files navigation

🟑 Amber - Personal Finance Landing Page

A beautiful, secure waitlist landing page for Amber personal finance app, built with Next.js 15, TypeScript, and Tailwind CSS.

🌐 Live Site: ambermoney.co

Amber Landing Page

✨ Features

  • 🎨 Modern Design - Clean, responsive design with custom Gambarino serif font
  • πŸ”’ Enterprise Security - Cloudflare Turnstile CAPTCHA, honeypot fields, server-side validation
  • πŸ“Š Built-in Analytics - Vercel Analytics integration for conversion tracking
  • πŸš€ Optimized Performance - Next.js 15 with image optimization and font loading
  • πŸ“± Mobile-First - Responsive design that works on all devices
  • 🎯 Conversion Focused - Dedicated thank you page with social links

πŸ› οΈ Tech Stack

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • UI Components: shadcn/ui
  • Security: Cloudflare Turnstile
  • Form Handling: Formspark
  • Analytics: Vercel Analytics
  • Deployment: Vercel

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ and pnpm
  • Cloudflare account (for Turnstile)
  • Formspark account (for form handling)

1. Clone and Install

git clone <your-repo-url>
cd amber-landing-page
pnpm install

2. Environment Setup

Create .env.local in the project root:

# Required - Your form handler
FORMSPARK_FORM_ID=your_formspark_form_id

# Required - Cloudflare Turnstile keys
TURNSTILE_SITE_KEY=your_turnstile_site_key
TURNSTILE_SECRET_KEY=your_turnstile_secret_key

3. Security Configuration

Set up Cloudflare Turnstile:

  1. Go to Cloudflare Dashboard
  2. Navigate to "Turnstile" β†’ "Add Site"
  3. Enter your domains:
    • localhost (for development)
    • ambermoney.co (production)
  4. Choose "Invisible" widget type
  5. Copy Site Key and Secret Key to .env.local

Set up Formspark:

  1. Create account at formspark.io
  2. Create a new form
  3. Copy Form ID to .env.local
  4. Configure email notifications in dashboard

4. Run Development Server

pnpm dev

Open http://localhost:3000 to see the landing page.

🌐 Custom Domain Setup

Step-by-Step Domain Configuration

  1. Add Domain in Vercel:

    • Go to your Vercel project dashboard
    • Navigate to Settings β†’ Domains
    • Add both ambermoney.co and www.ambermoney.co
  2. Configure DNS at Your Registrar:

    # For apex domain (ambermoney.co)
    Type: A
    Name: @ (or leave blank)
    Value: 76.76.19.19
    TTL: 300 (or Auto)
    
    # For www subdomain
    Type: CNAME
    Name: www
    Value: cname.vercel-dns.com
    TTL: 300 (or Auto)
    
  3. Update Cloudflare Turnstile:

    • Go to Cloudflare Dashboard β†’ Turnstile
    • Edit your existing widget or create a new one
    • Add these domains to the hostname list:
      • localhost (for development)
      • ambermoney.co (covers www.ambermoney.co automatically)
      • *.vercel.app (for preview deployments)
  4. SSL Certificate:

    • Vercel automatically provisions SSL certificates
    • Your site will be accessible at https://ambermoney.co
    • Certificate renewal is handled automatically

Domain Verification

After DNS propagation (can take up to 48 hours):

  • βœ… https://ambermoney.co should load your site
  • βœ… https://www.ambermoney.co should redirect to apex domain
  • βœ… Form submissions should work with Turnstile
  • βœ… SSL certificate should be valid and auto-renewing

πŸ” Security Features

  • βœ… Cloudflare Turnstile - Invisible CAPTCHA protection
  • βœ… Honeypot Fields - Hidden spam traps
  • βœ… Server-side Validation - Email format and required fields
  • βœ… Rate Limiting - Built into Formspark
  • βœ… CSRF Protection - Via Turnstile tokens
  • βœ… Input Sanitization - Automatic with Formspark

πŸ“Š Analytics & Tracking

Vercel Analytics (Included)

  • Real-time visitor tracking
  • Page views and unique visitors
  • Referral sources and conversion rates
  • 50,000 events/month on free tier

πŸš€ Deployment

Deploy to Vercel (Recommended)

  1. Push to GitHub:

    git add .
    git commit -m "Initial commit"
    git push origin main
  2. Import to Vercel:

    • Go to vercel.com
    • Import your GitHub repository
    • Add environment variables:
      • FORMSPARK_FORM_ID
      • TURNSTILE_SITE_KEY
      • TURNSTILE_SECRET_KEY
  3. Set Up Custom Domain:

    • In Vercel project settings β†’ Domains

    • Add ambermoney.co and www.ambermoney.co

    • Configure DNS records at your domain registrar:

      # For apex domain (ambermoney.co)
      Type: A
      Name: @
      Value: 76.76.19.19
      
      # For www subdomain
      Type: CNAME
      Name: www
      Value: cname.vercel-dns.com
      
  4. Update Turnstile Domain:

    • Add production domain to Cloudflare Turnstile settings:

Alternative Deployment

The app can be deployed to any platform that supports Next.js:

  • Netlify
  • Railway
  • DigitalOcean App Platform

🎨 Customization

Brand Colors

  • Primary: #FEB204 (Amber)
  • Background: #1C1917 (Dark stone)
  • Text: #FEFEFD (Off-white)
  • Secondary: stone-400/500/600 (Grays)

Typography

  • Brand: Gambarino (serif) - loaded from /public/fonts/
  • Body: Inter (sans-serif) - loaded via Google Fonts

Social Links

Update social media links in src/app/thank-you/page.tsx:

// Lines 47-66 - Currently set to:
<a href="https://twitter.com/ambermoney_co" ...>
<a href="https://linkedin.com/company/ambermoney" ...>

// Update these to your actual social media handles

πŸ“ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ api/waitlist/          # Secure form submission endpoint
β”‚   β”œβ”€β”€ thank-you/             # Post-submission thank you page
β”‚   β”œβ”€β”€ globals.css            # Global styles and custom fonts
β”‚   β”œβ”€β”€ layout.tsx             # Root layout with analytics
β”‚   └── page.tsx               # Main landing page
β”œβ”€β”€ components/ui/             # Reusable UI components
β”‚   β”œβ”€β”€ button.tsx
β”‚   β”œβ”€β”€ input.tsx
β”‚   β”œβ”€β”€ card.tsx
β”‚   └── notification.tsx       # Toast notifications
└── lib/
    └── utils.ts               # Utility functions

πŸ› Troubleshooting

Common Issues

Form not submitting:

  • Check browser console for errors
  • Verify environment variables are set
  • Ensure Turnstile script loads

Turnstile not loading:

  • Verify domain is added to Cloudflare settings
  • Check site key is correct
  • Disable ad blockers for testing

Analytics not working:

  • Ensure deployed on Vercel
  • Wait 24 hours for data to appear
  • Check Vercel dashboard

πŸ™ Acknowledgments


Built with ❀️ for the Amber personal finance app.

Releases

No releases published

Packages

No packages published