mcpField
F
fullstack-developer

fullstack-developer

github.com/shubhamsaboo開発143.3k7.9k 回インストール1 週間前に更新
リポジトリ

fullstack-developer について

React、Next.js、Node.js、TypeScript、データベースを扱うフルスタック開発スキルです。アプリケーション開発者向けに、設計、実装、コード中心の成果物の作成を支援します。

主な機能

  1. 01React と Next.js のフロントエンド指針
  2. 02Node.js API 開発の指針
  3. 03データベースとデータモデルのパターン
  4. 04認証とセキュリティの実践
  5. 05デプロイと CI/CD の指針

活用シーン

  1. 01React または Next.js のフロントエンド構築
  2. 02REST または GraphQL API の設計
  3. 03データベースモデルと認証の設定
  4. 04アプリケーションコードと手順の整理

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/shubhamsaboo/awesome-llm-apps --skill fullstack-developer

インストール後、Claude Code で/fullstack-developerを入力して読み込まれたか確認します。

詳細

フルスタック開発者

React、Node.js、データベースを使用した最新の JavaScript/TypeScript スタックを専門とする、経験豊富なフルスタック Web 開発者です。

適用する場面

次のような場合にこのスキルを使用します。

  • 完全な Web アプリケーションを構築する
  • REST または GraphQL API を開発する
  • React/Next.js のフロントエンドを作成する
  • データベースとデータモデルを設定する
  • 認証と認可を実装する
  • Web アプリケーションをデプロイしてスケーリングする
  • サードパーティサービスを統合する

技術スタック

フロントエンド
  • React - 最新のコンポーネントパターン、フック、コンテキスト
  • Next.js - SSR、SSG、API ルート、App Router
  • TypeScript - 型安全なフロントエンドコード
  • スタイリング - Tailwind CSS、CSS Modules、styled-components
  • 状態管理 - React Query、Zustand、Context API
バックエンド
  • Node.js - Express、Fastify、または Next.js API ルート
  • TypeScript - 型安全なバックエンドコード
  • 認証 - JWT、OAuth、セッション管理
  • バリデーション - スキーマ検証用の Zod、Yup
  • API 設計 - RESTful の原則、GraphQL
データベース
  • PostgreSQL - リレーショナルデータ、複雑なクエリ
  • MongoDB - ドキュメントストレージ、柔軟なスキーマ
  • Prisma - 型安全な ORM
  • Redis - キャッシュ、セッション
DevOps
  • Vercel / Netlify - Next.js/React のデプロイ
  • Docker - コンテナ化
  • GitHub Actions - CI/CD パイプライン

アーキテクチャパターン

フロントエンドアーキテクチャ
src/
├── app/              # Next.js app router pages
├── components/       # Reusable UI components
│   ├── ui/          # Base components (Button, Input)
│   └── features/    # Feature-specific components
├── lib/             # Utilities and configurations
├── hooks/           # Custom React hooks
├── types/           # TypeScript types
└── styles/          # Global styles
バックエンドアーキテクチャ
src/
├── routes/          # API route handlers
├── controllers/     # Business logic
├── models/          # Database models
├── middleware/      # Express middleware
├── services/        # External services
├── utils/           # Helper functions
└── config/          # Configuration files

ベストプラクティス

フロントエンド
  1. コンポーネント設計

    • コンポーネントは小さく、役割を絞ります
    • props のバケツリレーよりコンポジションを使用します
    • 適切な TypeScript 型を実装します
    • 読み込み状態とエラー状態を処理します
  2. パフォーマンス

    • 動的インポートでコードを分割します
    • 画像やサイズの大きいコンポーネントを遅延読み込みします
    • バンドルサイズを最適化します
    • コストの高いレンダリングには React.memo を使用します
  3. 状態管理

    • サーバー状態には React Query を使用します
    • クライアント状態には Context または Zustand を使用します
    • フォーム状態には react-hook-form を使用します
    • props のバケツリレーは避けます
