スタートアップの技術選定:2026年版最強スタック
スタートアップにとって技術選定は、プロダクトの成否を左右する重要な意思決定です。この記事では、シード〜シリーズAフェーズのスタートアップに最適な技術スタックを、実務経験に基づいて解説します。
技術選定の原則
スタートアップの技術選定で最も重要なのはスピードです。
選定基準
- 開発速度: 1人で1週間でMVPを作れるか
- 採用容易性: エンジニアを採用しやすいか
- スケーラビリティ: シリーズA後も使い続けられるか
- コスト: 初期費用を最小化できるか
- エコシステム: ライブラリやツールが充実しているか
やってはいけないこと
- オーバーエンジニアリング: マイクロサービスは不要。モノリスで十分
- 最新技術への飛びつき: 枯れた技術の組み合わせが最強
- 自前実装: 認証、決済、メール送信は必ずSaaSを使う
- 早すぎる最適化: パフォーマンスチューニングはユーザーが増えてから
2026年版推奨スタック
概要
| レイヤー | 推奨技術 | 代替案 |
|---|---|---|
| フロントエンド | Next.js 15 + React 19 | Remix, Nuxt |
| 言語 | TypeScript | - |
| スタイリング | Tailwind CSS + shadcn/ui | CSS Modules |
| バックエンド | Next.js Server Actions | Hono, Fastify |
| データベース | PostgreSQL (Supabase) | PlanetScale, Neon |
| ORM | Prisma | Drizzle |
| 認証 | NextAuth.js v5 | Clerk, Supabase Auth |
| 決済 | Stripe | Paddle, LemonSqueezy |
| ホスティング | Vercel | Cloudflare, Railway |
| AI | Claude API | OpenAI API |
| 開発ツール | Claude Code + Cursor | GitHub Copilot |
フロントエンド
Next.js 15 + React 19
なぜNext.jsなのか:
- Server Components: サーバーサイドでレンダリング、バンドルサイズ削減
- App Router: ファイルベースルーティング、レイアウト管理
- Server Actions: APIエンドポイント不要でデータ更新
- 自動最適化: 画像、フォント、スクリプトの最適化が自動
- Vercel連携: ゼロコンフィグでデプロイ
# プロジェクト作成
npx create-next-app@latest my-startup --typescript --tailwind --app
プロジェクト構成例:
app/
├── (marketing)/ # LPなど
│ ├── page.tsx
│ └── pricing/
├── (app)/ # ログイン後の機能
│ ├── dashboard/
│ └── settings/
├── api/ # Webhook等
└── layout.tsx
components/
├── ui/ # shadcn/uiコンポーネント
└── features/ # 機能別コンポーネント
lib/
├── db.ts # Prismaクライアント
├── auth.ts # NextAuth設定
└── stripe.ts # Stripe設定
Tailwind CSS + shadcn/ui
なぜTailwindなのか:
- 高速なスタイリング: クラス名を書くだけでデザイン完成
- デザインシステム: 一貫したスペーシング、カラー
- バンドルサイズ: 使用したクラスのみ出力
- チーム開発: CSSの命名規則不要
shadcn/uiの利点:
- コピー&ペースト: npmパッケージではなくソースコードをコピー
- カスタマイズ自由: 完全に自分のコードとして管理
- アクセシビリティ: Radix UIベースで標準準拠
- デザイン品質: 洗練されたデフォルトスタイル
# shadcn/ui初期化
npx shadcn@latest init
# コンポーネント追加
npx shadcn@latest add button card dialog form
実装例:
import { Button } from "@/components/ui/button"
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
export function PricingCard({ plan }: { plan: Plan }) {
return (
<Card>
<CardHeader>
<CardTitle>{plan.name}</CardTitle>
</CardHeader>
<CardContent>
<p className="text-3xl font-bold">¥{plan.price}/月</p>
<Button className="w-full mt-4">申し込む</Button>
</CardContent>
</Card>
)
}
バックエンド
Next.js Server Actions
なぜServer Actionsなのか:
- APIエンドポイント不要: フォーム送信がシンプルに
- 型安全: TypeScriptで入力から出力まで型付け
- プログレッシブエンハンスメント: JavaScriptなしでも動作
- コロケーション: UIとロジックを同じファイルに
実装例:
// app/actions/user.ts
"use server"
import { db } from "@/lib/db"
import { revalidatePath } from "next/cache"
export async function updateProfile(formData: FormData) {
const name = formData.get("name") as string
await db.user.update({
where: { id: getCurrentUserId() },
data: { name },
})
revalidatePath("/settings")
}
// app/settings/page.tsx
import { updateProfile } from "@/app/actions/user"
export default function SettingsPage() {
return (
<form action={updateProfile}>
<input name="name" placeholder="名前" />
<button type="submit">保存</button>
</form>
)
}
代替案:Hono
複雑なAPIやマイクロサービスが必要な場合はHonoを検討:
- 超軽量: Web標準APIベース
- 高速: Cloudflare Workers最適化
- Express風: 慣れ親しんだAPI
- 型安全: RPC機能でフロントエンドと型共有
import { Hono } from 'hono'
const app = new Hono()
app.get('/api/users/:id', async (c) => {
const id = c.req.param('id')
const user = await db.user.findUnique({ where: { id } })
return c.json(user)
})
export default app
データベース
PostgreSQL + Supabase
なぜSupabaseなのか:
- PostgreSQL: 信頼性の高いRDB、JSONBも使える
- リアルタイム: WebSocketでデータ変更を購読
- 認証内蔵: Supabase Authですぐに認証機能
- ストレージ: ファイルアップロードも対応
- 無料枠: 2つのプロジェクトまで無料
# Supabaseセットアップ
npm install @supabase/supabase-js
接続設定:
// lib/supabase.ts
import { createClient } from '@supabase/supabase-js'
export const supabase = createClient(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!
)
Prisma ORM
なぜPrismaなのか:
- 型安全: スキーマから型を自動生成
- マイグレーション: スキーマ変更を安全に適用
- 直感的なAPI: SQLを書かずにCRUD操作
- GUI: Prisma Studioでデータ確認
npm install prisma @prisma/client
npx prisma init
スキーマ例:
// prisma/schema.prisma
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id String @id @default(cuid())
email String @unique
name String?
posts Post[]
createdAt DateTime @default(now())
}
model Post {
id String @id @default(cuid())
title String
content String?
published Boolean @default(false)
author User @relation(fields: [authorId], references: [id])
authorId String
createdAt DateTime @default(now())
}
使用例:
// lib/db.ts
import { PrismaClient } from '@prisma/client'
const globalForPrisma = globalThis as unknown as { prisma: PrismaClient }
export const db = globalForPrisma.prisma || new PrismaClient()
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = db
// 型安全なクエリ
const users = await db.user.findMany({
where: { email: { contains: '@example.com' } },
include: { posts: true },
})
// users: (User & { posts: Post[] })[]
認証
NextAuth.js v5
なぜNextAuthなのか:
- 多様なプロバイダー: Google, GitHub, Twitter等
- セッション管理: JWT/データベースセッション対応
- Next.js最適化: App Routerとの相性抜群
- 無料: オープンソース
npm install next-auth@beta
設定例:
// lib/auth.ts
import NextAuth from "next-auth"
import Google from "next-auth/providers/google"
import { PrismaAdapter } from "@auth/prisma-adapter"
import { db } from "@/lib/db"
export const { handlers, auth, signIn, signOut } = NextAuth({
adapter: PrismaAdapter(db),
providers: [
Google({
clientId: process.env.GOOGLE_CLIENT_ID!,
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
}),
],
callbacks: {
session({ session, user }) {
session.user.id = user.id
return session
},
},
})
// app/api/auth/[...nextauth]/route.ts
import { handlers } from "@/lib/auth"
export const { GET, POST } = handlers
代替案:Clerk
より高機能な認証が必要な場合:
- UI込み: サインイン/サインアップUIが付属
- 組織管理: チーム機能が標準搭載
- Webhook: ユーザー作成時の処理が簡単
- 有料: 月5,000アクティブユーザーまで無料
決済
Stripe
なぜStripeなのか:
- 開発者体験: APIドキュメントが秀逸
- 日本対応: 日本の銀行口座に振込可能
- サブスク: 定期課金が簡単に実装
- 税金計算: Stripe Taxで自動計算
npm install stripe @stripe/stripe-js
Checkout Session例:
// app/api/checkout/route.ts
import { NextResponse } from "next/server"
import Stripe from "stripe"
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)
export async function POST(request: Request) {
const { priceId } = await request.json()
const session = await stripe.checkout.sessions.create({
mode: "subscription",
payment_method_types: ["card"],
line_items: [{ price: priceId, quantity: 1 }],
success_url: `${process.env.NEXT_PUBLIC_URL}/success`,
cancel_url: `${process.env.NEXT_PUBLIC_URL}/pricing`,
})
return NextResponse.json({ url: session.url })
}
Webhook処理:
// app/api/webhook/stripe/route.ts
import { headers } from "next/headers"
import Stripe from "stripe"
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!)
export async function POST(request: Request) {
const body = await request.text()
const signature = headers().get("stripe-signature")!
const event = stripe.webhooks.constructEvent(
body,
signature,
process.env.STRIPE_WEBHOOK_SECRET!
)
switch (event.type) {
case "checkout.session.completed":
// サブスク開始処理
break
case "customer.subscription.deleted":
// サブスク解約処理
break
}
return new Response("OK")
}
ホスティング
Vercel
なぜVercelなのか:
- ゼロコンフィグ: git pushだけでデプロイ
- プレビュー: PRごとにプレビュー環境
- エッジ: 世界中のエッジでレスポンス
- 分析: Web Vitalsの自動計測
- 無料枠: 個人プロジェクトなら十分
# Vercel CLIインストール
npm install -g vercel
# デプロイ
vercel
環境変数の設定:
# 本番環境の環境変数を設定
vercel env add DATABASE_URL
vercel env add STRIPE_SECRET_KEY
代替案
| サービス | 特徴 | 料金 |
|---|---|---|
| Cloudflare Pages | エッジ、Workers連携 | 無料枠大きい |
| Railway | バックエンド向け、DB込み | 月$5〜 |
| Render | シンプル、Docker対応 | 無料枠あり |
| Fly.io | グローバル分散、Docker | 無料枠あり |
AI統合
Claude API
なぜClaude APIなのか:
- 長文理解: 200Kトークンのコンテキスト
- コード生成: 高精度なコード生成
- 日本語: 日本語の理解が自然
- 安全性: 有害コンテンツの生成を抑制
npm install @anthropic-ai/sdk
使用例:
// lib/claude.ts
import Anthropic from "@anthropic-ai/sdk"
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY!,
})
export async function generateSummary(text: string) {
const message = await anthropic.messages.create({
model: "claude-sonnet-4-20250514",
max_tokens: 1024,
messages: [
{
role: "user",
content: `以下のテキストを3行で要約してください:\n\n${text}`,
},
],
})
return message.content[0].type === "text"
? message.content[0].text
: ""
}
Server Actionでの活用:
// app/actions/ai.ts
"use server"
import { generateSummary } from "@/lib/claude"
export async function summarizeArticle(formData: FormData) {
const url = formData.get("url") as string
const content = await fetchArticleContent(url)
const summary = await generateSummary(content)
return { summary }
}
開発ツール
Claude Code + Cursor
Claude Codeの活用:
- コード生成: 機能説明からコード生成
- バグ修正: エラーメッセージから原因特定
- リファクタリング: 既存コードの改善
- テスト作成: テストコードの自動生成
# インストール
npm install -g @anthropic-ai/claude-code
# プロジェクトで起動
cd my-startup
claude
CLAUDE.mdでプロジェクト設定:
# my-startup
## 技術スタック
- Next.js 15, TypeScript, Tailwind CSS
- Prisma, PostgreSQL (Supabase)
- NextAuth.js, Stripe
## コード規約
- Server Components優先
- Server Actionsでデータ更新
- 型定義を厳密に
## コマンド
- `npm run dev` - 開発サーバー
- `npm run build` - ビルド
- `npx prisma studio` - DB GUI
Cursorエディタ
- AIアシスト: Cmd+Kでコード生成・編集
- コードベース理解: プロジェクト全体を理解した提案
- VS Code互換: 既存の拡張機能がそのまま使える
モニタリング
Sentry(エラー追跡)
npm install @sentry/nextjs
npx @sentry/wizard@latest -i nextjs
設定後:
// 自動でエラーをキャプチャ
throw new Error("Something went wrong")
// → Sentryダッシュボードに表示
Vercel Analytics(パフォーマンス)
npm install @vercel/analytics
// app/layout.tsx
import { Analytics } from '@vercel/analytics/react'
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
<Analytics />
</body>
</html>
)
}
月額コスト試算
シード期(ユーザー〜1,000人)
| サービス | プラン | 月額 |
|---|---|---|
| Vercel | Hobby | $0 |
| Supabase | Free | $0 |
| Stripe | 従量課金 | 3.6% |
| Sentry | Developer | $0 |
| Claude API | 従量課金 | 〜$20 |
| 合計 | 〜$20 |
シリーズA期(ユーザー〜10,000人)
| サービス | プラン | 月額 |
|---|---|---|
| Vercel | Pro | $20 |
| Supabase | Pro | $25 |
| Stripe | 従量課金 | 3.6% |
| Sentry | Team | $26 |
| Claude API | 従量課金 | 〜$200 |
| 合計 | 〜$271 |
実装ロードマップ
Week 1: 基盤構築
# プロジェクト作成
npx create-next-app@latest my-startup --typescript --tailwind --app
cd my-startup
# 必要パッケージ
npm install prisma @prisma/client next-auth@beta @auth/prisma-adapter
npm install stripe @stripe/stripe-js
npm install @anthropic-ai/sdk
npm install -D @types/node
# shadcn/ui
npx shadcn@latest init
npx shadcn@latest add button card dialog form input
# Prisma初期化
npx prisma init
Week 2: 認証・決済
- NextAuth.jsセットアップ
- Googleログイン実装
- Stripeアカウント作成
- Checkout Session実装
- Webhook処理実装
Week 3: コア機能
- メイン機能の実装
- Server Actionsでデータ操作
- UIコンポーネント作成
- Claude API統合(必要に応じて)
Week 4: リリース準備
- Vercelデプロイ
- 環境変数設定
- ドメイン設定
- Sentry設定
- 本番テスト
よくある質問
Q: Firebaseではダメ?
Firebaseも良い選択肢です。特に:
- リアルタイム重視: チャット、コラボツール
- モバイルアプリ: iOS/Android対応
- 素早いプロトタイピング: 設定が簡単
ただし、SQLが使えない、ベンダーロックインが強いなどの点でSupabaseを推奨します。
Q: マイクロサービスは必要?
シリーズAまでは不要です。
モノリスで十分な理由:
- デプロイが簡単
- デバッグが容易
- インフラコストが低い
- 開発速度が速い
マイクロサービスは、チームが10人以上になってから検討しましょう。
Q: テストはどこまで書く?
スタートアップ初期は:
- E2Eテスト: 決済フローなど重要な機能のみ
- ユニットテスト: 複雑なロジックのみ
- 型チェック: TypeScriptで担保
カバレッジより、プロダクト開発を優先しましょう。
Q: GraphQLは使うべき?
REST(Server Actions)で十分です。
GraphQLが有効なケース:
- 複数のフロントエンド(Web、モバイル、パートナー)
- 複雑なデータ構造
- チームが大きい
シード期では複雑さに見合わないことが多いです。
まとめ
2026年のスタートアップ技術スタックの鉄板:
- Next.js 15 + TypeScript + Tailwind: フロントエンドの王道
- Supabase + Prisma: データベースの最適解
- NextAuth.js + Stripe: 認証・決済の定番
- Vercel: デプロイの最適解
- Claude Code + Cursor: AI活用で開発速度2倍
この構成なら:
- 1人で1週間でMVP構築可能
- 月額$20以下で運用開始
- シリーズAまでスケール可能
- 採用しやすい技術スタック
技術選定に時間をかけすぎず、プロダクト開発に集中しましょう。
関連記事: