Next.jsReactStarter

tina-self-hosted-template — Next.js Starter Template

By IKKEM-Lin

A Next.js-based TinaCMS self-hosted project template that supports local media management, document search, and three Git providers: local, GitLab, and GitHub, with distinct local, SSR, and SSG runtime environments.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

3 previews
Desktop homepage1 / 3
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 3

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-14View source

What stands out

A quick read of the recorded project description.

01

A Next.js-based TinaCMS self-hosted project template

02

Supports three Git providers: local, GitLab, and GitHub

03

Supports a local media manager and the Cloudinary media type

04

Supports document search

05

Distinguishes three environments: local, SSR, and SSG

06

Database can be sqlite, mongodb, or redis

Template Details

This template is a Next.js-based TinaCMS self-hosted project. The README states that it supports a local media manager, document search, and some Git providers (local, GitLab, and GitHub). The project defines three environments: local for developers, ssr for content editors, and ssg for static export deployment.

Developers can run npm i and npm run dev to start the development server, then visit http://localhost:3000 in a browser to view the result, and visit http://localhost:3000/admin/index.html#/graphql for GraphQL debugging. SSR deployment can be done via docker-compose up -d or by running npm run build:ssr followed by npm run start; the content editing entry point is http://localhost:3080/admin/index.html. SSG deployment requires first merging the GIT_COMMIT_BRANCH branch into the main branch, ensuring .env exists and modifying NEXTAUTH_SECRET, then running npm run build:ssg to generate an out folder containing static files.

Environment variables take effect only under SSR or SSG. They cover the Git commit branch and message, Git type (local/gitlab/github) and its corresponding credentials, database type (sqlite/mongodb/redis) and its connection parameters, media type (localMedia/cloudinary), and NEXTAUTH_SECRET. The README does not provide further information about page features, performance, or production readiness.

Next.jsStarter

Is it right for your project?

Use Cases

  • Developers run npm run dev locally for development and GraphQL debugging
  • Content editors edit content via an SSR deployment at /admin/index.html
  • Statically export content to an out folder for SSG deployment
  • Deploy the SSR environment using Docker or npm scripts
  • Switch Git providers and database types via environment variables

Suitable For

  • Next.js projects that need self-hosted TinaCMS
  • Teams that want to use local, GitLab, or GitHub as the content commit source
  • Content sites that need to choose between SSR and SSG deployment
  • Projects that need local media management or Cloudinary media storage

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Development environment: run npm i and npm run dev, then visit http://localhost:3000 to view the result.

  2. 2

    SSR deployment: copy .env.example to .env and modify NEXTAUTH_SECRET, use docker-compose up -d or run npm run build:ssr followed by npm run start; the editing entry point is http://localhost:3080/admin/index.html.

  3. 3

    SSG deployment: merge the GIT_COMMIT_BRANCH branch into the main branch, ensure .env exists and modify NEXTAUTH_SECRET, then run npm run build:ssg to generate the out folder.

  4. 4

    Environment variables take effect only under SSR or SSG; configure the required items for the selected Git type, database type, and media type.

  5. 5

    If you encounter a better_sqlite3.node binding file error, you can manually run npm run postinstall to rebuild and copy it to the project directory.

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in a public repository; the free scope is the code of that version and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, commercially use, and distribute the code of this version for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; they cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
  • GIT_TYPE must be set; the allowed values are local, gitlab, or github, specifying the Git provider used for content commits.
  • When GIT_TYPE=local, GIT_LOCAL_COMMITTER_NAME must be provided.
  • When GIT_TYPE=local, GIT_LOCAL_COMMITTER_EMAIL must be provided.
  • When GIT_TYPE=gitlab, GITLAB_HOST must be provided.
  • When GIT_TYPE=gitlab, GITLAB_PROJECT_ID must be provided.
  • When GIT_TYPE=gitlab, GITLAB_PERSONAL_ACCESS_TOKEN must be provided.
  • When GIT_TYPE=github, GITHUB_OWNER must be provided.
  • When GIT_TYPE=github, GITHUB_REPO must be provided.
  • When GIT_TYPE=github, GITHUB_PERSONAL_ACCESS_TOKEN must be provided.
  • DATABASE_TYPE must be set; the allowed values are sqlite, mongodb, or redis.
  • When DATABASE_TYPE=mongodb, MONGODB_URI must be provided.
  • When DATABASE_TYPE=redis, REDIS_URL must be provided.
  • TINA_PUBLIC_MEDIA_TYPE must be set; the allowed values are localMedia or cloudinary.
  • When TINA_PUBLIC_MEDIA_TYPE=cloudinary, CLOUDINARY_URL must be provided in the format cloudinary://<API_KEY>:<API_SECRET>@<CLOUD_NAME>.
  • NEXTAUTH_SECRET must be provided as the secret for tinacms-auth.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

