Skip to content
MuhammadHassan03Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Devisyn website

Multi-page marketing site for Devisyn, an AI automation studio. Next.js (App Router) + TypeScript + CSS Modules. No UI or animation library, no database. Design rationale and the design system are in REDESIGN.md.

Pages: / home, /solutions, /industries, /industries/[slug] (one template, four industries), /how-we-work, /about, /contact (Book a Workflow Assessment), /privacy, /terms.

Run it

npm install
cp .env.example .env.local   # optional, see below
npm run dev                  # http://localhost:3000
npm run build && npm start   # production check

Lead delivery (contact form)

Every submission goes to app/api/lead/route.ts, which validates it, rate-limits it (5 per 10 minutes per IP), and runs two deliveries in parallel: a row in your Google Sheet and an email to you. The visitor sees success if at least one worked. If both fail they see your email address as a fallback. With neither configured (local dev) the lead is logged to the server console instead.

Environment variables

Put these in .env.local for local work and in Vercel (Project Settings, Environment Variables) for production. Never paste keys into chat or commit them. .env.example lists them all.

Name Required What it does
RESEND_API_KEY For email Resend API key (setup below).
LEAD_TO_EMAIL For email Where leads are emailed: devisynstudio@gmail.com.
LEAD_FROM_EMAIL No Sender. Defaults to Devisyn Leads <onboarding@resend.dev>. When you own a domain, verify it in Resend and change only this line.
SHEET_WEBHOOK_URL For the sheet The Apps Script Web app URL (setup below).
SHEET_WEBHOOK_SECRET For the sheet The same random string you put in the script's SECRET property.
SHEET_URL No Link to the sheet, shown as a button in the lead email.

1. Google Sheet (free)

  1. Go to sheets.google.com, signed in as devisynstudio@gmail.com, and create a blank sheet named Devisyn Leads. Copy its URL for SHEET_URL.
  2. In the sheet: Extensions > Apps Script.
  3. Delete the sample code and paste the whole of docs/google-sheet-lead-script.gs. Click Save.
  4. Click the gear (Project Settings), scroll to Script properties, click Add script property. Name SECRET, value a long random string (for example 40 random letters and digits from a password manager). Save. Use the same string for SHEET_WEBHOOK_SECRET.
  5. Click Deploy > New deployment, the gear next to "Select type", choose Web app. Set Execute as: Me and Who has access: Anyone. Click Deploy and approve the permissions (Google shows "unverified app" for your own script: Advanced > Go to project).
  6. Copy the Web app URL (ends in /exec) into SHEET_WEBHOOK_URL. Opening it in a browser should show {"ok":true,"service":"devisyn lead webhook"}.
  7. If you edit the script later, use Deploy > Manage deployments > edit > New version, otherwise the URL keeps running the old code.

The script creates a Leads tab with the columns Date, Name, Business, Type, Email, Phone, Source / UTM, Page, Status (starts as "New"), Notes. The visitor's optional message goes into Notes. Requests without the secret are rejected.

Already deployed the script before the redesign? Paste the updated docs/google-sheet-lead-script.gs and publish a new version (step 7), otherwise Notes stays empty. The message still arrives by email either way.

2. Email with Resend (free tier)

  1. Sign up at resend.com with devisynstudio@gmail.com (the default sender only delivers to the account owner's email).
  2. In the dashboard open API Keys > Create API Key, permission Sending access, and copy the key (starts with re_). It is shown once. Put it in RESEND_API_KEY.
  3. Leads arrive from Devisyn Leads <onboarding@resend.dev> with subject New lead: {business} ({type}). Reply goes to the lead (reply_to).

Switching to your own domain later: add the domain in Resend, add the DNS records it shows, then set LEAD_FROM_EMAIL=Devisyn Leads <leads@yourdomain.com>. No code change.

3. Optional: Google Analytics

If GA4 is installed on the page (window.gtag), a successful submission fires the generate_lead event with the business type and UTM tags. Nothing happens if GA is not there.

Site URL and booking link

Name What it does
NEXT_PUBLIC_SITE_URL The public URL. Canonical tags, sitemap, robots, Open Graph, JSON-LD and llms.txt all read it, so moving to a new domain is this one variable (then redeploy). Defaults to https://devisyn.vercel.app.
NEXT_PUBLIC_BOOKING_URL Optional. When set, the Contact page offers "Choose a slot in our calendar" next to the form. Unset, the link is hidden.

Founder section

The founder introduction appears on the About page only, as text (no photo). Edit it in founder in content/site.ts. Set founder.linkedin to show the LinkedIn link; empty hides it.

What is captured per lead

Name, business, industry, email, phone (optional), message (optional), page URL, referrer, utm_source / utm_medium / utm_campaign (remembered from the landing URL for the visit), user agent, and an optional message about their workflow, and a timestamp in Europe/London.

Where things live

  • content/: every word of copy. site.ts (global, nav, contact form, founder, legal), home.ts, solutions.ts, industries.ts (add an industry here and its page, nav links, sitemap and JSON-LD follow), process.ts, demos.ts (simulated demo scripts).
  • styles/tokens.css: colours, type scale, spacing, radii, motion. styles/globals.css: base styles, layout and type primitives, scroll reveals.
  • components/ui/: primitives (Button, Logo, SectionHead, JsonLd, RevealObserver). components/layout/: header, footer, page intro, closing CTA. components/home/, components/demos/, components/industry/, components/shared/, components/forms/.
  • app/api/lead/route.ts: form endpoint with honeypot and rate limit. Validation in lib/leadSchema.ts is shared with the browser.
  • SEO: per-page metadata, app/sitemap.ts, app/robots.ts, app/llms.txt/route.ts, app/opengraph-image.tsx (generated card), lib/jsonld.ts (Organization, Service, FAQPage, BreadcrumbList). See SEO-NOTES.md for crawler research.

Motion is CSS only. Every animation is disabled under prefers-reduced-motion, and reveal effects only apply when JavaScript runs.

Deploy to Vercel

  1. Push the repo to GitHub and import it at vercel.com/new (framework is detected automatically).
  2. Add the three env vars above under Project Settings, Environment Variables.
  3. Deploy. If the domain is not devisyn.vercel.app, set NEXT_PUBLIC_SITE_URL (see below).
  4. After deploy: test the form, run the Rich Results Test, submit /sitemap.xml in Google Search Console and Bing Webmaster Tools.

Checks

Command What it checks
npm run lint TypeScript across the project.
npm test Unit tests (Node's built-in runner, no extra dependencies): form validation, lead delivery and rate limiting, voice-demo helpers, the content behind every section, sitemap, robots, llms.txt and structured data.
npm run test:smoke With the site running (npm run dev, or BASE_URL=... npm run test:smoke): loads every page, checks each section is rendered, every internal link returns 200, the API rejects bad input and unknown pages 404.
npm run build Production build. All pages are statically generated except /api/lead.

Voice demo audio

The voice receptionist demo has a "Play with sound" button. It plays a UK ring tone (Web Audio) and reads the call aloud with the browser's built-in speech voices (Web Speech API), choosing two different British voices for the assistant and the caller where available. No audio files or services are involved. Browsers only allow sound after a click, so the demo plays silently until the visitor turns sound on. The helpers are in lib/voice.ts and lib/useCallAudio.ts.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages