Static SEO analysis, recommendations, and more. Crawls websites at lightning speed, grades performance, and generates AI-powered improvements. Use this template to build your own SEO analysis tool.
Implement a high-performance web crawler using React Server Components for efficient server-side rendering and data processing.
Integrate with Google's Chrome User Experience Report (CrUX) API to fetch and analyze Core Web Vitals metrics for any website.
Leverage Claude AI and Zod for type-safe, structured SEO advice generation based on crawled data and performance metrics.
Welcome to the Cult-SEO repository! This template aims to provide a comprehensive set of tools to parse other URLs, interact with them, and leverage AI for analysis. This project is designed to help you enhance your website's SEO effortlessly, providing you with insights and recommendations based on real data.
Before you begin, ensure you have the following installed on your machine:
Clone the repository:
bashgit clone https://github.com/yourusername/cult-seo.git cd cult-seo
Install dependencies: Using npm:
bashnpm install
Or using pnpm:
<br/>bashpnpm install
To use various APIs, you need to obtain and set up the necessary API keys. Follow these steps to obtain and set up the keys:
Go to the Google Cloud Console:
Create a new project:
Enable the CrUX API:
Create API Credentials:
Set up the API key in your project:
.env.local
file in the root of your project..env.local
file, replacing YOUR_API_KEY
with the API key you copied:
plaintextGOOGLE_CLOUD_CRUX_KEY=YOUR_API_KEY
You only need to set up either the Anthropic API key or the OpenAI API key, not both.
Sign up for Anthropic:
Generate an API Key:
Set up the API key in your project:
.env.local
file, replacing YOUR_ANTHROPIC_API_KEY
with the API key you copied:
plaintextANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY
You only need to set up either the Anthropic API key or the OpenAI API key, not both.
Sign up for OpenAI:
Generate an API Key:
Set up the API key in your project:
.env.local
file, replacing YOUR_OPENAI_API_KEY
with the API key you copied:
plaintextOPENAI_API_KEY=YOUR_OPENAI_API_KEY
Setting up an Upstash Redis API key is optional and can be used for storing and managing data in a Redis database.
Sign up for Upstash:
Create a new Redis database:
Set up the API key in your project:
.env.local
file, replacing YOUR_UPSTASH_REDIS_REST_URL
and YOUR_UPSTASH_REDIS_API_KEY
with the values you copied:
plaintextKV_REST_API_URL=YOUR_UPSTASH_REDIS_REST_URL KV_REST_API_TOKEN=YOUR_UPSTASH_REDIS_API_KEY
Your .env.local
file should look like this:
plaintextGOOGLE_CLOUD_CRUX_KEY=YOUR_GOOGLE_CLOUD_CRUX_KEY ANTHROPIC_API_KEY=YOUR_ANTHROPIC_API_KEY OPENAI_API_KEY=YOUR_OPENAI_API_KEY KV_REST_API_URL=YOUR_UPSTASH_REDIS_REST_URL KV_REST_API_TOKEN=YOUR_UPSTASH_REDIS_API_KEY
If you have set up the Upstash Redis API key, you can configure the database settings in your project. Ensure that the .env.local
file contains the following entries:
plaintextKV_REST_API_URL=YOUR_UPSTASH_REDIS_REST_URL KV_REST_API_TOKEN=YOUR_UPSTASH_REDIS_API_KEY
These values will be used to connect to your Redis database and manage data efficiently.
To start the development server, run:
bashnpm run dev
Or if you are using pnpm:
bashpnpm dev
Open your browser and navigate to http://localhost:3000
to see the application in action.
To create a production build, run:
bashnpm run build
Or if you are using pnpm:
bashpnpm build
After the build is complete, you can start the production server with:
bashnpm start
Or if you are using pnpm:
bashpnpm start
To check your code for linting errors, run:
bashnpm run lint
Or if you are using pnpm:
bashpnpm lint
Here is a detailed overview of the project structure:
cult-seo/
├── app/ # Application files
│ ├── api/ # API routes
│ │ ├── ai-analyze/ # AI analyze related files
│ │ │ ├── prompt.ts # Contains prompt configurations and utilities
│ │ │ ├── route.ts # Handles the routing for the AI analyze endpoint
│ │ │ └── actions.ts # Defines actions and operations for the AI analyze endpoint
│ ├── globals.css # Global CSS styles applied throughout the app
│ ├── icon.ico # Favicon for the application
│ ├── opengraph-image.png # Open Graph image used for social media previews
│ ├── layout.tsx # Main layout file that wraps around all pages
│ ├── page.tsx # Main page component, entry point of the app
│ └── providers.tsx # Providers for context, state management, and other utilities
├── components/ # React components
│ ├── sections/ # Page sections, organized for better structure
│ │ ├── _layout.tsx # Layout for sections
│ │ ├── analyze-with-ai.tsx # Component for analyzing with AI
│ │ ├── og-images.tsx # Component for managing Open Graph images
│ │ ├── seo-score.tsx # Component for displaying SEO score
│ │ ├── web-vitals.tsx # Component for displaying web vitals
│ │ └── website-form.tsx # Component for the website form
│ ├── ui/ # UI components for reusable elements
│ │ ├── animated-number.tsx # Animated number display
│ │ ├── badge.tsx # Badge component
│ │ ├── button.tsx # Button component
│ │ ├── card.tsx # Card component
│ │ ├── gauge.tsx # Gauge component
│ │ ├── icons.tsx # Icon components
│ │ ├── input.tsx # Input field component
│ │ ├── label.tsx # Label component
│ │ ├── loading-button.tsx # Button with loading indicator
│ │ ├── loading-spinner.tsx # Loading spinner component
│ │ ├── logo.tsx # Logo component
│ │ ├── og-social-cards.tsx # Open Graph social cards component
│ │ ├── progress.tsx # Progress bar component
│ │ ├── scroll-area.tsx # Scroll area component
│ │ ├── skeleton.tsx # Skeleton loading component
│ │ ├── sonner.tsx # Sonner notification component
│ │ ├── switch.tsx # Switch component
│ │ ├── table.tsx # Table component
│ │ ├── tabs.tsx # Tabs component
│ │ └── tooltip.tsx # Tooltip component
├── lib/ # Library files for business logic
│ ├── crawl.ts # Functions for web crawling
│ ├── seo.ts # SEO-related utilities and functions
│ ├── types.ts # TypeScript type definitions
│ ├── utils.ts # General utility functions
│ └── web-vitals.ts # Functions for measuring web vitals
├── .env.local # Environment variables (local)
├── .env.local.example # Example environment variables file
├── .gitignore # Git ignore file
├── components.json # Components configuration
├── next-env.d.ts # Next.js TypeScript environment declaration
├── next.config.js # Next.js configuration
├── package.json # Project metadata and dependencies
├── pnpm-lock.yaml # pnpm lock file
├── postcss.config.js # PostCSS configuration
├── README.md # README file
├── tailwind.config.ts # TailwindCSS configuration
└── tsconfig.json # TypeScript configuration
One-time payment, lifetime access
One-time payment, 1 year of updates