| GIT_TYPE | `local` | **Required**, `local`, `gitlab` or `github` |

Original README

| GIT_LOCAL_COMMITTER_NAME | | **Required**, when `GIT_TYPE=local` |

Original README

| GIT_LOCAL_COMMITTER_EMAIL | | **Required**, when `GIT_TYPE=local` |

Original README

| GITLAB_HOST | | **Required**, when `GIT_TYPE=gitlab` |

Original README

| GITLAB_PROJECT_ID | | **Required**, when `GIT_TYPE=gitlab` |

Original README

| GITLAB_PERSONAL_ACCESS_TOKEN | | **Required**, when `GIT_TYPE=gitlab` |

Original README

| GITHUB_OWNER | | **Required**, when `GIT_TYPE=github` |

Original README

| GITHUB_REPO | | **Required**, when `GIT_TYPE=github` |

Original README

| GITHUB_PERSONAL_ACCESS_TOKEN | | **Required**, when `GIT_TYPE=github` |

Original README

| DATABASE_TYPE | `sqlite` | **Required**, `sqlite`, `mongodb` or `redis` |

Original README

| MONGODB_URI | | **Required** when `DATABASE_TYPE=mongodb` |

Original README

| REDIS_URL | | **Required** when `DATABASE_TYPE=redis` |

Original README

| TINA_PUBLIC_MEDIA_TYPE | `localMedia` | **Required**, `localMedia` or `cloudinary` |

Original README

| CLOUDINARY_URL | | **Required** when `TINA_PUBLIC_MEDIA_TYPE=cloudinary`, format: `cloudinary://<API_KEY>:<API_SECRET>@<CLOUD_NAME>` |

Original README

| NEXTAUTH_SECRET | | Required,secret for [tinacms-auth](https://tina.io/docs/reference/self-hosted/auth-provider/authjs) |

Original README
https://github.com/IKKEM-Lin/tina-self-hosted-template/blob/main/LICENSEhttps://github.com/IKKEM-Lin/tina-self-hosted-template/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-14. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 77 / 100
Technologies
Next.js · React
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2025-05-12
Screenshot last checked
2026-10-14

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: codex-user-requested-batch-review-20261015 · 2026-10-15

Inspect the recorded source material

SHA-256: d9c998986bd182382a6c8f1041246ed719fa546f41e08785d470037e0ef57e97

2026-10-14T07:12:52.048Z

Source file / repository
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/IKKEM-Lin/tina-self-hosted-template/tree/main&env=GITHUB_PERSONAL_ACCESS_TOKEN,CLOUDINARY_URL,NEXTAUTH_SECRET&envDescription=NEXTAUTH_SECRET%20is%20secret%20for%20tinacms-auth.%20For%20the%20other%20variables%2C%20you%20can&envLink=https://github.com/IKKEM-Lin/tina-self-hosted-template/tree/main/doc/VercelDeploy.md&project-name=tina-self-hosted-template&repository-name=tina-self-hosted-template&stores=%5B%7B%22type%22%3A%22kv%22%7D%5D&)
&emsp; 
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https%3A%2F%2Fgithub.com%2FIKKEM-Lin%2Ftina-self-hosted-template)

