Communitygithub.com

mindrally/nextjs-typescript-tailwindcss-supabase

TypeScript、TailwindCSS、Supabaseを使用した本番環境対応のWebアプリケーションを構築するための、フルスタックNext.js 14開発スキルです。

nextjs-typescript-tailwindcss-supabase とは?

このスキルは、Next.js 14(App Router)、TypeScript、TailwindCSS、Supabaseを組み合わせた、フルスタックWebアプリケーション開発のための統合スキルです。主にClaude CodeやCursorなどのAIエージェント向けに設計されており、最新のNext.js機能(サーバーコンポーネント、ルートハンドラー、ミドルウェアなど)を活用した実装を支援します。TypeScriptによる型安全なコード、TailwindCSSによる迅速なUI構築、Supabaseによるバックエンド(データベース、認証、ストレージ、リアルタイム機能)の統合がシームレスに行えます。本スキルを使用することで、AIエージェントはプロジェクトのセットアップからデプロイまで、一貫性のあるベストプラクティスに沿った開発を効率的に実行できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mindrally/skills/tree/main/skills/nextjs-typescript-tailwindcss-supabase

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

nextjs-typescript-tailwindcss-supabase は何をしますか?

TypeScript、TailwindCSS、Supabaseを使用した本番環境対応のWebアプリケーションを構築するための、フルスタックNext.js 14開発スキルです。

機能

  • Next.js 14 App Router: 最新のサーバーコンポーネントとルーティングパラダイムを活用
  • TypeScript: エンドツーエンドの型安全性
  • TailwindCSS: ユーティリティファーストのCSSフレームワークによる高速なUI開発
  • Supabase: データベース、認証、ストレージ、リアルタイム機能を含むバックエンドサービス

はじめ方

前提条件

  • Node.js 18.17以上
  • npm、yarn、またはpnpm
  • Supabaseアカウント(無料枠あり)

セットアップ

  1. リポジトリのクローン
git clone https://github.com/mindrally/nextjs-typescript-tailwindcss-supabase.git my-project
cd my-project
  1. 依存関係のインストール
npm install
# または
yarn install
# または
pnpm install
  1. 環境変数の設定

.env.local.exampleファイルを.env.localにコピーし、Supabaseの認証情報を入力します。

cp .env.local.example .env.local

必要な環境変数:

NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
  1. Supabaseクライアントの設定

lib/supabase/client.tsファイルが自動的に生成されます。必要に応じて設定をカスタマイズしてください。

  1. 開発サーバーの起動
npm run dev
# または
yarn dev
# または
pnpm dev

ブラウザで http://localhost:3000 を開いて確認します。

プロジェクト構造

my-project/
├── app/                    # App Routerのルート(ページ、レイアウト、APIルート)
│   ├── api/               # APIルート(サーバーレス関数)
│   ├── auth/              # 認証関連のルート
│   ├── layout.tsx          # ルートレイアウト
│   └── page.tsx            # ホームページ
├── components/             # 再利用可能なコンポーネント
│   ├── ui/                # プリミティブなUIコンポーネント
│   └── layout/            # レイアウト関連コンポーネント
├── lib/                    # ユーティリティ関数と設定
│   ├── supabase/          # Supabaseクライアント(ブラウザ用とサーバー用)
│   └── utils.ts           # その他のユーティリティ関数
├── public/                 # 静的ファイル
├── styles/                 # グローバルスタイル
│   └── globals.css        # TailwindCSSのインポートとカスタムスタイル
├── types/                  # TypeScriptの型定義
├── .env.local.example      # 環境変数のテンプレート
├── next.config.js          # Next.jsの設定
├── tailwind.config.ts      # TailwindCSSの設定
├── tsconfig.json           # TypeScriptの設定
└── package.json            # 依存関係とスクリプト

使い方

ページの追加

app/フォルダ内に新しいフォルダとpage.tsxファイルを作成します。

APIルートの追加

app/api/フォルダ内に新しいフォルダとroute.tsファイルを作成します。

Supabaseとの連携

  • サーバーコンポーネント: lib/supabase/server.tsからcreateClientを使用
  • クライアントコンポーネント: lib/supabase/client.tsからcreateClientを使用

認証

Supabaseの認証機能を使用するには:

  1. Supabaseダッシュボードで認証プロバイダー(メール/パスワード、Google、GitHubなど)を有効にします。
  2. app/auth/callback/route.tsでコールバックルートを設定します。
  3. ログイン/サインアップフォームにはcomponents/auth/のコンポーネントを使用します。

デプロイ

Vercelへのデプロイ(推奨)

  1. リポジトリをGitHubにプッシュします。
  2. Vercelにインポートし、環境変数を追加します。
  3. デプロイします。

その他のプラットフォーム

NetlifyやDockerなどのプラットフォームもサポートされています。詳細はプラットフォームのドキュメントを参照してください。

ライセンス

MIT

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

mindrally/accessibility-a11y

Implement web accessibility (a11y) best practices following WCAG guidelines to create inclusive, accessible user interfaces.

mindrally/chrome-extension-development

Expert guidelines for Chrome extension development with Manifest V3, covering security, performance, and best practices. Use when building browser extensions, creating popup UIs, implementing content scripts, working with Chrome APIs, managing extension permissions, or publishing to Chrome Web Store.

mindrally/computer-vision-opencv

Expert guidance for computer vision development using OpenCV, PyTorch, and modern deep learning techniques for image and video processing.

mindrally/data-analysis-jupyter

Expert guidance for data analysis, visualization, and Jupyter Notebook development with pandas, matplotlib, seaborn, and numpy.

mindrally/deep-learning-pytorch

Expert guidance for deep learning, transformers, diffusion models, and LLM development with PyTorch, Transformers, Diffusers, and Gradio.

mindrally/expo-react-native-typescript

Expert in Expo React Native TypeScript mobile development with best practices

mindrally/fastapi-python

Expert in FastAPI Python development with best practices for APIs and async operations

mindrally/framer-motion

Expert guidelines for building performant animations with Framer Motion/Motion library in React applications

mindrally/htmx

HTMX development guidelines for building dynamic web applications with minimal JavaScript using HTML attributes.

mindrally/jwt-security

Guidelines for implementing JWT authentication with security best practices for token creation, validation, and storage

mindrally/machine-learning

Machine learning development with JAX, functional programming patterns, and high-performance computing.

mindrally/mysql-best-practices

MySQL development best practices for schema design, query optimization, and database administration

mindrally/nextjs-react-typescript

Expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind

mindrally/odoo-development

Expert guidance for Odoo ERP development including Python ORM, XML views, and module architecture

mindrally/puppeteer-automation

Expert guidance for browser automation using Puppeteer with best practices for web scraping, testing, screenshot capture, and JavaScript execution in headless Chrome.

mindrally/redis-best-practices

Redis development best practices for caching, data structures, and high-performance key-value operations

mindrally/scrapy-web-scraping

Expert guidance for building web scrapers and crawlers using the Scrapy Python framework with best practices for spider development, data extraction, and pipeline management.

mindrally/scss-best-practices

SCSS/Sassy CSS best practices and coding guidelines for maintainable, scalable stylesheets

mindrally/typeorm

Guidelines for developing with TypeORM, a full-featured ORM for TypeScript and JavaScript supporting multiple databases

mindrally/web-scraping

Expert in web scraping and data extraction with Python tools

関連スキル