Starter template for Gel and Next.js. It includes a basic Gel schema and a UI to get you started.
This starter is designed to help you get up and running with Gel and Next.js quickly. It includes a basic Gel schema and a UI to get you started. Below you can find the steps to set up the project and start building your app as well as some ideas for extending it further.
This template includes:
.├── README.md├── app│ ├── favicon.ico│ ├── globals.css│ ├── layout.tsx│ └── page.tsx├── components/├── src/├── public/├── dbschema│ ├── default.esdl├── gel.toml├── eslint.config.js├── next-env.d.ts├── next.config.js├── package.json├── pnpm-lock.yaml├── postcss.config.js├── tailwind.config.ts└── tsconfig.json
Directory structure:
app/
public/
components/
src/
dbschema/
gel.toml
gel.ts
eslint.config.js
next-env.d.ts
next.config.js
package.json
pnpm-lock.yaml
postcss.config.js
tailwind.config.ts
tsconfig.json
To get started with this template, you need to:
git clone https://github.com/geldata/nextjs-gel-basic-template.gitcd nextjs-gel-basic-templatepnpm i
You can also click the "Use this template" button to create a new repository based on this template.
You can just use
npx gel
This README will use
npx gel <command>
gel <command>
curl --proto '=https' --tlsv1.2 -sSf https://sh.geldata.com | sh
For more installation options, see the Gel installation guide.
To run this project, you need to initialize a new Gel project. Run the following command:
npx gel project init
This template includes a script to generate TypeScript types from the Gel schema. Run the following command:
pnpm generate:all
pnpm dev
Follow the instructions in the terminal to open the app in your browser.
To view the database in the Gel UI run:
npx gel ui
Open the
dbschema/default.gel
Post
title
content
type Post {# Add your new fields here:required title: str;required content: str;}
Open the
app/page.tsx
const postsQuery = e.select(e.Post, (_post) => ({id: true,title: true,content: true,// Add your other fields here}))
Explore a list of resources to help you get started with Gel and Next.js:
To learn more about Next.js, take a look at the following resources:
You can also check out the Gel documentation to learn more about Gel and Gel Auth.
Follow the deployment instructions in the Gel documentation to deploy your Next.js app to Gel Cloud and Vercel.
Or
Starter template for Gel and Next.js. It includes a basic Gel schema and a UI to get you started.
This starter is designed to help you get up and running with Gel and Next.js quickly. It includes a basic Gel schema and a UI to get you started. Below you can find the steps to set up the project and start building your app as well as some ideas for extending it further.
This template includes:
.├── README.md├── app│ ├── favicon.ico│ ├── globals.css│ ├── layout.tsx│ └── page.tsx├── components/├── src/├── public/├── dbschema│ ├── default.esdl├── gel.toml├── eslint.config.js├── next-env.d.ts├── next.config.js├── package.json├── pnpm-lock.yaml├── postcss.config.js├── tailwind.config.ts└── tsconfig.json
Directory structure:
app/
public/
components/
src/
dbschema/
gel.toml
gel.ts
eslint.config.js
next-env.d.ts
next.config.js
package.json
pnpm-lock.yaml
postcss.config.js
tailwind.config.ts
tsconfig.json
To get started with this template, you need to:
git clone https://github.com/geldata/nextjs-gel-basic-template.gitcd nextjs-gel-basic-templatepnpm i
You can also click the "Use this template" button to create a new repository based on this template.
You can just use
npx gel
This README will use
npx gel <command>
gel <command>
curl --proto '=https' --tlsv1.2 -sSf https://sh.geldata.com | sh
For more installation options, see the Gel installation guide.
To run this project, you need to initialize a new Gel project. Run the following command:
npx gel project init
This template includes a script to generate TypeScript types from the Gel schema. Run the following command:
pnpm generate:all
pnpm dev
Follow the instructions in the terminal to open the app in your browser.
To view the database in the Gel UI run:
npx gel ui
Open the
dbschema/default.gel
Post
title
content
type Post {# Add your new fields here:required title: str;required content: str;}
Open the
app/page.tsx
const postsQuery = e.select(e.Post, (_post) => ({id: true,title: true,content: true,// Add your other fields here}))
Explore a list of resources to help you get started with Gel and Next.js:
To learn more about Next.js, take a look at the following resources:
You can also check out the Gel documentation to learn more about Gel and Gel Auth.
Follow the deployment instructions in the Gel documentation to deploy your Next.js app to Gel Cloud and Vercel.
Or