SR-22 Insurance Now
Features
Campaign owners need fast, dynamic, and conversion-focused websites to maximize ROI from ad campaigns.
Dynamic Landing Pages: Generated from a flexible JSON structure for quick deployment.
Click-to-Call Ads: Location-based phone numbers to boost conversions.
Auto-Complete Google Place API: Enhances user experience and reduces friction.
Image Optimization: Ensures lightning-fast load speeds.
Google Analytics Integration: Tracks performance for data-driven decisions.
Custom Components: Built from scratch for full flexibility and scalability.
Mobile Optimization & Accessibility: Ensures seamless experiences for all users.
Dynamic Content: JSON-driven landing pages tailored for campaigns.
Performance Optimization: WebP images and lazy loading for faster pages.
SEO & Analytics: Designed to convert traffic into leads while tracking every interaction.
Project Overview
A comprehensive SR22 insurance platform built with Next.js 13 that helps users understand SR22 requirements and connect with insurance providers.
Architecture
This is a Next.js 13 application with React 18, utilizing a content-driven approach where SR22 information, provider details, and location-specific content are managed through JSON files and utility modules for scalability and SEO optimization.
Technology Stack
Frontend Framework:
- Next.js 13.5.11 - React framework with SSR/SSG capabilities
- React 18.2.0 - Modern React with concurrent features
- Sass 1.64.1 - CSS preprocessor for advanced styling
- Sharp 0.34.1 - High-performance image processing
Development & Build Tools:
- Bundle Analyzer - Performance optimization and bundle analysis
- Cross-env - Cross-platform environment variables
- PM2 - Production process management (Digital Ocean deployment)
Utilities & Libraries:
- Axios 1.5.0 - HTTP client for API calls
- Lodash 4.17.21 - JavaScript utility library
- Prop Types - Runtime type checking
Root Directory Structure
sr2023/
βββ src/ # Main source code
β βββ components/ # Reusable UI components (53 components)
β βββ pages/ # Next.js pages (34+ pages)
β βββ utils/ # Utilities and content management
β βββ wrapper/ # Layout wrappers
β βββ hooks/ # Custom React hooks (7 hooks)
β βββ context/ # React context providers
β βββ apis/ # API integration layer
β βββ lib/ # External library configurations
β βββ assets/ # Static assets and images
β βββ styles/ # Global styles and SCSS
βββ content/ # Content management
β βββ SR22Content.json # Comprehensive SR22 content database
βββ public/ # Public static files
β βββ favicon.ico
β βββ sitemap.xml
β βββ robots.txt
βββ .next/ # Next.js build output
βββ node_modules/ # Dependencies
βββ package.json # Project dependencies and scripts
βββ next.config.js # Next.js configuration with rewrites/redirects
βββ jsconfig.json # JavaScript configuration
βββ build-deploy.sh # Deployment script
βββ bitbucket-pipelines.yml # CI/CD pipeline
βββ .env # Environment variables
βββ README.md # Project documentationDetailed Source Structure
Pages Architecture (src/pages/)
Comprehensive Next.js routing with 34+ pages for SR22 services:
pages/
βββ _app.js # Global app wrapper
βββ _document.js # Custom document structure
βββ _index.js # Index redirect
βββ 404.js # Custom 404 page
βββ home/ # Homepage
βββ [providerSlug]/ # Dynamic insurance provider pages
β βββ index.js # Main provider page
β βββ [citySlug].js # Provider city pages
β βββ [...otherSlug].js # Additional provider routes
βββ location/ # Location-based pages
β βββ [stateSlug]/ # State-specific SR22 info
β βββ [stateSlug]/[citySlug]/ # City-specific SR22 services
βββ api/ # API routes
β βββ contact.js # Contact form API
β βββ business.js # Business listing API
β βββ location.js # Location services API
β βββ sitemap.js # Dynamic sitemap generation
βββ sr22-insurance-quotes/ # Quote request functionality
βββ what-is-sr22/ # SR22 education pages
βββ sr22-cost/ # Cost information
βββ sr22-faq/ # Frequently asked questions
βββ sr22-by-state/ # State-specific requirements
βββ sr22-providers/ # Insurance provider directory
βββ sr22-bond/ # SR22 bond information
βββ non-owner-sr22/ # Non-owner SR22 insurance
βββ fr44-insurance/ # FR44 (Virginia/Florida) insurance
βββ bac-calculator/ # Blood alcohol calculator
βββ dui-terms/ # DUI terminology guide
βββ list-your-business/ # Provider registration
βββ contact-us/ # Contact page
βββ thank-you/ # Form submission confirmation
βββ privacy-and-terms/ # Legal pages
βββ do-not-sell-my-data/ # Privacy compliance
βββ how-it-works/ # Process explanation
βββ why-use-our-service/ # Value proposition
βββ lp/ # Landing pages
βββ lp1/ # Landing page variant 1
βββ lp11/ # Landing page variant 11
βββ lp1e/ # Landing page variant 1e
βββ lpe/ # Landing page variant eComponents Library (src/components/)
Extensive component library with 53+ reusable components:
components/
βββ Accordion/ # FAQ and content accordions
βββ Autocomplete/ # Location autocomplete
βββ BlogCard/ # Blog post cards
βββ BusinessForm/ # Provider registration form
βββ Button/ # Standard button components
βββ ButtonLP/ # Landing page specific buttons
βββ CalculatorForm/ # BAC calculator form
βββ Checkbox/ # Form checkbox inputs
βββ CircleLoader/ # Loading indicators
βββ ConfirmationPopup/ # Modal confirmations
βββ ContactUsForm/ # Contact form component
βββ Dropdown/ # Select dropdown components
βββ FeatureCard/ # Feature highlighting cards
βββ Footer/ # Site footer with links
βββ Header/ # Site header and navigation
βββ HeroHome/ # Homepage hero section
βββ HeroHomeLP/ # Landing page hero variants
βββ Image/ # Optimized image component
βββ Input/ # Form input components
βββ ListingCard/ # Provider listing cards
βββ Loader/ # Various loading states
βββ Modal/ # Modal dialog component
βββ ProviderCard/ # Insurance provider cards
βββ QuoteForm/ # Quote request forms
βββ Rating/ # Star rating component
βββ SearchBox/ # Search functionality
βββ SeoHead/ # SEO meta tags
βββ ServiceCard/ # Service offering cards
βββ Sidebar/ # Navigation sidebar
βββ StateCard/ # State-specific info cards
βββ Tag/ # Content tags
βββ TestimonialCard/ # Customer testimonials
βββ Text/ # Typography components
βββ TrustedBy/ # Trust indicators
βββ ZipCodeForm/ # ZIP code input forms
βββ [20+ additional components]/Content Management (content/ & src/utils/Content/)
Centralized content management system:
content/
βββ SR22Content.json # Comprehensive SR22 content database (493KB)
βββ INSURANCE # SR22 insurance information
βββ PROVIDERS # Insurance provider details
βββ LOCATIONS # State/city specific content
βββ FAQ # Frequently asked questions
βββ GUIDES # Educational content
βββ LEGAL # Legal and compliance content
src/utils/Content/
βββ PageContent.js # Page content utilities
βββ LocationContent.js # Cities, states, service areas
βββ FeatureContent.js # Feature descriptions
βββ [additional content modules]Utilities & Configuration (src/utils/)
utils/
βββ Content/ # Content management (above)
βββ SEOMapping.js # Dynamic SEO metadata
βββ States.js # US states data
βββ CommonUtils.js # Shared utility functions
βββ Constant.js # Application constants
βββ RandomDescription.js # Dynamic content generationCustom Hooks (src/hooks/)
hooks/
βββ [7 custom React hooks for:
βββ - Location detection and management
βββ - Form handling and validation
βββ - SEO management
βββ - Content fetching and parsing
βββ - State management
βββ - API integration
βββ - User interaction tracking]Layout Wrappers (src/wrapper/)
wrapper/
βββ index.js # Wrapper exports
βββ AppLayoutWrapper/ # Main app layout
βββ PageWrapper/ # Individual page wrapper
βββ LandingPageWrapper/ # Landing page specific layout
βββ ProviderWrapper/ # Provider page layoutAPI Integration (src/apis/)
apis/
βββ index.js # API exports
βββ commonAPI.js # Shared API functions
βββ contactAPI.js # Contact form submissions
βββ locationAPI.js # Location services
βββ [additional API modules]Key Features & Functionality
SR22 Insurance Platform Features
- Comprehensive SR22 education with detailed guides and FAQs
- State-specific requirements for all 50 states
- Insurance provider directory with 20+ major insurers
- Quote request system for connecting users with providers
- Location-based services for local SR22 requirements
- DUI/DWI recovery resources and tools
Content-Driven Architecture
- JSON-based content management in SR22Content.json (493KB of content)
- Dynamic page generation for providers, locations, and guides
- SEO-optimized content with dynamic meta tags and structured data
- Educational resources covering all aspects of SR22 requirements
Location & Provider Services
- 50-state coverage with specific requirements and laws
- City-level content for major metropolitan areas
- Provider comparison tools and information
- Local agent finder functionality
- State-specific forms and requirements
User Tools & Calculators
- BAC (Blood Alcohol Content) calculator
- SR22 cost estimator tools
- Quote comparison functionality
- DUI terms glossary
- Timeline calculators for license reinstatement
SEO & Performance
- Dynamic sitemap generation for all pages
- State and city-specific SEO optimization
- Rich snippets and structured data
- Bundle optimization with analyzer
- Server-side rendering for better indexing
Business Features
- Provider registration system
- Lead generation through quote forms
- Contact management system
- Business listing functionality
- Compliance tools for privacy regulations
Development Workflow
Available Scripts
# Development
npm run dev # Start development server
# Building
npm run build # Production build
npm run start # Start production server
npm run export # Static export
# Analysis & Quality
npm run lint # ESLint code quality
npm run analyze-build # Bundle size analysis
# Deployment
npm run deploy # Run deployment script
sh build-deploy.sh # Manual deployment to Digital OceanDigital Ocean Deployment Process
# SSH to Digital Ocean droplet
ssh user@server
# Navigate to project
cd sr2023
# Pull latest changes
git pull origin master
# Build application
npm run build
# Restart PM2 process
pm2 restart sr23Environment Setup
- Prerequisites: Node.js 18+, npm, PM2 (for production)
- Installation:
npm install - Environment: Configure
.envfile - Development:
npm run dev - Access:
http://localhost:3000
Content Management
SR22Content.json Structure
The main content file (493KB) contains:
{
"INSURANCE": {
"what_is_sr22": {
"title": "What is SR-22 Insurance?",
"content": "Educational content...",
"topics": [
// Detailed topic breakdown
]
}
},
"PROVIDERS": {
// Insurance provider information
},
"LOCATIONS": {
// State and city specific content
}
}Adding New Content
- SR22 Guides: Edit
SR22Content.jsonINSURANCE section - Providers: Add to PROVIDERS section with images and details
- Locations: Update LOCATIONS for new states/cities
- SEO: Update
SEOMapping.jsfor new pages
Next.js Configuration Highlights
Rewrites & Redirects
// Blog redirect to external domain
{
source: "/blog/:path*",
destination: "https://sr22insurancenow.com/blog/:path*"
}
// SEO-friendly redirects
{
source: "/about-sr22",
destination: "/what-is-sr22",
statusCode: 301
}Bundle Analysis
- Integrated @next/bundle-analyzer for performance monitoring
- Image optimization with Sharp
- Sass support for advanced styling
SEO Strategy
Content SEO
- 50+ state-specific pages for local SEO
- Provider-specific content for brand searches
- Educational content for informational queries
- FAQ sections for long-tail keywords
Technical SEO
- Dynamic meta tags based on content
- Structured data for insurance providers
- XML sitemap generation
- Optimized URL structure for SEO
Deployment & CI/CD
Bitbucket Pipelines
- Automated builds on code push
- Quality checks and linting
- Digital Ocean deployment integration
Production Infrastructure
- Digital Ocean Droplet hosting
- PM2 process management for reliability
- Git-based deployment workflow
- SSL certificate management
Business Logic
Lead Generation Flow
- User education through comprehensive guides
- ZIP code collection for location targeting
- Quote form submission to partner providers
- Provider matching based on location and needs
- Follow-up communication through contact system
Provider Network
- 20+ major insurance companies represented
- State-specific availability tracking
- Provider comparison tools
- Business registration system for new providers
Compliance & Legal
Privacy Compliance
- CCPA compliance with do-not-sell functionality
- Privacy policy and terms of service
- Data handling procedures
- User consent management
Insurance Regulations
- State-specific requirements accuracy
- Disclaimer management for legal protection
- Provider licensing verification
- Compliance monitoring tools
Performance Optimizations
Next.js Features
- Static Site Generation (SSG) for content pages
- Server Side Rendering (SSR) for dynamic content
- Image optimization with Next.js Image and Sharp
- Code splitting for optimized loading
- Bundle analysis for performance monitoring
Content Optimizations
- Lazy loading for images and components
- Content caching strategies
- Optimized JSON content structure
- Minimal JavaScript for critical pages
Technology Highlights
Modern Stack Benefits
- Next.js 13 with improved performance and features
- React 18 with concurrent features
- Sass for maintainable styles
- JSON-driven content for non-developer updates
Scalability Features
- Component-based architecture with 53+ components
- Content separation from code logic
- API-ready structure for future integrations
- Modular design for easy feature additions
Project: SR22 Insurance Platform
Industry: Insurance / Financial Services
Framework: Next.js 13 + React 18
Deployment: Digital Ocean with PM2
Content: 493KB comprehensive SR22 database
Coverage: 50 states + 20+ insurance providers