This is a [tinacms](https://tina.io/) self-host project base on [next.js](https://nextjs.org/). It supports local media manager, document search and some git provider (local, gitlab and github).

## Overview

We have 3 environment in this project:

- local: env for developer
- ssr: env for content editor
- ssg: static export for deploy

## For developer

First, run the development server:

```bash
npm i
npm run dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
open [http://localhost:3000/admin/index.html#/graphql](http://localhost:3000/admin/index.html#/graphql) for graphql debug.

## Deploy SSR(Server-side rendering)

```bash
cp .env.example .env
# Change NEXTAUTH_SECRET in .env file

# deploy with docker
docker-compose up -d

# deploy without docker
npm i
npm run build:ssr
npm run start
```

Open http://localhost:3080/admin/index.html with your browser to edit content.

## Deploy SSG(Static Site Generation)

SSG( Static Site Generator ) is feature of Next.js. Follow the steps below to create:

1. Merge latest `GIT_COMMIT_BRANCH` branch into `main` branch
2. Run `cp .env.example .env` if `.env` file not exist in project. Remember to change `NEXTAUTH_SECRET` in .env file
3. Run `npm run build:ssg` and you will get `out` folder which include static file

## Environment variables

The variables take effect only when SSR or SSG.

| Variable                     | Default                        | Description                                                                                                       |
| ---------------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
| GIT_COMMIT_BRANCH            | `tina`                         | The branch for cms commit                                                                                         |
| GIT_COMMIT_MESSAGE           | `content: Edited with TinaCMS` | Commit message whe cms commit                                                                                     |
| GIT_TYPE                     | `local`                        | **Required**, `local`, `gitlab` or `github`                                                                       |
| GIT_LOCAL_COMMITTER_NAME     |                                | **Required**, when `GIT_TYPE=local`                                                                               |
| GIT_LOCAL_COMMITTER_EMAIL    |                                | **Required**, when `GIT_TYPE=local`                                                                               |
| GITLAB_HOST                  |                                | **Required**, when `GIT_TYPE=gitlab`                                                                              |
| GITLAB_PROJECT_ID            |                                | **Required**, when `GIT_TYPE=gitlab`                                                                              |
| GITLAB_PERSONAL_ACCESS_TOKEN |                                | **Required**, when `GIT_TYPE=gitlab`                                                                              |
| GITHUB_OWNER                 |                                | **Required**, when `GIT_TYPE=github`                                                                              |
| GITHUB_REPO                  |                                | **Required**, when `GIT_TYPE=github`                                                                              |
| GITHUB_PERSONAL_ACCESS_TOKEN |                                | **Required**, when `GIT_TYPE=github`                                                                              |
| DATABASE_TYPE                | `sqlite`                       | **Required**, `sqlite`, `mongodb` or `redis`                                                                      |
| SQLITE_DB_PATH               | `sqliteDB/tinacms.db`          | Optional                                                                                                          |
| MONGODB_URI                  |                                | **Required** when `DATABASE_TYPE=mongodb`                                                                         |
| MONGODB_COLLECTION_NAME      | `tinacms`                      | Optional when `DATABASE_TYPE=mongodb`                                                                             |
| MONGODB_DB_NAME              | `tinacms`                      | Optional when `DATABASE_TYPE=mongodb`                                                                             |
| REDIS_URL                    |                                | **Required** when `DATABASE_TYPE=redis`                                                                           |
| REDIS_NAMESPACE              | `tinacms`                      | Optional when `DATABASE_TYPE=redis`                                                                               |
| REDIS_DEBUG                  | `false`                        | Optional                                                                                                          |
| TINA_PUBLIC_MEDIA_TYPE       | `localMedia`                   | **Required**, `localMedia` or `cloudinary`                                                                        |
| CLOUDINARY_URL               |                                | **Required** when `TINA_PUBLIC_MEDIA_TYPE=cloudinary`, format: `cloudinary://<API_KEY>:<API_SECRET>@<CLOUD_NAME>` |
| NEXTAUTH_SECRET              |                                | Required,secret for [tinacms-auth](https://tina.io/docs/reference/self-hosted/auth-provider/authjs)              |

## FAQ

### How to resolve "Error: Could not locate the bindings file, better_sqlite3.node"

Try to rebuild better_sqlite3 and copy it to project directory. You can run `npm run postinstall` manually.
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.