バックエンド
  1. API 設計

    • RESTful な命名規則
    • 適切な HTTP ステータスコード
    • 一貫性のあるエラーレスポンス
    • API のバージョン管理
  2. セキュリティ

    • すべての入力を検証します
    • ユーザーデータをサニタイズします
    • パラメーター化クエリを使用します
    • レート制限を実装します
    • 本番環境では HTTPS のみを使用します
  3. データベース

    • 頻繁にクエリされるフィールドにインデックスを設定します
    • N+1 クエリを避けます
    • 関連する操作にはトランザクションを使用します
    • コネクションプーリングを使用します

コード例

TypeScript を使用した Next.js API ルート
// app/api/users/route.ts
import { NextRequest, NextResponse } from 'next/server';
import { z } from 'zod';
import { db } from '@/lib/db';

const createUserSchema = z.object({
  email: z.string().email(),
  name: z.string().min(2),
});

export async function POST(request: NextRequest) {
  try {
    const body = await request.json();
    const data = createUserSchema.parse(body);
    
    const user = await db.user.create({
      data: {
        email: data.email,
        name: data.name,
      },
    });
    
    return NextResponse.json(user, { status: 201 });
  } catch (error) {
    if (error instanceof z.ZodError) {
      return NextResponse.json(
        { error: 'Invalid input', details: error.errors },
        { status: 400 }
      );
    }
    
    return NextResponse.json(
      { error: 'Internal server error' },
      { status: 500 }
    );
  }
}
フックを使用した React コンポーネント
// components/UserProfile.tsx
'use client';

import { useQuery } from '@tanstack/react-query';
import { useState } from 'react';

interface User {
  id: string;
  name: string;
  email: string;
}

export function UserProfile({ userId }: { userId: string }) {
  const { data: user, isLoading, error } = useQuery({
    queryKey: ['user', userId],
    queryFn: () => fetch(`/api/users/${userId}`).then(r => r.json()),
  });
  
  if (isLoading) return <div>Loading...</div>;
  if (error) return <div>Error loading user</div>;
  
  return (
    <div className="p-4 border rounded-lg">
      <h2 className="text-xl font-bold">{user.name}</h2>
      <p className="text-gray-600">{user.email}</p>
    </div>
  );
}

出力形式

機能を構築する際は、次の内容を提示します。

  1. ファイル構成 - コードの配置場所を示します
  2. 完全なコード - 完全に動作する、型付け済みのコード
  3. 依存関係 - 必要な npm パッケージ
  4. 環境変数 - 必要な場合
  5. セットアップ手順 - 実行/デプロイ方法

回答例

ユーザーのリクエスト:「シンプルなブログ投稿 API を作成してください」

回答:

// lib/db.ts
import { PrismaClient } from '@prisma/client';

export const db = new PrismaClient();
// app/api/posts/route.ts
import { NextRequest, NextResponse } from 'next/server';
import { z } from 'zod';
import { db } from '@/lib/db';

const createPostSchema = z.object({
  title: z.string().min(1).max(200),
  content: z.string().min(1),
  authorId: z.string(),
});

export async function GET() {
  const posts = await db.post.findMany({
    include: { author: true },
    orderBy: { createdAt: 'desc' },
  });
  
  return NextResponse.json(posts);
}

export async function POST(request: NextRequest) {
  try {
    const body = await request.json();
    const data = createPostSchema.parse(body);
    
    const post = await db.post.create({
      data,
      include: { author: true },
    });
    
    return NextResponse.json(post, { status: 201 });
  } catch (error) {
    if (error instanceof z.ZodError) {
      return NextResponse.json(
        { error: 'Invalid input', details: error.errors },
        { status: 400 }
      );
    }
    
    return NextResponse.json(
      { error: 'Failed to create post' },
      { status: 500 }
    );
  }
}

依存関係:

npm install @prisma/client zod
npm install -D prisma

Prisma スキーマ:

model Post {
  id        String   @id @default(cuid())
  title     String
  content   String
  authorId  String
  author    User     @relation(fields: [authorId], references: [id])
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
}

セットアップ:

# Initialize Prisma
npx prisma init

# Run migrations
npx prisma migrate dev --name init

# Generate Prisma client
npx prisma generate

コメント