Skip to content

cbmak75/lawyery-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lawyery Website

The public website for Lawyery Limited, a UK immigration law firm regulated by the Solicitors Regulation Authority. The site lives at www.lawyery.co.uk and covers the firm's immigration, employment, and professional disciplinary work.

This repository is public so that the firm's clients, referrers, and the wider legal community can see what sits behind the site. The code is open to read; the brand, content, images, and firm identity are not licensed for reuse (see LICENSE).

Stack

The site is a Vite-built React single page application with build-time pre-rendering so every public route ships as a static HTML file. Hosting is on Netlify, forms write through a Supabase edge function, and images are served from Supabase Storage with a local fallback.

  • React 18 with TypeScript
  • React Router 7 for routing
  • Tailwind CSS for styling, with a custom pop-art palette
  • Vite 5 for bundling and local dev
  • Playwright for pre-rendering (prerender.mjs)
  • Netlify for hosting, domain, and redirects
  • Supabase for the contact form edge function and image storage
  • Google Analytics 4 with UK GDPR / PECR consent mode

Getting started

Clone the repo, install dependencies, and run the dev server.

git clone https://github.com/cbmak75/lawyery-website.git
cd lawyery-website
npm install
npm run dev

Vite will start on http://localhost:5173 by default.

Environment variables

The site reads two public environment variables at build time. Both are set on Netlify for production builds; locally you can drop them into a .env file (which is gitignored).

Variable Purpose
VITE_SUPABASE_URL Supabase project URL for image storage and edge functions
VITE_SUPABASE_ANON_KEY Supabase anon (public) key. Protected by Row-Level Security on the Supabase side
VITE_GA4_MEASUREMENT_ID Optional. Google Analytics 4 measurement ID

The Supabase anon key is designed to be public; the real protection is RLS on the Supabase side. The email-sending Resend API key is held inside the Supabase edge function environment and is never bundled into the front-end.

Scripts

npm run dev        # Local dev server
npm run build      # Production Vite build into dist/
npm run preview    # Preview the built site locally
npm run lint       # Run ESLint
npm run typecheck  # Type-check without emitting

For the production build Netlify runs:

npm run build && npx playwright install chromium && node prerender.mjs

prerender.mjs spins up the preview server, visits every route listed in its ROUTES array with headless Chromium, and writes the fully-rendered HTML to dist/<route>/index.html. It also writes dist/404.html, which Netlify serves with a real 404 status for any unmatched path.

Project structure

src/
  components/      Shared UI: Navigation, Footer, SEO, schema components
  pages/           One file per top-level route
    services/     (legacy dedicated service pages; currently redirect to /services/{id})
    insights/     Long-form articles under /insights/
  data/            Static content: lawyers, services, insights
  utils/           seoData, analytics, image helpers
  lib/             Supabase client
public/            Static assets, robots.txt, sitemap.xml, _redirects, _headers
supabase/          Edge functions (contact form email via Resend)
prerender.mjs      Pre-render script that fills dist/ with static HTML
netlify.toml       Netlify build config, headers, security policy

SEO notes

Canonical URLs always use the www.lawyery.co.uk host. The sitemap, robots.txt, SEO component, and Open Graph tags are all aligned on the www host.

There is no SPA fallback. Every public URL is pre-rendered to its own static file, and unknown URLs resolve to dist/404.html with a real 404 status. The 404 page is flagged noindex, nofollow.

Older URL shapes (the singular /service/... paths, the bare-root service paths, and a handful of legacy patterns) are handled through 301 redirects in public/_redirects.

Hosting and deployment

Netlify builds and deploys automatically on every push to main. Branch previews are enabled for feature branches.

Domain configuration: www is the primary domain; Netlify redirects apex (lawyery.co.uk) to www.lawyery.co.uk. Do not add a www-to-apex redirect in _redirects as it conflicts with the Netlify domain config.

Further documentation

Contact

For anything relating to the firm itself (instructions, enquiries, complaints) please use the site's own contact page. This repository is not a support channel.

For technical questions about the code, open an issue.

Copyright

Copyright (c) 2026 Lawyery Limited. See LICENSE for terms.

Lawyery Limited is a company registered in England and Wales (company number 13141708) and authorised and regulated by the Solicitors Regulation Authority (SRA ID 8003022).

About

Lawyery Limited — SRA-regulated UK immigration and employment law practice. Skilled worker visas, sponsor licences, settlement, business immigration. Award-winning firm (SRA 8001894).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages