- ✅ Created
.env.localwith Postgres connection variables - ✅ Fixed API route to handle missing MailerLite API key gracefully
- ✅ Added detailed error logging
You MUST create the database tables in Neon dashboard:
- Go to https://console.neon.tech
- Open your database project
- Click on SQL Editor
- Copy and paste this SQL:
-- Table for early access submissions
CREATE TABLE IF NOT EXISTS early_access_submissions (
id SERIAL PRIMARY KEY,
email TEXT UNIQUE NOT NULL,
company_name TEXT,
job_title TEXT,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
-- Table for contact form submissions
CREATE TABLE IF NOT EXISTS contact_submissions (
id SERIAL PRIMARY KEY,
name TEXT,
email TEXT,
subject TEXT,
message TEXT,
created_at TIMESTAMP DEFAULT NOW()
);
-- Create indexes
CREATE INDEX IF NOT EXISTS idx_early_access_email ON early_access_submissions(email);
CREATE INDEX IF NOT EXISTS idx_contact_email ON contact_submissions(email);- Click Run or press Ctrl+Enter
- Verify tables were created (you should see success message)
IMPORTANT: Next.js only reads .env.local on startup. You MUST restart:
# Stop the current dev server (Ctrl+C)
npm run dev
# or
pnpm devAfter restarting, when you submit the form, check the terminal where npm run dev is running. You should see:
Received submission: { email: '...', companyName: '...', ... }Existing record check: 0(or 1 if email exists)Inserted new recordorUpdated existing recordSubmission processed successfully
If you see database errors, the tables weren't created properly.
Solution: You haven't created the database tables yet. Follow Step 1 above.
Solution: Check that .env.local has the correct POSTGRES_URL from Neon dashboard.
Solution: This is now handled gracefully - the form will still work, just won't add to MailerLite.
- Open http://localhost:3000
- Open the early access modal
- Fill in the form and submit
- Check the browser console (F12) for any errors
- Check the terminal running
npm run devfor detailed logs - If successful, you should see "Thank you for your interest!" message