How to create 700+ SEO optimised pages for website in 1 h using Next.JS, OpenAI, Postgres
Tags: openai, seo, postgres, react
Published: 2023-06-08 16:37:27


Small intro, I started learning coding couple of months before and since then experimenting with different small side projects. 

So this I show coding still looks for me:)

![Cat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mjuzy93e4q84nw3pdjik.gif)

Follow my journey on Twitter https://twitter.com/shnai0

## What did I build this time? 


I built the new side project Startup Funding startupfunding.to - generated lists of funds and investors for different countries, rounds, and industries. It can help founders  obtain the list of investors faster.


![StartupFunding visual](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ug8remhbal3dabxjnh6j.gif)

Before I started learning how to code I was discovering SEO game and used no-code tools and website builders to multiply pages.

As I learnt how to build website it looked super interesting, if I can multiply pages faster by coding.  

This project was a perfect fit for it as multiply pages can be simply based on different countries and funding rounds: 
- startupfunding.to/india
- startupfunding.to/seed-uk
- startupfunding.to/pre-seed-sweden
- ...

## How did I multiply 1 page in 700? 

This is my step by step instruction: 

### 1. Find right keywords in Semrush


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tkgaaikl9rw2a01oi8xb.png)

### 2. Build the page with variables from the database 

Here are 4 variables which change: 
slug 
country
header
meta

Meta is super important every page should have different meta for google to identify the difference.

```tsx
return (
    <>
      <Head>
        <title>Investors for startups</title>
        <meta name="viewport" content="width=device-width, initial-scale=1" />

        <meta name="description" content={page.meta} />
        <meta property="og:site_name" content="startupinvestors.vercel.app" />
        <meta property="og:description" content="Startup funding" />

        <meta name="StartupFunding:card" content="summary_large_image" />
        <meta property="og:image" content="/cover.png" />
      </Head>

      <div className="flex flex-col min-h-screen justify-between bg-slate-900">
        <main className="h-full bg-slate-900">
          <nav className="bg-black text-white ">
            <div className="px-5">
              <div className="max-w-5xl mx-auto">
                <div className="flex justify-between items-center h-16 ">
                  <div className="flex items-centertext-base ">
                    <a
                      target="_blank"
                      href="/"
                      rel="noreferrer"
                      className="text-white flex max-w-fit items-center justify-center space-x-2 text-xl"
                    >
                      <p>Startup investors</p>
                    </a>
                  </div>
                </div>
              </div>
            </div>
          </nav>
          <section className="py-10 lg:py-20 bg-slate-900">
            {/* bg-[url('/image1.svg')] */}
            <div className="px-4">
              <div className="max-w-5xl mx-auto">
                <div className="w-full mx-auto">
                  <h1 className="text-6xl text-center font-bold pb-1 text-white ">
                    {page.header}
                  </h1>
                  <p className="mt-3 mb-10 text-center text-white">
                    Raise capital with help of AI generated list of investors{" "}
                    <br />
                  </p>
                  <div className="max-w-5xl mx-auto px-8 lg:px-28">
                    <div className="max-w-5xl mx-auto">
                      <div className="w-full my-1 mx-auto "></div>

                      <div className="w-full my-1 mx-auto">
                        <div className="flex space-x-4">
                          {" "}
                          {/* Add this wrapper div with flex and space-x classes */}
                          <div className="w-full ">
                            {" "}
                            {/* Add w-1/2 class to the parent div */}
                            <CountrySelect
                              country={country}
                              setCountry={setCountry}
                              slug={page.country}
                            />
                          </div>
```

![Variable changing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6joqauzoj9uyl4ghzt5n.png)

![Varibale changing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szw7s8ljhgcg3dj1fl1t.png)


### 3. Generate CSV file for 700 pages with ChatGPT 

Next step is to  fill in database. I used chatgpt for generating the content. 

![Generation of CSV file with ChatGPT](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fs5fdq777tng25pt93id.png)

Further I moved the data to Excel so I have my CSV file ready 

This actually took most of the time. 


### 4. Connect TablePlus with my CSV and Postgres database

As I am using Postgres in Railway, I connected Table Plus with imported inside data for 730 pages. 

![TablePlus](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mytxhli07duyn6mhwwzr.png)

### 5. Check that  all pages are indexed in Google Search Console

![Indexing in GSC](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfar3iy5zn9tgh8gn5zf.png)

If you are building new website it maybe will be a manual work to index pages in the beginning. And there is also limit for indexing request per day. (I am still on it) 

If you know how to speed this up, appreciate the advice:) 

### Result: 730 pages in 1 hour
You can find this pages by changing slug practically on each country.


![Seed India](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6hy073b23kq9ax12dqj8.png)


Check these different pages examples: 
www.startupfunding.to/india
www.startupfunding.to/seed-india
www.startupfunding.to/pre-seed-india


## Asking for a friend: help me reach 1000 ⭐️⭐️

![Cat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p85sbwzpwa46p67rbdzh.gif)

I am on the new challenge to grow Papermark.io on GitHub to 1000 stars in 1 month.
 
papermark.io - open source alternative to Docsend


https://github.com/mfts/papermark

### The project is close to my heart for 2 reasons: 
1. I started coding only because availability of Open Source projects, either I think I would never attempt it. 
2. I was raising capital before and always looking for cool alternative to Docsend for sending Pitchdeck.