Next.jsReactStarter

template-static — Next.js Starter Template

By romkagribok

A reusable template based on the Next.js App Router, integrating Supabase email/password and Google sign-in, Postgres persistence, and Vercel deployment, with a demo calculator that includes history.

Explore the design

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

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

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

Next.js App Router + TypeScript + Tailwind CSS + shadcn/ui

02

Supabase SSR authentication: email/password registration and login, Google OAuth, session refresh middleware

03

Postgres persistence with RLS: profiles and calculator_history tables

04

Zod-validated server actions: saveCalculation, listHistory, clearHistory

05

Demo calculator uses a safe expression evaluator (not eval()), supports guest history or per-user persistence after login

06

Includes a landing page and a login page, making it easy to customize for new projects

Template Details

This is a reusable Next.js template. The README states that it includes Supabase SSR authentication (email/password registration and login, Google OAuth, session refresh middleware), Postgres persistence with RLS (profiles and calculator_history tables), Zod-validated server actions (saveCalculation, listHistory, clearHistory), and a demo calculator (using a safe expression evaluator, not eval(), with a keyboard UI, guest session history when not logged in, and per-user persistence after login). The template also includes a landing page and a login page for new projects to customize.

For usage, the README provides steps to create a repository from the template, install dependencies, configure environment variables, apply database migrations, run locally, and replace the demo calculator, along with a manual configuration checklist for Supabase, Google OAuth, and Vercel, and smoke test steps.

The README does not state the template's production readiness, performance, or specific framework version numbers beyond the above tech stack; previews only prove that screenshots exist and do not represent page functionality.

Next.jsStarter

Is it right for your project?

Use Cases

  • Quickly setting up a Next.js project with Supabase authentication and Postgres persistence
  • Referencing how to implement email/password and Google OAuth login, and session refresh middleware
  • Needing a calculator demo that uses a safe expression evaluator and includes a history panel
  • Planning to deploy on Vercel and configure Supabase environment variables and callback URLs

Suitable For

  • Developers familiar with Next.js and Supabase who want to reuse authentication and database templates
  • Teams that need to create a new project from the template and replace the demo calculator
  • Developers who need to reference Supabase RLS, server actions, and OAuth callback configuration

Getting started & customization

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

  1. 1

    Create a repository from the template or clone it and re-point the remote, then run npm install to install dependencies

  2. 2

    Copy .env.example to .env.local and fill in NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY

  3. 3

    Create a project in Supabase and run npx supabase db push to apply migrations, creating the profiles and calculator_history tables and RLS

  4. 4

    Configure the Site URL and Redirect URLs (local and production) in Supabase, and configure email and Google authentication providers as per the README

  5. 5

    Import the repository in Vercel and add environment variables; after deployment, add the Vercel URL to Supabase's Site URL and Redirect URLs

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 the 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

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full 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; the code's MIT license alone cannot be used to judge them.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
  • Before use, you must fill in the NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY environment variables; otherwise, you cannot connect to Supabase.
  • You need to create a Supabase project yourself at supabase.com; the template does not provide a hosted backend.
  • Enabling Google login requires creating an OAuth 2.0 client in the Google Cloud Console and configuring credentials.
  • Deployment requires importing the GitHub repository at vercel.com and configuring environment variables.
  • SUPABASE_SECRET_KEY is optional and is only for server-side administrative tasks; it should not be exposed to the client.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

Fill in `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` (see setup checklist below).

Original README

