본문으로 건너뛰기
cccskills
무료GitHub에 공개

fullstack-workflow

End-to-end full-stack development workflow for Next.js

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md4.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Full-Stack Workflow Skill

Complete full-stack development workflow for Next.js applications with Sanity CMS.

When to use this skill

  • Building new features end-to-end
  • Creating full-stack applications
  • Integrating frontend and backend
  • Setting up new projects

Workflow

1. Planning Phase

## Feature: [Feature Name]

### Requirements
- [ ] Frontend components needed
- [ ] API routes needed
- [ ] Database schema changes
- [ ] Third-party integrations

### Architecture
- Frontend: Next.js App Router
- Backend: Next.js API Routes
- Database: Sanity CMS
- State: SWR + React Context

### Timeline
- Day 1: Schema & API
- Day 2: Frontend components
- Day 3: Integration & testing
- Day 4: Review & deployment

2. Schema Design (Sanity)

// Define document type
defineType({
  name: 'feature',
  title: 'Feature',
  type: 'document',
  fields: [
    defineField({
      name: 'title',
      title: 'Title',
      type: 'string',
      validation: Rule => Rule.required()
    }),
    // ... more fields
  ]
})

3. API Development

// app/api/feature/route.ts
import { NextRequest, NextResponse } from 'next/server';
import { z } from 'zod';

const FeatureSchema = z.object({
  title: z.string().min(1),
  description: z.string().optional()
});

export async function GET(request: NextRequest) {
  try {
    const data = await fetchFeatures();
    return NextResponse.json({ success: true, data });
  } catch (error) {
    return NextResponse.json(
      { success: false, error: 'Failed to fetch' },
      { status: 500 }
    );
  }
}

export async function POST(request: NextRequest) {
  try {
    const body = await request.json();
    const validated = FeatureSchema.parse(body);
    const data = await createFeature(validated);
    return NextResponse.json({ success: true, data }, { status: 201 });
  } catch (error) {
    if (error instanceof z.ZodError) {
      return NextResponse.json(
        { success: false, error: 'Validation failed', details: error.errors },
        { status: 400 }
      );
    }
    return NextResponse.json(
      { success: false, error: 'Failed to create' },
      { status: 500 }
    );
  }
}

4. Frontend Components

// components/FeatureCard.tsx
'use client';

import { motion } from 'framer-motion';

interface FeatureCardProps {
  title: string;
  description?: string;
  onClick?: () => void;
}

export function FeatureCard({ title, description, onClick }: FeatureCardProps) {
  return (
    <motion.div
      whileHover={{ scale: 1.02 }}
      whileTap={{ scale: 0.98 }}
      className="p-6 rounded-lg border border-gray-200 dark:border-gray-800"
      onClick={onClick}
      role="button"
      tabIndex={0}
      onKeyDown={(e) => e.key === 'Enter' && onClick?.()}
    >
      <h3 className="text-lg font-semibold">{title}</h3>
      {description && <p className="mt-2 text-gray-600">{description}</p>}
    </motion.div>
  );
}

5. Data Fetching

// hooks/useFeatures.ts
import useSWR from 'swr';

const fetcher = (url: string) => fetch(url).then(res => res.json());

export function useFeatures() {
  const { data, error, isLoading } = useSWR('/api/features', fetcher);

  return {
    features: data?.data,
    isLoading,
    isError: error
  };
}

6. Testing

// __tests__/FeatureCard.test.tsx
import { render, screen, fireEvent } from '@testing-library/react';
import { FeatureCard } from '@/components/FeatureCard';

describe('FeatureCard', () => {
  it('renders title correctly', () => {
    render(<FeatureCard title="Test Feature" />);
    expect(screen.getByText('Test Feature')).toBeInTheDocument();
  });

  it('calls onClick when clicked', () => {
    const handleClick = jest.fn();
    render(<FeatureCard title="Test" onClick={handleClick} />);
    fireEvent.click(screen.getByText('Test'));
    expect(handleClick).toHaveBeenCalled();
  });
});

7. Deployment

# Build
npm run build

# Test
npm run test

# Deploy
npm run deploy

Checklist

  • Schema designed and validated
  • API routes implemented
  • Frontend components created
  • Data fetching hooks added
  • Tests written and passing
  • Documentation updated
  • Deployment configured

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Audit and fix accessibility issues across the portfolio to ensure WCAG 2.1 AA compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

PP-Namias/Portfolio22026년 10월 16일 업데이트

Creates a new blog post document in the Sanity studio. Use when the user wants to write a blog post, publish an article, or schedule a future post.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

PP-Namias/Portfolio22026년 10월 16일 업데이트

Creates a new certification document in the Sanity studio. Use when the user wants to add a credential, certificate, or professional accreditation to the Certifications collection.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

PP-Namias/Portfolio22026년 10월 16일 업데이트

Adds a new skill MD file to the studio's skills collection. Use when the user wants to author a new step-by-step recipe for the studio's in-app Skills tool or the .agents mirror.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

PP-Namias/Portfolio22026년 10월 16일 업데이트

Creates a new project document in the Sanity studio. Use when the user wants to add a new portfolio project, a case study, or a work sample to the Projects collection.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

PP-Namias/Portfolio22026년 10월 16일 업데이트

Creates a new experience document in the Sanity studio. Use when the user wants to add a job, role, internship, or work history entry to the Experience collection.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

PP-Namias/Portfolio22026년 10월 16일 업데이트

PP-Namias의 스킬 모두 보기

이 스킬의 문제 신고