- [ ] Create a project at [supabase.com](https://supabase.com)

Original README

- [ ] [Google Cloud Console](https://console.cloud.google.com/) → APIs & Services → Credentials → OAuth 2.0 Client

Original README

- [ ] Import GitHub repo at [vercel.com/new](https://vercel.com/new)

Original README

| `SUPABASE_SECRET_KEY` | No | Server-only admin jobs only |

Original README
https://github.com/romkagribok/template-static/blob/main/LICENSEhttps://github.com/romkagribok/template-static/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 · 80 / 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
2026-05-25
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: 002053549834c442c01aba35172eb2615cc3a57303e87ad31f6e043a3294afae

2026-10-14T20:31:14.024Z

Source file / repository
# Template Static

Reusable Next.js template with Supabase auth (email/password + Google), Postgres persistence, and Vercel deployment. Demo app: calculator with per-user history.

**Live demo:** [template-static.vercel.app](https://template-static.vercel.app) — reference deployment of this template (guest calculator works without sign-in; sign-in persists history to Supabase).

## What's included

- **Next.js 16** (App Router) + TypeScript + Tailwind CSS v4 + shadcn/ui
- **Supabase SSR auth** — email/password sign-up & sign-in, Google OAuth, session refresh middleware
- **Postgres + RLS** — `profiles` (auto-created on signup) and `calculator_history` tables
- **Server actions** — Zod-validated `saveCalculation`, `listHistory`, `clearHistory`
- **Demo calculator** — safe expression evaluator (no `eval()`), keypad UI, guest session history or per-user persistence when signed in
- **Landing + login pages** — ready to customize for new projects

## Clone for a new project

1. **Create a repo from this template** (GitHub “Use this template”) or clone and re-point remote:

   ```bash
   git clone https://github.com/YOUR_ORG/template-static.git my-new-app
   cd my-new-app
   rm -rf .git && git init
   git remote add origin [email protected]:YOUR_ORG/my-new-app.git
   ```

2. **Install dependencies:**

   ```bash
   npm install
   ```

3. **Configure environment:**

   ```bash
   cp .env.example .env.local
   ```

   Fill in `NEXT_PUBLIC_SUPABASE_URL` and `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` (see setup checklist below).

4. **Apply database migrations** (after Supabase project exists):

   ```bash
   npx supabase link --project-ref YOUR_PROJECT_REF
   npx supabase db push
   ```

5. **Run locally** (see [Local development](#local-development)), then customize pages, branding, and replace the calculator demo as needed.

## Human setup checklist

Complete these steps once per Supabase project and deployment target.

### Supabase

- [ ] Create a project at [supabase.com](https://supabase.com)
- [ ] Copy **Project URL** → `NEXT_PUBLIC_SUPABASE_URL`
- [ ] Copy **Publishable key** (`sb_publishable_...`) → `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`  
      (Settings → API Keys — use publishable, not legacy anon)
- [ ] Run migrations: `npx supabase db push` (creates `profiles` + `calculator_history` with RLS)
- [ ] **Authentication → URL configuration**
  - Site URL: `http://localhost:3000` (dev) and your production URL (e.g. `https://my-app.vercel.app`)
  - Redirect URLs: `http://localhost:3000/auth/callback`, `https://my-app.vercel.app/auth/callback`

### Auth providers (Supabase dashboard)

**Email** (enabled by default)

- [ ] **Authentication → Providers → Email** — leave enabled for native sign-up/sign-in
- [ ] Optional: **Authentication → Email** — disable “Confirm email” for instant access in dev, or keep it on and use the confirmation email flow

**Google**

- [ ] [Google Cloud Console](https://console.cloud.google.com/) → APIs & Services → Credentials → OAuth 2.0 Client
- [ ] Authorized redirect URI: `https://YOUR_PROJECT_REF.supabase.co/auth/v1/callback`
- [ ] Copy Client ID + Secret into Supabase → Authentication → Providers → Google

### Vercel

- [ ] Import GitHub repo at [vercel.com/new](https://vercel.com/new)
- [ ] Add environment variables (Production + Preview):
  - `NEXT_PUBLIC_SUPABASE_URL`
  - `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY`
- [ ] Deploy, then add the Vercel URL to Supabase **Site URL** and **Redirect URLs** (see above)
- [ ] Re-test Google sign-in on the production URL

### Smoke test

- [ ] `npm run dev` → open `/calculator`, calculate `2+2` — guest history appears in the panel
- [ ] Sign in or create an account at `/login` — OAuth completes via `/auth/callback`
- [ ] Calculate again while signed in — entry persists in Supabase after refresh
- [ ] Sign out returns to `/`

## Local development

```bash
cp .env.example .env.local
# Fill in NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY

npm install
npm run dev
```

Open [http://localhost:3000](http://localhost:3000).

Other scripts:

| Command | Purpose |
| ------- | ------- |
| `npm run dev` | Start dev server (Turbopack) |
| `npm run build` | Production build + typecheck |
| `npm run start` | Serve production build |
| `npm run lint` | ESLint |

## Environment variables

| Variable | Required | Notes |
| -------- | -------- | ----- |
| `NEXT_PUBLIC_SUPABASE_URL` | Yes | Project API URL |
| `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` | Yes | `sb_publishable_...` — not legacy anon |
| `SUPABASE_SECRET_KEY` | No | Server-only admin jobs only |

## Project layout

```
src/
  app/
    (app)/calculator/         # Demo app (guest or signed-in)
    auth/callback/            # OAuth code exchange
    login/                    # Sign-in page
  components/
    auth/                     # Email + OAuth + sign-out
    calculator/               # Demo UI
    ui/                       # shadcn components
  lib/
    actions/                  # Server actions (auth, history)
    auth/session.ts           # User + profile helpers
    calculator/evaluate.ts    # Safe math evaluator
    supabase/                 # SSR clients + middleware helper
  middleware.ts               # Session refresh on each request
tokens.css                    # Spacing, color, motion tokens (project root)
supabase/
  migrations/                 # SQL schema + RLS
  apply-all.sql               # Optional single-file SQL for dashboard
```
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.