{"id":"aa94f9b4-3472-4b23-8cc4-395072f296fc","entityType":"agent","slug":"clawhub-alirezarezvani-senior-fullstack","name":"Senior Fullstack","canonicalUrl":"https://www.xpersona.co/agent/clawhub-alirezarezvani-senior-fullstack","canonicalPath":"/agent/clawhub-alirezarezvani-senior-fullstack","generatedAt":"2026-10-09T09:25:44.279Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"description":"Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns. Skill: Senior Fullstack Owner: alirezarezvani Summary: Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-06T18:27:48.566Z | auto - Initial release of the senior-fullstack skill. - Prov","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.8K downloads reported by the source. Last updated 4/15/2026.","installCommand":"clawhub skill install kn7f2gr00xy51fj1nx2y64ckjs800mhn:senior-fullstack","sourceUrl":"https://clawhub.ai/alirezarezvani/senior-fullstack","homepage":"https://clawhub.ai/alirezarezvani/senior-fullstack","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/alirezarezvani/senior-fullstack","kind":"source"}],"safetyScore":84,"overallRank":62,"popularityScore":65,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, anal"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"stars":null,"forks":null,"downloads":1838,"packageName":null,"latestVersion":"1.0.0","tractionLabel":"1.8K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-02-28T20:03:00.874Z","emptyReason":null},"lastUpdatedAt":"2026-04-15T00:45:39.800Z","lastCrawledAt":"2026-02-28T20:03:00.874Z","lastIndexedAt":null,"nextCrawlAt":"2026-03-01T20:03:00.874Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.0","createdAt":"2026-02-06T18:27:48.566Z","changelog":"- Initial release of the senior-fullstack skill. - Provides project scaffolding for Next.js, FastAPI+React, MERN, and Django+React stacks. - Includes a code quality analyzer: detects security issues, complexity, dependency health, and documentation quality. - Offers guidance and workflows for starting new projects, code audits, and stack selection. - Supplies reference guides on architecture, development workflows, and tech stack choices. - Quick reference materials: decision matrix and solutions to common fullstack issues.","fileCount":7,"zipByteSize":36112}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install kn7f2gr00xy51fj1nx2y64ckjs800mhn:senior-fullstack","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-09T09:25:44.278Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-alirezarezvani-senior-fullstack/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":null},"readme":"Skill: Senior Fullstack\n\nOwner: alirezarezvani\n\nSummary: Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns.\n\nTags: latest:1.0.0\n\nVersion history:\n\nv1.0.0 | 2026-02-06T18:27:48.566Z | auto\n\n- Initial release of the senior-fullstack skill.\n- Provides project scaffolding for Next.js, FastAPI+React, MERN, and Django+React stacks.\n- Includes a code quality analyzer: detects security issues, complexity, dependency health, and documentation quality.\n- Offers guidance and workflows for starting new projects, code audits, and stack selection.\n- Supplies reference guides on architecture, development workflows, and tech stack choices.\n- Quick reference materials: decision matrix and solutions to common fullstack issues.\n\nArchive index:\n\nArchive v1.0.0: 7 files, 36112 bytes\n\nFiles: references/architecture_patterns.md (12973b), references/development_workflows.md (16778b), references/tech_stack_guide.md (14100b), scripts/code_quality_analyzer.py (22418b), scripts/project_scaffolder.py (27200b), SKILL.md (7617b), _meta.json (135b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: senior-fullstack\ndescription: Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns.\n---\n\n# Senior Fullstack\n\nFullstack development skill with project scaffolding and code quality analysis tools.\n\n---\n\n## Table of Contents\n\n- [Trigger Phrases](#trigger-phrases)\n- [Tools](#tools)\n- [Workflows](#workflows)\n- [Reference Guides](#reference-guides)\n\n---\n\n## Trigger Phrases\n\nUse this skill when you hear:\n- \"scaffold a new project\"\n- \"create a Next.js app\"\n- \"set up FastAPI with React\"\n- \"analyze code quality\"\n- \"check for security issues in codebase\"\n- \"what stack should I use\"\n- \"set up a fullstack project\"\n- \"generate project boilerplate\"\n\n---\n\n## Tools\n\n### Project Scaffolder\n\nGenerates fullstack project structures with boilerplate code.\n\n**Supported Templates:**\n- `nextjs` - Next.js 14+ with App Router, TypeScript, Tailwind CSS\n- `fastapi-react` - FastAPI backend + React frontend + PostgreSQL\n- `mern` - MongoDB, Express, React, Node.js with TypeScript\n- `django-react` - Django REST Framework + React frontend\n\n**Usage:**\n\n```bash\n# List available templates\npython scripts/project_scaffolder.py --list-templates\n\n# Create Next.js project\npython scripts/project_scaffolder.py nextjs my-app\n\n# Create FastAPI + React project\npython scripts/project_scaffolder.py fastapi-react my-api\n\n# Create MERN stack project\npython scripts/project_scaffolder.py mern my-project\n\n# Create Django + React project\npython scripts/project_scaffolder.py django-react my-app\n\n# Specify output directory\npython scripts/project_scaffolder.py nextjs my-app --output ./projects\n\n# JSON output\npython scripts/project_scaffolder.py nextjs my-app --json\n```\n\n**Parameters:**\n\n| Parameter | Description |\n|-----------|-------------|\n| `template` | Template name (nextjs, fastapi-react, mern, django-react) |\n| `project_name` | Name for the new project directory |\n| `--output, -o` | Output directory (default: current directory) |\n| `--list-templates, -l` | List all available templates |\n| `--json` | Output in JSON format |\n\n**Output includes:**\n- Project structure with all necessary files\n- Package configurations (package.json, requirements.txt)\n- TypeScript configuration\n- Docker and docker-compose setup\n- Environment file templates\n- Next steps for running the project\n\n---\n\n### Code Quality Analyzer\n\nAnalyzes fullstack codebases for quality issues.\n\n**Analysis Categories:**\n- Security vulnerabilities (hardcoded secrets, injection risks)\n- Code complexity metrics (cyclomatic complexity, nesting depth)\n- Dependency health (outdated packages, known CVEs)\n- Test coverage estimation\n- Documentation quality\n\n**Usage:**\n\n```bash\n# Analyze current directory\npython scripts/code_quality_analyzer.py .\n\n# Analyze specific project\npython scripts/code_quality_analyzer.py /path/to/project\n\n# Verbose output with detailed findings\npython scripts/code_quality_analyzer.py . --verbose\n\n# JSON output\npython scripts/code_quality_analyzer.py . --json\n\n# Save report to file\npython scripts/code_quality_analyzer.py . --output report.json\n```\n\n**Parameters:**\n\n| Parameter | Description |\n|-----------|-------------|\n| `project_path` | Path to project directory (default: current directory) |\n| `--verbose, -v` | Show detailed findings |\n| `--json` | Output in JSON format |\n| `--output, -o` | Write report to file |\n\n**Output includes:**\n- Overall score (0-100) with letter grade\n- Security issues by severity (critical, high, medium, low)\n- High complexity files\n- Vulnerable dependencies with CVE references\n- Test coverage estimate\n- Documentation completeness\n- Prioritized recommendations\n\n**Sample Output:**\n\n```\n============================================================\nCODE QUALITY ANALYSIS REPORT\n============================================================\n\nOverall Score: 75/100 (Grade: C)\nFiles Analyzed: 45\nTotal Lines: 12,500\n\n--- SECURITY ---\n  Critical: 1\n  High: 2\n  Medium: 5\n\n--- COMPLEXITY ---\n  Average Complexity: 8.5\n  High Complexity Files: 3\n\n--- RECOMMENDATIONS ---\n1. [P0] SECURITY\n   Issue: Potential hardcoded secret detected\n   Action: Remove or secure sensitive data at line 42\n```\n\n---\n\n## Workflows\n\n### Workflow 1: Start New Project\n\n1. Choose appropriate stack based on requirements\n2. Scaffold project structure\n3. Run initial quality check\n4. Set up development environment\n\n```bash\n# 1. Scaffold project\npython scripts/project_scaffolder.py nextjs my-saas-app\n\n# 2. Navigate and install\ncd my-saas-app\nnpm install\n\n# 3. Configure environment\ncp .env.example .env.local\n\n# 4. Run quality check\npython ../scripts/code_quality_analyzer.py .\n\n# 5. Start development\nnpm run dev\n```\n\n### Workflow 2: Audit Existing Codebase\n\n1. Run code quality analysis\n2. Review security findings\n3. Address critical issues first\n4. Plan improvements\n\n```bash\n# 1. Full analysis\npython scripts/code_quality_analyzer.py /path/to/project --verbose\n\n# 2. Generate detailed report\npython scripts/code_quality_analyzer.py /path/to/project --json --output audit.json\n\n# 3. Address P0 issues immediately\n# 4. Create tickets for P1/P2 issues\n```\n\n### Workflow 3: Stack Selection\n\nUse the tech stack guide to evaluate options:\n\n1. **SEO Required?** → Next.js with SSR\n2. **API-heavy backend?** → Separate FastAPI or NestJS\n3. **Real-time features?** → Add WebSocket layer\n4. **Team expertise** → Match stack to team skills\n\nSee `references/tech_stack_guide.md` for detailed comparison.\n\n---\n\n## Reference Guides\n\n### Architecture Patterns (`references/architecture_patterns.md`)\n\n- Frontend component architecture (Atomic Design, Container/Presentational)\n- Backend patterns (Clean Architecture, Repository Pattern)\n- API design (REST conventions, GraphQL schema design)\n- Database patterns (connection pooling, transactions, read replicas)\n- Caching strategies (cache-aside, HTTP cache headers)\n- Authentication architecture (JWT + refresh tokens, sessions)\n\n### Development Workflows (`references/development_workflows.md`)\n\n- Local development setup (Docker Compose, environment config)\n- Git workflows (trunk-based, conventional commits)\n- CI/CD pipelines (GitHub Actions examples)\n- Testing strategies (unit, integration, E2E)\n- Code review process (PR templates, checklists)\n- Deployment strategies (blue-green, canary, feature flags)\n- Monitoring and observability (logging, metrics, health checks)\n\n### Tech Stack Guide (`references/tech_stack_guide.md`)\n\n- Frontend frameworks comparison (Next.js, React+Vite, Vue)\n- Backend frameworks (Express, Fastify, NestJS, FastAPI, Django)\n- Database selection (PostgreSQL, MongoDB, Redis)\n- ORMs (Prisma, Drizzle, SQLAlchemy)\n- Authentication solutions (Auth.js, Clerk, custom JWT)\n- Deployment platforms (Vercel, Railway, AWS)\n- Stack recommendations by use case (MVP, SaaS, Enterprise)\n\n---\n\n## Quick Reference\n\n### Stack Decision Matrix\n\n| Requirement | Recommendation |\n|-------------|---------------|\n| SEO-critical site | Next.js with SSR |\n| Internal dashboard | React + Vite |\n| API-first backend | FastAPI or Fastify |\n| Enterprise scale | NestJS + PostgreSQL |\n| Rapid prototype | Next.js API routes |\n| Document-heavy data | MongoDB |\n| Complex queries | PostgreSQL |\n\n### Common Issues\n\n| Issue | Solution |\n|-------|----------|\n| N+1 queries | Use DataLoader or eager loading |\n| Slow builds | Check bundle size, lazy load |\n| Auth complexity | Use Auth.js or Clerk |\n| Type errors | Enable strict mode in tsconfig |\n| CORS issues | Configure middleware properly |\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn7f2gr00xy51fj1nx2y64ckjs800mhn\",\n  \"slug\": \"senior-fullstack\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1770402468566\n}\n\nFile v1.0.0:references/architecture_patterns.md\n\n# Fullstack Architecture Patterns\n\nProven architectural patterns for scalable fullstack applications covering frontend, backend, and their integration.\n\n---\n\n## Table of Contents\n\n- [Frontend Architecture](#frontend-architecture)\n- [Backend Architecture](#backend-architecture)\n- [API Design Patterns](#api-design-patterns)\n- [Database Patterns](#database-patterns)\n- [Caching Strategies](#caching-strategies)\n- [Authentication Architecture](#authentication-architecture)\n\n---\n\n## Frontend Architecture\n\n### Component Architecture\n\n**Atomic Design Pattern**\n\nOrganize components in hierarchical levels:\n\n```\nsrc/components/\n├── atoms/           # Button, Input, Icon\n├── molecules/       # SearchInput, FormField\n├── organisms/       # Header, Footer, Sidebar\n├── templates/       # PageLayout, DashboardLayout\n└── pages/           # Home, Profile, Settings\n```\n\n**When to use:** Large applications with design systems and multiple teams.\n\n**Container/Presentational Pattern**\n\n```typescript\n// Presentational - pure rendering, no state\nfunction UserCard({ name, email, avatar }: UserCardProps) {\n  return (\n    <div className=\"card\">\n      <img src={avatar} alt={name} />\n      <h3>{name}</h3>\n      <p>{email}</p>\n    </div>\n  );\n}\n\n// Container - handles data fetching and state\nfunction UserCardContainer({ userId }: { userId: string }) {\n  const { data, loading } = useUser(userId);\n  if (loading) return <Skeleton />;\n  return <UserCard {...data} />;\n}\n```\n\n**When to use:** When you need clear separation between UI and logic.\n\n### State Management Patterns\n\n**Server State vs Client State**\n\n| Type | Examples | Tools |\n|------|----------|-------|\n| Server State | User data, API responses | React Query, SWR |\n| Client State | UI toggles, form inputs | Zustand, Jotai |\n| URL State | Filters, pagination | Next.js router |\n\n**React Query for Server State:**\n\n```typescript\nfunction useUsers(filters: Filters) {\n  return useQuery({\n    queryKey: [\"users\", filters],\n    queryFn: () => api.getUsers(filters),\n    staleTime: 5 * 60 * 1000, // 5 minutes\n    gcTime: 30 * 60 * 1000,   // 30 minutes\n  });\n}\n\n// Mutations with optimistic updates\nfunction useUpdateUser() {\n  const queryClient = useQueryClient();\n\n  return useMutation({\n    mutationFn: api.updateUser,\n    onMutate: async (newUser) => {\n      await queryClient.cancelQueries({ queryKey: [\"users\"] });\n      const previous = queryClient.getQueryData([\"users\"]);\n      queryClient.setQueryData([\"users\"], (old) =>\n        old.map(u => u.id === newUser.id ? newUser : u)\n      );\n      return { previous };\n    },\n    onError: (err, newUser, context) => {\n      queryClient.setQueryData([\"users\"], context.previous);\n    },\n    onSettled: () => {\n      queryClient.invalidateQueries({ queryKey: [\"users\"] });\n    },\n  });\n}\n```\n\n---\n\n## Backend Architecture\n\n### Clean Architecture\n\n```\nsrc/\n├── domain/              # Business entities, no dependencies\n│   ├── entities/        # User, Order, Product\n│   └── interfaces/      # Repository interfaces\n├── application/         # Use cases, application logic\n│   ├── use-cases/       # CreateOrder, UpdateUser\n│   └── services/        # OrderService, AuthService\n├── infrastructure/      # External concerns\n│   ├── database/        # Repository implementations\n│   ├── http/            # Controllers, middleware\n│   └── external/        # Third-party integrations\n└── shared/              # Cross-cutting concerns\n    ├── errors/\n    └── utils/\n```\n\n**Dependency Flow:** domain ← application ← infrastructure\n\n**Repository Pattern:**\n\n```typescript\n// Domain interface\ninterface UserRepository {\n  findById(id: string): Promise<User | null>;\n  findByEmail(email: string): Promise<User | null>;\n  save(user: User): Promise<User>;\n  delete(id: string): Promise<void>;\n}\n\n// Infrastructure implementation\nclass PostgresUserRepository implements UserRepository {\n  constructor(private db: Database) {}\n\n  async findById(id: string): Promise<User | null> {\n    const row = await this.db.query(\n      \"SELECT * FROM users WHERE id = $1\",\n      [id]\n    );\n    return row ? this.toEntity(row) : null;\n  }\n\n  private toEntity(row: UserRow): User {\n    return new User({\n      id: row.id,\n      email: row.email,\n      name: row.name,\n      createdAt: row.created_at,\n    });\n  }\n}\n```\n\n### Middleware Pipeline\n\n```typescript\n// Express middleware chain\napp.use(cors());\napp.use(helmet());\napp.use(requestId());\napp.use(logger());\napp.use(authenticate());\napp.use(rateLimit());\napp.use(\"/api\", routes);\napp.use(errorHandler());\n\n// Custom middleware example\nfunction requestId() {\n  return (req: Request, res: Response, next: NextFunction) => {\n    req.id = req.headers[\"x-request-id\"] || crypto.randomUUID();\n    res.setHeader(\"x-request-id\", req.id);\n    next();\n  };\n}\n\nfunction errorHandler() {\n  return (err: Error, req: Request, res: Response, next: NextFunction) => {\n    const status = err instanceof AppError ? err.status : 500;\n    const message = status === 500 ? \"Internal Server Error\" : err.message;\n\n    logger.error({ err, requestId: req.id });\n    res.status(status).json({ error: message, requestId: req.id });\n  };\n}\n```\n\n---\n\n## API Design Patterns\n\n### REST Best Practices\n\n**Resource Naming:**\n- Use nouns, not verbs: `/users` not `/getUsers`\n- Use plural: `/users` not `/user`\n- Nest for relationships: `/users/{id}/orders`\n\n**HTTP Methods:**\n\n| Method | Purpose | Idempotent |\n|--------|---------|------------|\n| GET | Retrieve | Yes |\n| POST | Create | No |\n| PUT | Replace | Yes |\n| PATCH | Partial update | No |\n| DELETE | Remove | Yes |\n\n**Response Envelope:**\n\n```typescript\n// Success response\n{\n  \"data\": { /* resource */ },\n  \"meta\": {\n    \"requestId\": \"abc-123\",\n    \"timestamp\": \"2024-01-15T10:30:00Z\"\n  }\n}\n\n// Paginated response\n{\n  \"data\": [/* items */],\n  \"pagination\": {\n    \"page\": 1,\n    \"pageSize\": 20,\n    \"total\": 150,\n    \"totalPages\": 8\n  }\n}\n\n// Error response\n{\n  \"error\": {\n    \"code\": \"VALIDATION_ERROR\",\n    \"message\": \"Invalid input\",\n    \"details\": [\n      { \"field\": \"email\", \"message\": \"Invalid email format\" }\n    ]\n  },\n  \"meta\": { \"requestId\": \"abc-123\" }\n}\n```\n\n### GraphQL Architecture\n\n**Schema-First Design:**\n\n```graphql\ntype Query {\n  user(id: ID!): User\n  users(filter: UserFilter, page: PageInput): UserConnection!\n}\n\ntype Mutation {\n  createUser(input: CreateUserInput!): UserPayload!\n  updateUser(id: ID!, input: UpdateUserInput!): UserPayload!\n}\n\ntype User {\n  id: ID!\n  email: String!\n  profile: Profile\n  orders(first: Int, after: String): OrderConnection!\n}\n\ntype UserPayload {\n  user: User\n  errors: [Error!]\n}\n```\n\n**Resolver Pattern:**\n\n```typescript\nconst resolvers = {\n  Query: {\n    user: async (_, { id }, { dataSources }) => {\n      return dataSources.userAPI.findById(id);\n    },\n  },\n  User: {\n    // Field resolver for related data\n    orders: async (user, { first, after }, { dataSources }) => {\n      return dataSources.orderAPI.findByUserId(user.id, { first, after });\n    },\n  },\n};\n```\n\n**DataLoader for N+1 Prevention:**\n\n```typescript\nconst userLoader = new DataLoader(async (userIds: string[]) => {\n  const users = await db.query(\n    \"SELECT * FROM users WHERE id = ANY($1)\",\n    [userIds]\n  );\n  // Return in same order as input\n  return userIds.map(id => users.find(u => u.id === id));\n});\n```\n\n---\n\n## Database Patterns\n\n### Connection Pooling\n\n```typescript\n// PostgreSQL with connection pool\nconst pool = new Pool({\n  host: process.env.DB_HOST,\n  database: process.env.DB_NAME,\n  user: process.env.DB_USER,\n  password: process.env.DB_PASSWORD,\n  max: 20,                    // Maximum connections\n  idleTimeoutMillis: 30000,   // Close idle connections\n  connectionTimeoutMillis: 2000,\n});\n\n// Prisma with connection pool\nconst prisma = new PrismaClient({\n  datasources: {\n    db: {\n      url: `${process.env.DATABASE_URL}?connection_limit=20&pool_timeout=10`,\n    },\n  },\n});\n```\n\n### Transaction Patterns\n\n```typescript\n// Unit of Work pattern\nasync function transferFunds(from: string, to: string, amount: number) {\n  return await prisma.$transaction(async (tx) => {\n    const sender = await tx.account.update({\n      where: { id: from },\n      data: { balance: { decrement: amount } },\n    });\n\n    if (sender.balance < 0) {\n      throw new InsufficientFundsError();\n    }\n\n    await tx.account.update({\n      where: { id: to },\n      data: { balance: { increment: amount } },\n    });\n\n    return tx.transaction.create({\n      data: { fromId: from, toId: to, amount },\n    });\n  });\n}\n```\n\n### Read Replicas\n\n```typescript\n// Route reads to replica\nconst readDB = new PrismaClient({\n  datasources: { db: { url: process.env.READ_DATABASE_URL } },\n});\n\nconst writeDB = new PrismaClient({\n  datasources: { db: { url: process.env.WRITE_DATABASE_URL } },\n});\n\nclass UserRepository {\n  async findById(id: string) {\n    return readDB.user.findUnique({ where: { id } });\n  }\n\n  async create(data: CreateUserData) {\n    return writeDB.user.create({ data });\n  }\n}\n```\n\n---\n\n## Caching Strategies\n\n### Cache Layers\n\n```\nRequest → CDN Cache → Application Cache → Database Cache → Database\n```\n\n**Cache-Aside Pattern:**\n\n```typescript\nasync function getUser(id: string): Promise<User> {\n  const cacheKey = `user:${id}`;\n\n  // 1. Try cache\n  const cached = await redis.get(cacheKey);\n  if (cached) {\n    return JSON.parse(cached);\n  }\n\n  // 2. Fetch from database\n  const user = await db.user.findUnique({ where: { id } });\n  if (!user) throw new NotFoundError();\n\n  // 3. Store in cache\n  await redis.set(cacheKey, JSON.stringify(user), \"EX\", 3600);\n\n  return user;\n}\n\n// Invalidate on update\nasync function updateUser(id: string, data: UpdateData): Promise<User> {\n  const user = await db.user.update({ where: { id }, data });\n  await redis.del(`user:${id}`);\n  return user;\n}\n```\n\n**HTTP Cache Headers:**\n\n```typescript\n// Immutable assets (hashed filenames)\nres.setHeader(\"Cache-Control\", \"public, max-age=31536000, immutable\");\n\n// API responses\nres.setHeader(\"Cache-Control\", \"private, max-age=0, must-revalidate\");\nres.setHeader(\"ETag\", generateETag(data));\n\n// Static pages\nres.setHeader(\"Cache-Control\", \"public, max-age=3600, stale-while-revalidate=86400\");\n```\n\n---\n\n## Authentication Architecture\n\n### JWT + Refresh Token Flow\n\n```\n1. User logs in → Server returns access token (15min) + refresh token (7d)\n2. Client stores tokens (httpOnly cookie for refresh, memory for access)\n3. Access token expires → Client uses refresh token to get new pair\n4. Refresh token expires → User must log in again\n```\n\n**Implementation:**\n\n```typescript\n// Token generation\nfunction generateTokens(user: User) {\n  const accessToken = jwt.sign(\n    { sub: user.id, email: user.email },\n    process.env.JWT_SECRET,\n    { expiresIn: \"15m\" }\n  );\n\n  const refreshToken = jwt.sign(\n    { sub: user.id, tokenVersion: user.tokenVersion },\n    process.env.REFRESH_SECRET,\n    { expiresIn: \"7d\" }\n  );\n\n  return { accessToken, refreshToken };\n}\n\n// Refresh endpoint\napp.post(\"/auth/refresh\", async (req, res) => {\n  const refreshToken = req.cookies.refreshToken;\n\n  try {\n    const payload = jwt.verify(refreshToken, process.env.REFRESH_SECRET);\n    const user = await db.user.findUnique({ where: { id: payload.sub } });\n\n    // Check token version (invalidation mechanism)\n    if (user.tokenVersion !== payload.tokenVersion) {\n      throw new Error(\"Token revoked\");\n    }\n\n    const tokens = generateTokens(user);\n    setRefreshCookie(res, tokens.refreshToken);\n    res.json({ accessToken: tokens.accessToken });\n  } catch {\n    res.status(401).json({ error: \"Invalid refresh token\" });\n  }\n});\n```\n\n### Session-Based Auth\n\n```typescript\n// Redis session store\napp.use(session({\n  store: new RedisStore({ client: redisClient }),\n  secret: process.env.SESSION_SECRET,\n  resave: false,\n  saveUninitialized: false,\n  cookie: {\n    secure: process.env.NODE_ENV === \"production\",\n    httpOnly: true,\n    sameSite: \"lax\",\n    maxAge: 7 * 24 * 60 * 60 * 1000, // 7 days\n  },\n}));\n\n// Login\napp.post(\"/auth/login\", async (req, res) => {\n  const user = await authenticate(req.body.email, req.body.password);\n  req.session.userId = user.id;\n  res.json({ user });\n});\n\n// Middleware\nfunction requireAuth(req, res, next) {\n  if (!req.session.userId) {\n    return res.status(401).json({ error: \"Authentication required\" });\n  }\n  next();\n}\n```\n\n---\n\n## Decision Matrix\n\n| Pattern | Complexity | Scalability | When to Use |\n|---------|-----------|-------------|-------------|\n| Monolith | Low | Medium | MVPs, small teams |\n| Modular Monolith | Medium | High | Growing teams |\n| Microservices | High | Very High | Large orgs, diverse tech |\n| REST | Low | High | CRUD APIs, public APIs |\n| GraphQL | Medium | High | Complex data needs, mobile apps |\n| JWT Auth | Low | High | Stateless APIs, microservices |\n| Session Auth | Low | Medium | Traditional web apps |\n\nFile v1.0.0:references/development_workflows.md\n\n# Fullstack Development Workflows\n\nComplete development lifecycle workflows from local setup to production deployment.\n\n---\n\n## Table of Contents\n\n- [Local Development Setup](#local-development-setup)\n- [Git Workflows](#git-workflows)\n- [CI/CD Pipelines](#cicd-pipelines)\n- [Testing Strategies](#testing-strategies)\n- [Code Review Process](#code-review-process)\n- [Deployment Strategies](#deployment-strategies)\n- [Monitoring and Observability](#monitoring-and-observability)\n\n---\n\n## Local Development Setup\n\n### Docker Compose Development Environment\n\n```yaml\n# docker-compose.yml\nversion: \"3.8\"\n\nservices:\n  app:\n    build:\n      context: .\n      target: development\n    volumes:\n      - .:/app\n      - /app/node_modules\n    ports:\n      - \"3000:3000\"\n    environment:\n      - DATABASE_URL=postgresql://user:pass@db:5432/app\n      - REDIS_URL=redis://redis:6379\n    depends_on:\n      - db\n      - redis\n\n  db:\n    image: postgres:16-alpine\n    environment:\n      POSTGRES_USER: user\n      POSTGRES_PASSWORD: pass\n      POSTGRES_DB: app\n    volumes:\n      - postgres_data:/var/lib/postgresql/data\n    ports:\n      - \"5432:5432\"\n\n  redis:\n    image: redis:7-alpine\n    ports:\n      - \"6379:6379\"\n\nvolumes:\n  postgres_data:\n```\n\n**Multistage Dockerfile:**\n\n```dockerfile\n# Base stage\nFROM node:20-alpine AS base\nWORKDIR /app\nRUN apk add --no-cache libc6-compat\n\n# Development stage\nFROM base AS development\nCOPY package*.json ./\nRUN npm ci\nCOPY . .\nCMD [\"npm\", \"run\", \"dev\"]\n\n# Builder stage\nFROM base AS builder\nCOPY package*.json ./\nRUN npm ci\nCOPY . .\nRUN npm run build\n\n# Production stage\nFROM base AS production\nENV NODE_ENV=production\nCOPY --from=builder /app/package*.json ./\nRUN npm ci --only=production\nCOPY --from=builder /app/dist ./dist\nUSER node\nCMD [\"node\", \"dist/index.js\"]\n```\n\n### Environment Configuration\n\n```bash\n# .env.local (development)\nDATABASE_URL=\"postgresql://user:pass@localhost:5432/app_dev\"\nREDIS_URL=\"redis://localhost:6379\"\nJWT_SECRET=\"development-secret-change-in-prod\"\nLOG_LEVEL=\"debug\"\n\n# .env.test\nDATABASE_URL=\"postgresql://user:pass@localhost:5432/app_test\"\nLOG_LEVEL=\"error\"\n\n# .env.production (via secrets management)\nDATABASE_URL=\"${DATABASE_URL}\"\nREDIS_URL=\"${REDIS_URL}\"\nJWT_SECRET=\"${JWT_SECRET}\"\n```\n\n**Environment validation:**\n\n```typescript\nimport { z } from \"zod\";\n\nconst envSchema = z.object({\n  NODE_ENV: z.enum([\"development\", \"test\", \"production\"]),\n  DATABASE_URL: z.string().url(),\n  REDIS_URL: z.string().url().optional(),\n  JWT_SECRET: z.string().min(32),\n  PORT: z.coerce.number().default(3000),\n});\n\nexport const env = envSchema.parse(process.env);\n```\n\n---\n\n## Git Workflows\n\n### Trunk-Based Development\n\n```\nmain (protected)\n  │\n  ├── feature/user-auth (short-lived, 1-2 days max)\n  │   └── squash merge → main\n  │\n  ├── feature/payment-flow\n  │   └── squash merge → main\n  │\n  └── release/v1.2.0 (cut from main for hotfixes)\n```\n\n**Branch naming:**\n- `feature/description` - New features\n- `fix/description` - Bug fixes\n- `chore/description` - Maintenance tasks\n- `release/vX.Y.Z` - Release branches\n\n### Commit Standards\n\n**Conventional Commits:**\n\n```\n<type>(<scope>): <description>\n\n[optional body]\n\n[optional footer(s)]\n```\n\n**Types:**\n- `feat`: New feature\n- `fix`: Bug fix\n- `docs`: Documentation\n- `style`: Formatting\n- `refactor`: Code restructuring\n- `test`: Adding tests\n- `chore`: Maintenance\n\n**Examples:**\n\n```bash\nfeat(auth): add password reset flow\n\nImplement password reset with email verification.\nTokens expire after 1 hour.\n\nCloses #123\n\n---\n\nfix(api): handle null response in user endpoint\n\nThe API was returning 500 when user profile was incomplete.\nNow returns partial data with null fields.\n\n---\n\nchore(deps): update Next.js to 14.1.0\n\nBreaking changes addressed:\n- Updated Image component usage\n- Migrated to new metadata API\n```\n\n### Pre-commit Hooks\n\n```json\n// package.json\n{\n  \"scripts\": {\n    \"prepare\": \"husky install\"\n  },\n  \"lint-staged\": {\n    \"*.{ts,tsx}\": [\"eslint --fix\", \"prettier --write\"],\n    \"*.{json,md}\": [\"prettier --write\"]\n  }\n}\n```\n\n```bash\n# .husky/pre-commit\n#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx lint-staged\n\n# .husky/commit-msg\n#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx commitlint --edit $1\n```\n\n---\n\n## CI/CD Pipelines\n\n### GitHub Actions\n\n```yaml\n# .github/workflows/ci.yml\nname: CI\n\non:\n  push:\n    branches: [main]\n  pull_request:\n    branches: [main]\n\njobs:\n  lint:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n          cache: npm\n      - run: npm ci\n      - run: npm run lint\n      - run: npm run type-check\n\n  test:\n    runs-on: ubuntu-latest\n    services:\n      postgres:\n        image: postgres:16\n        env:\n          POSTGRES_USER: test\n          POSTGRES_PASSWORD: test\n          POSTGRES_DB: test\n        ports:\n          - 5432:5432\n        options: >-\n          --health-cmd pg_isready\n          --health-interval 10s\n          --health-timeout 5s\n          --health-retries 5\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n          cache: npm\n      - run: npm ci\n      - run: npm run test:unit\n      - run: npm run test:integration\n        env:\n          DATABASE_URL: postgresql://test:test@localhost:5432/test\n      - uses: codecov/codecov-action@v3\n\n  build:\n    runs-on: ubuntu-latest\n    needs: [lint, test]\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-node@v4\n        with:\n          node-version: 20\n          cache: npm\n      - run: npm ci\n      - run: npm run build\n      - uses: actions/upload-artifact@v4\n        with:\n          name: build\n          path: dist/\n\n  deploy-preview:\n    if: github.event_name == 'pull_request'\n    runs-on: ubuntu-latest\n    needs: build\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/download-artifact@v4\n        with:\n          name: build\n          path: dist/\n      # Deploy to preview environment\n      - name: Deploy Preview\n        run: |\n          # Deploy logic here\n          echo \"Deployed to preview-${{ github.event.pull_request.number }}\"\n\n  deploy-production:\n    if: github.ref == 'refs/heads/main'\n    runs-on: ubuntu-latest\n    needs: build\n    environment: production\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/download-artifact@v4\n        with:\n          name: build\n          path: dist/\n      - name: Deploy Production\n        run: |\n          # Production deployment\n          echo \"Deployed to production\"\n```\n\n### Database Migrations in CI\n\n```yaml\n# Part of deploy job\n- name: Run Migrations\n  run: |\n    npx prisma migrate deploy\n  env:\n    DATABASE_URL: ${{ secrets.DATABASE_URL }}\n\n- name: Verify Migration\n  run: |\n    npx prisma migrate status\n```\n\n---\n\n## Testing Strategies\n\n### Testing Pyramid\n\n```\n         /\\\n        /  \\        E2E Tests (10%)\n       /    \\       - Critical user journeys\n      /──────\\\n     /        \\     Integration Tests (20%)\n    /          \\    - API endpoints\n   /────────────\\   - Database operations\n  /              \\\n /                \\ Unit Tests (70%)\n/──────────────────\\ - Components, hooks, utilities\n```\n\n### Unit Testing\n\n```typescript\n// Component test with React Testing Library\nimport { render, screen, fireEvent } from \"@testing-library/react\";\nimport { UserForm } from \"./UserForm\";\n\ndescribe(\"UserForm\", () => {\n  it(\"submits form with valid data\", async () => {\n    const onSubmit = vi.fn();\n    render(<UserForm onSubmit={onSubmit} />);\n\n    fireEvent.change(screen.getByLabelText(/email/i), {\n      target: { value: \"test@example.com\" },\n    });\n    fireEvent.change(screen.getByLabelText(/name/i), {\n      target: { value: \"John Doe\" },\n    });\n    fireEvent.click(screen.getByRole(\"button\", { name: /submit/i }));\n\n    await waitFor(() => {\n      expect(onSubmit).toHaveBeenCalledWith({\n        email: \"test@example.com\",\n        name: \"John Doe\",\n      });\n    });\n  });\n\n  it(\"shows validation error for invalid email\", async () => {\n    render(<UserForm onSubmit={vi.fn()} />);\n\n    fireEvent.change(screen.getByLabelText(/email/i), {\n      target: { value: \"invalid\" },\n    });\n    fireEvent.click(screen.getByRole(\"button\", { name: /submit/i }));\n\n    expect(await screen.findByText(/invalid email/i)).toBeInTheDocument();\n  });\n});\n```\n\n### Integration Testing\n\n```typescript\n// API integration test\nimport { createTestClient } from \"./test-utils\";\nimport { db } from \"@/lib/db\";\n\ndescribe(\"POST /api/users\", () => {\n  beforeEach(async () => {\n    await db.user.deleteMany();\n  });\n\n  it(\"creates user with valid data\", async () => {\n    const client = createTestClient();\n\n    const response = await client.post(\"/api/users\", {\n      email: \"new@example.com\",\n      name: \"New User\",\n    });\n\n    expect(response.status).toBe(201);\n    expect(response.data.user.email).toBe(\"new@example.com\");\n\n    // Verify in database\n    const user = await db.user.findUnique({\n      where: { email: \"new@example.com\" },\n    });\n    expect(user).toBeTruthy();\n  });\n\n  it(\"returns 409 for duplicate email\", async () => {\n    await db.user.create({\n      data: { email: \"existing@example.com\", name: \"Existing\" },\n    });\n\n    const client = createTestClient();\n\n    const response = await client.post(\"/api/users\", {\n      email: \"existing@example.com\",\n      name: \"Duplicate\",\n    });\n\n    expect(response.status).toBe(409);\n    expect(response.data.error.code).toBe(\"EMAIL_EXISTS\");\n  });\n});\n```\n\n### E2E Testing with Playwright\n\n```typescript\n// e2e/auth.spec.ts\nimport { test, expect } from \"@playwright/test\";\n\ntest.describe(\"Authentication\", () => {\n  test(\"user can log in and access dashboard\", async ({ page }) => {\n    await page.goto(\"/login\");\n\n    await page.fill('[name=\"email\"]', \"user@example.com\");\n    await page.fill('[name=\"password\"]', \"password123\");\n    await page.click('button[type=\"submit\"]');\n\n    await expect(page).toHaveURL(\"/dashboard\");\n    await expect(page.locator(\"h1\")).toHaveText(\"Welcome back\");\n  });\n\n  test(\"shows error for invalid credentials\", async ({ page }) => {\n    await page.goto(\"/login\");\n\n    await page.fill('[name=\"email\"]', \"wrong@example.com\");\n    await page.fill('[name=\"password\"]', \"wrongpassword\");\n    await page.click('button[type=\"submit\"]');\n\n    await expect(page.locator('[role=\"alert\"]')).toHaveText(\n      \"Invalid email or password\"\n    );\n  });\n});\n```\n\n---\n\n## Code Review Process\n\n### PR Template\n\n```markdown\n## Summary\n<!-- Brief description of changes -->\n\n## Type of Change\n- [ ] Bug fix\n- [ ] New feature\n- [ ] Breaking change\n- [ ] Documentation update\n\n## Changes Made\n<!-- List specific changes -->\n\n## Testing\n- [ ] Unit tests added/updated\n- [ ] Integration tests added/updated\n- [ ] Manual testing completed\n\n## Screenshots\n<!-- If applicable -->\n\n## Checklist\n- [ ] Code follows style guidelines\n- [ ] Self-review completed\n- [ ] Documentation updated\n- [ ] No new warnings\n```\n\n### Review Checklist\n\n**Functionality:**\n- Does the code do what it's supposed to?\n- Are edge cases handled?\n- Is error handling appropriate?\n\n**Code Quality:**\n- Is the code readable and maintainable?\n- Are there any code smells?\n- Is there unnecessary duplication?\n\n**Performance:**\n- Are there N+1 queries?\n- Is caching used appropriately?\n- Are there memory leaks?\n\n**Security:**\n- Is user input validated?\n- Are there injection vulnerabilities?\n- Is sensitive data protected?\n\n---\n\n## Deployment Strategies\n\n### Blue-Green Deployment\n\n```\n                 Load Balancer\n                      │\n         ┌────────────┴────────────┐\n         │                         │\n    ┌────┴────┐              ┌─────┴────┐\n    │  Blue   │              │  Green   │\n    │ (Live)  │              │  (Idle)  │\n    └─────────┘              └──────────┘\n\n1. Deploy new version to Green\n2. Run smoke tests on Green\n3. Switch traffic to Green\n4. Blue becomes idle (rollback target)\n```\n\n### Canary Deployment\n\n```\n                 Load Balancer\n                      │\n         ┌────────────┴────────────┐\n         │                         │\n         │ 95%                5%   │\n         ▼                         ▼\n    ┌─────────┐              ┌──────────┐\n    │ Stable  │              │  Canary  │\n    │ v1.0.0  │              │  v1.1.0  │\n    └─────────┘              └──────────┘\n\n1. Deploy canary with small traffic %\n2. Monitor error rates, latency\n3. Gradually increase traffic\n4. Full rollout or rollback\n```\n\n### Feature Flags\n\n```typescript\n// Feature flag service\nconst flags = {\n  newCheckoutFlow: {\n    enabled: true,\n    rolloutPercentage: 25,\n    allowedUsers: [\"beta-testers\"],\n  },\n};\n\nfunction isFeatureEnabled(flag: string, userId: string): boolean {\n  const config = flags[flag];\n  if (!config?.enabled) return false;\n\n  // Check allowed users\n  if (config.allowedUsers?.includes(userId)) return true;\n\n  // Check rollout percentage\n  const hash = hashUserId(userId);\n  return hash < config.rolloutPercentage;\n}\n\n// Usage\nif (isFeatureEnabled(\"newCheckoutFlow\", user.id)) {\n  return <NewCheckout />;\n}\nreturn <LegacyCheckout />;\n```\n\n---\n\n## Monitoring and Observability\n\n### Structured Logging\n\n```typescript\nimport pino from \"pino\";\n\nconst logger = pino({\n  level: process.env.LOG_LEVEL || \"info\",\n  formatters: {\n    level: (label) => ({ level: label }),\n  },\n});\n\n// Request logging middleware\napp.use((req, res, next) => {\n  const start = Date.now();\n  const requestId = req.headers[\"x-request-id\"] || crypto.randomUUID();\n\n  res.on(\"finish\", () => {\n    logger.info({\n      type: \"request\",\n      requestId,\n      method: req.method,\n      path: req.path,\n      statusCode: res.statusCode,\n      duration: Date.now() - start,\n      userAgent: req.headers[\"user-agent\"],\n    });\n  });\n\n  next();\n});\n\n// Application logging\nlogger.info({ userId: user.id, action: \"login\" }, \"User logged in\");\nlogger.error({ err, orderId }, \"Failed to process order\");\n```\n\n### Metrics Collection\n\n```typescript\nimport { Counter, Histogram } from \"prom-client\";\n\nconst httpRequestsTotal = new Counter({\n  name: \"http_requests_total\",\n  help: \"Total HTTP requests\",\n  labelNames: [\"method\", \"path\", \"status\"],\n});\n\nconst httpRequestDuration = new Histogram({\n  name: \"http_request_duration_seconds\",\n  help: \"HTTP request duration\",\n  labelNames: [\"method\", \"path\"],\n  buckets: [0.1, 0.3, 0.5, 1, 3, 5, 10],\n});\n\n// Middleware\napp.use((req, res, next) => {\n  const end = httpRequestDuration.startTimer({\n    method: req.method,\n    path: req.route?.path || req.path,\n  });\n\n  res.on(\"finish\", () => {\n    httpRequestsTotal.inc({\n      method: req.method,\n      path: req.route?.path || req.path,\n      status: res.statusCode,\n    });\n    end();\n  });\n\n  next();\n});\n```\n\n### Health Checks\n\n```typescript\napp.get(\"/health\", async (req, res) => {\n  const checks = {\n    database: await checkDatabase(),\n    redis: await checkRedis(),\n    memory: checkMemory(),\n  };\n\n  const healthy = Object.values(checks).every((c) => c.status === \"healthy\");\n\n  res.status(healthy ? 200 : 503).json({\n    status: healthy ? \"healthy\" : \"unhealthy\",\n    checks,\n    timestamp: new Date().toISOString(),\n  });\n});\n\nasync function checkDatabase() {\n  try {\n    await db.$queryRaw`SELECT 1`;\n    return { status: \"healthy\" };\n  } catch (error) {\n    return { status: \"unhealthy\", error: error.message };\n  }\n}\n\nfunction checkMemory() {\n  const used = process.memoryUsage();\n  const heapUsedMB = Math.round(used.heapUsed / 1024 / 1024);\n  const heapTotalMB = Math.round(used.heapTotal / 1024 / 1024);\n\n  return {\n    status: heapUsedMB < heapTotalMB * 0.9 ? \"healthy\" : \"warning\",\n    heapUsedMB,\n    heapTotalMB,\n  };\n}\n```\n\n---\n\n## Quick Reference\n\n### Daily Workflow\n\n```bash\n# 1. Start work\ngit checkout main && git pull\ngit checkout -b feature/my-feature\n\n# 2. Develop with hot reload\ndocker-compose up -d\nnpm run dev\n\n# 3. Test changes\nnpm run test\nnpm run lint\n\n# 4. Commit\ngit add -A\ngit commit -m \"feat(scope): description\"\n\n# 5. Push and create PR\ngit push -u origin feature/my-feature\ngh pr create\n```\n\n### Release Workflow\n\n```bash\n# 1. Ensure main is stable\ngit checkout main\nnpm run test:all\n\n# 2. Create release\nnpm version minor  # or major/patch\ngit push --follow-tags\n\n# 3. Verify deployment\n# CI/CD deploys automatically\n# Monitor dashboards\n```\n\nFile v1.0.0:references/tech_stack_guide.md\n\n# Fullstack Tech Stack Guide\n\nTechnology selection guide with trade-offs, use cases, and integration patterns for modern fullstack development.\n\n---\n\n## Table of Contents\n\n- [Frontend Frameworks](#frontend-frameworks)\n- [Backend Frameworks](#backend-frameworks)\n- [Databases](#databases)\n- [ORMs and Query Builders](#orms-and-query-builders)\n- [Authentication Solutions](#authentication-solutions)\n- [Deployment Platforms](#deployment-platforms)\n- [Stack Recommendations](#stack-recommendations)\n\n---\n\n## Frontend Frameworks\n\n### Next.js\n\n**Best for:** Production React apps, SEO-critical sites, full-stack applications\n\n| Pros | Cons |\n|------|------|\n| Server components, streaming | Learning curve for advanced features |\n| Built-in routing, API routes | Vercel lock-in concerns |\n| Excellent DX and performance | Bundle size can grow |\n| Strong TypeScript support | Complex mental model (client/server) |\n\n**When to choose:**\n- Need SSR/SSG for SEO\n- Building a product that may scale\n- Want full-stack in one framework\n- Team familiar with React\n\n```typescript\n// App Router pattern\n// app/users/page.tsx\nasync function UsersPage() {\n  const users = await db.user.findMany(); // Server component\n  return <UserList users={users} />;\n}\n\n// app/users/[id]/page.tsx\nexport async function generateStaticParams() {\n  const users = await db.user.findMany();\n  return users.map((user) => ({ id: user.id }));\n}\n```\n\n### React + Vite\n\n**Best for:** SPAs, dashboards, internal tools\n\n| Pros | Cons |\n|------|------|\n| Fast development with HMR | No SSR out of the box |\n| Simple mental model | Manual routing setup |\n| Flexible architecture | No built-in API routes |\n| Smaller bundle potential | Need separate backend |\n\n**When to choose:**\n- Building internal dashboards\n- SEO not important\n- Need maximum flexibility\n- Prefer decoupled frontend/backend\n\n### Vue 3\n\n**Best for:** Teams transitioning from jQuery, progressive enhancement\n\n| Pros | Cons |\n|------|------|\n| Gentle learning curve | Smaller ecosystem than React |\n| Excellent documentation | Fewer enterprise adoptions |\n| Single-file components | Composition API learning curve |\n| Good TypeScript support | Two paradigms (Options/Composition) |\n\n**When to choose:**\n- Team new to modern frameworks\n- Progressive enhancement needed\n- Prefer official solutions (Pinia, Vue Router)\n\n### Comparison Matrix\n\n| Feature | Next.js | React+Vite | Vue 3 | Svelte |\n|---------|---------|------------|-------|--------|\n| SSR | Built-in | Manual | Nuxt | SvelteKit |\n| Bundle size | Medium | Small | Small | Smallest |\n| Learning curve | Medium | Low | Low | Low |\n| Enterprise adoption | High | High | Medium | Low |\n| Job market | Large | Large | Medium | Small |\n\n---\n\n## Backend Frameworks\n\n### Node.js Ecosystem\n\n**Express.js**\n\n```typescript\nimport express from \"express\";\nimport { userRouter } from \"./routes/users\";\n\nconst app = express();\napp.use(express.json());\napp.use(\"/api/users\", userRouter);\napp.listen(3000);\n```\n\n| Pros | Cons |\n|------|------|\n| Minimal, flexible | No structure opinions |\n| Huge middleware ecosystem | Callback-based (legacy) |\n| Well understood | Manual TypeScript setup |\n\n**Fastify**\n\n```typescript\nimport Fastify from \"fastify\";\n\nconst app = Fastify({ logger: true });\n\napp.get(\"/users/:id\", {\n  schema: {\n    params: { type: \"object\", properties: { id: { type: \"string\" } } },\n    response: { 200: UserSchema },\n  },\n  handler: async (request) => {\n    return db.user.findUnique({ where: { id: request.params.id } });\n  },\n});\n```\n\n| Pros | Cons |\n|------|------|\n| High performance | Smaller ecosystem |\n| Built-in validation | Different plugin model |\n| TypeScript-first | Less community content |\n\n**NestJS**\n\n```typescript\n@Controller(\"users\")\nexport class UsersController {\n  constructor(private usersService: UsersService) {}\n\n  @Get(\":id\")\n  findOne(@Param(\"id\") id: string) {\n    return this.usersService.findOne(id);\n  }\n\n  @Post()\n  @UseGuards(AuthGuard)\n  create(@Body() createUserDto: CreateUserDto) {\n    return this.usersService.create(createUserDto);\n  }\n}\n```\n\n| Pros | Cons |\n|------|------|\n| Strong architecture | Steep learning curve |\n| Full-featured (GraphQL, WebSockets) | Heavy for small projects |\n| Enterprise-ready | Decorator complexity |\n\n### Python Ecosystem\n\n**FastAPI**\n\n```python\nfrom fastapi import FastAPI, Depends\nfrom sqlalchemy.orm import Session\n\napp = FastAPI()\n\n@app.get(\"/users/{user_id}\", response_model=UserResponse)\nasync def get_user(user_id: int, db: Session = Depends(get_db)):\n    user = db.query(User).filter(User.id == user_id).first()\n    if not user:\n        raise HTTPException(status_code=404)\n    return user\n```\n\n| Pros | Cons |\n|------|------|\n| Auto-generated docs | Python GIL limitations |\n| Type hints → validation | Async ecosystem maturing |\n| High performance | Smaller than Django ecosystem |\n\n**Django**\n\n| Pros | Cons |\n|------|------|\n| Batteries included | Monolithic |\n| Admin panel | ORM limitations |\n| Mature ecosystem | Async support newer |\n\n### Framework Selection Guide\n\n| Use Case | Recommendation |\n|----------|---------------|\n| API-first startup | FastAPI or Fastify |\n| Enterprise backend | NestJS or Django |\n| Microservices | Fastify or Go |\n| Rapid prototype | Express or Django |\n| Full-stack TypeScript | Next.js API routes |\n\n---\n\n## Databases\n\n### PostgreSQL\n\n**Best for:** Most applications, relational data, ACID compliance\n\n```sql\n-- JSON support\nCREATE TABLE users (\n  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),\n  email VARCHAR(255) UNIQUE NOT NULL,\n  profile JSONB DEFAULT '{}',\n  created_at TIMESTAMPTZ DEFAULT NOW()\n);\n\n-- Full-text search\nCREATE INDEX users_search_idx ON users\n  USING GIN (to_tsvector('english', email || ' ' || profile->>'name'));\n\nSELECT * FROM users\nWHERE to_tsvector('english', email || ' ' || profile->>'name')\n  @@ to_tsquery('john');\n```\n\n| Feature | Rating |\n|---------|--------|\n| ACID compliance | Excellent |\n| JSON support | Excellent |\n| Full-text search | Good |\n| Horizontal scaling | Requires setup |\n| Managed options | Many (RDS, Supabase, Neon) |\n\n### MongoDB\n\n**Best for:** Document-heavy apps, flexible schemas, rapid prototyping\n\n```typescript\n// Flexible schema\nconst userSchema = new Schema({\n  email: { type: String, required: true, unique: true },\n  profile: {\n    name: String,\n    preferences: Schema.Types.Mixed, // Any structure\n  },\n  orders: [{ type: Schema.Types.ObjectId, ref: \"Order\" }],\n});\n```\n\n| Feature | Rating |\n|---------|--------|\n| Schema flexibility | Excellent |\n| Horizontal scaling | Excellent |\n| Transactions | Good (4.0+) |\n| Joins | Limited |\n| Managed options | Atlas |\n\n### Redis\n\n**Best for:** Caching, sessions, real-time features, queues\n\n```typescript\n// Session storage\nawait redis.set(`session:${sessionId}`, JSON.stringify(user), \"EX\", 3600);\n\n// Rate limiting\nconst requests = await redis.incr(`rate:${ip}`);\nif (requests === 1) await redis.expire(`rate:${ip}`, 60);\nif (requests > 100) throw new TooManyRequestsError();\n\n// Pub/Sub\nredis.publish(\"notifications\", JSON.stringify({ userId, message }));\n```\n\n### Database Selection Matrix\n\n| Requirement | PostgreSQL | MongoDB | MySQL |\n|-------------|-----------|---------|-------|\n| Complex queries | Best | Limited | Good |\n| Schema flexibility | Good (JSONB) | Best | Limited |\n| Transactions | Best | Good | Good |\n| Horizontal scale | Manual | Built-in | Manual |\n| Cloud managed | Many | Atlas | Many |\n\n---\n\n## ORMs and Query Builders\n\n### Prisma\n\n**Best for:** TypeScript projects, schema-first development\n\n```typescript\n// schema.prisma\nmodel User {\n  id        String   @id @default(cuid())\n  email     String   @unique\n  posts     Post[]\n  profile   Profile?\n  createdAt DateTime @default(now())\n}\n\n// Usage - fully typed\nconst user = await prisma.user.findUnique({\n  where: { email: \"user@example.com\" },\n  include: { posts: true, profile: true },\n});\n// user.posts is Post[] - TypeScript knows\n```\n\n| Pros | Cons |\n|------|------|\n| Excellent TypeScript | Generated client size |\n| Schema migrations | Limited raw SQL support |\n| Visual studio | Some edge case limitations |\n\n### Drizzle\n\n**Best for:** SQL-first TypeScript, performance-critical apps\n\n```typescript\n// Schema definition\nconst users = pgTable(\"users\", {\n  id: uuid(\"id\").primaryKey().defaultRandom(),\n  email: varchar(\"email\", { length: 255 }).notNull().unique(),\n  createdAt: timestamp(\"created_at\").defaultNow(),\n});\n\n// Query - SQL-like syntax\nconst result = await db\n  .select()\n  .from(users)\n  .where(eq(users.email, \"user@example.com\"))\n  .leftJoin(posts, eq(posts.userId, users.id));\n```\n\n| Pros | Cons |\n|------|------|\n| Lightweight | Newer, smaller community |\n| SQL-like syntax | Fewer integrations |\n| Fast runtime | Manual migrations |\n\n### SQLAlchemy (Python)\n\n```python\n# Model definition\nclass User(Base):\n    __tablename__ = \"users\"\n\n    id = Column(UUID, primary_key=True, default=uuid4)\n    email = Column(String(255), unique=True, nullable=False)\n    posts = relationship(\"Post\", back_populates=\"author\")\n\n# Query\nusers = session.query(User)\\\n    .filter(User.email.like(\"%@example.com\"))\\\n    .options(joinedload(User.posts))\\\n    .all()\n```\n\n---\n\n## Authentication Solutions\n\n### Auth.js (NextAuth)\n\n**Best for:** Next.js apps, social logins\n\n```typescript\n// app/api/auth/[...nextauth]/route.ts\nimport NextAuth from \"next-auth\";\nimport GitHub from \"next-auth/providers/github\";\nimport Credentials from \"next-auth/providers/credentials\";\n\nexport const { handlers, auth, signIn, signOut } = NextAuth({\n  providers: [\n    GitHub,\n    Credentials({\n      credentials: { email: {}, password: {} },\n      authorize: async (credentials) => {\n        const user = await verifyCredentials(credentials);\n        return user;\n      },\n    }),\n  ],\n  callbacks: {\n    jwt({ token, user }) {\n      if (user) token.role = user.role;\n      return token;\n    },\n  },\n});\n```\n\n| Pros | Cons |\n|------|------|\n| Many providers | Next.js focused |\n| Session management | Complex customization |\n| Database adapters | Breaking changes between versions |\n\n### Clerk\n\n**Best for:** Rapid development, hosted solution\n\n```typescript\n// Middleware\nimport { clerkMiddleware } from \"@clerk/nextjs/server\";\n\nexport default clerkMiddleware();\n\n// Usage\nimport { auth } from \"@clerk/nextjs/server\";\n\nexport async function GET() {\n  const { userId } = await auth();\n  if (!userId) return new Response(\"Unauthorized\", { status: 401 });\n  // ...\n}\n```\n\n| Pros | Cons |\n|------|------|\n| Beautiful UI components | Vendor lock-in |\n| Managed infrastructure | Cost at scale |\n| Multi-factor auth | Data residency concerns |\n\n### Custom JWT\n\n**Best for:** Full control, microservices\n\n```typescript\n// Token generation\nfunction generateTokens(user: User) {\n  const accessToken = jwt.sign(\n    { sub: user.id, role: user.role },\n    process.env.JWT_SECRET,\n    { expiresIn: \"15m\" }\n  );\n\n  const refreshToken = jwt.sign(\n    { sub: user.id, version: user.tokenVersion },\n    process.env.REFRESH_SECRET,\n    { expiresIn: \"7d\" }\n  );\n\n  return { accessToken, refreshToken };\n}\n\n// Middleware\nfunction authenticate(req, res, next) {\n  const token = req.headers.authorization?.replace(\"Bearer \", \"\");\n  if (!token) return res.status(401).json({ error: \"No token\" });\n\n  try {\n    req.user = jwt.verify(token, process.env.JWT_SECRET);\n    next();\n  } catch {\n    res.status(401).json({ error: \"Invalid token\" });\n  }\n}\n```\n\n---\n\n## Deployment Platforms\n\n### Vercel\n\n**Best for:** Next.js, frontend-focused teams\n\n| Pros | Cons |\n|------|------|\n| Zero-config Next.js | Expensive at scale |\n| Edge functions | Vendor lock-in |\n| Preview deployments | Limited backend options |\n| Global CDN | Cold starts |\n\n### Railway\n\n**Best for:** Full-stack apps, databases included\n\n| Pros | Cons |\n|------|------|\n| Simple deployment | Smaller community |\n| Built-in databases | Limited regions |\n| Good pricing | Fewer integrations |\n\n### AWS (ECS/Lambda)\n\n**Best for:** Enterprise, complex requirements\n\n| Pros | Cons |\n|------|------|\n| Full control | Complex setup |\n| Cost-effective at scale | Steep learning curve |\n| Any technology | Requires DevOps knowledge |\n\n### Deployment Selection\n\n| Requirement | Platform |\n|-------------|----------|\n| Next.js simplicity | Vercel |\n| Full-stack + DB | Railway, Render |\n| Enterprise scale | AWS, GCP |\n| Container control | Fly.io, Railway |\n| Budget startup | Railway, Render |\n\n---\n\n## Stack Recommendations\n\n### Startup MVP\n\n```\nFrontend: Next.js 14 (App Router)\nBackend:  Next.js API Routes\nDatabase: PostgreSQL (Neon/Supabase)\nAuth:     Auth.js or Clerk\nDeploy:   Vercel\nCache:    Vercel KV or Upstash Redis\n```\n\n**Why:** Fastest time to market, single deployment, good scaling path.\n\n### SaaS Product\n\n```\nFrontend: Next.js 14\nBackend:  Separate API (FastAPI or NestJS)\nDatabase: PostgreSQL (RDS)\nAuth:     Custom JWT + Auth.js\nDeploy:   Vercel (frontend) + AWS ECS (backend)\nCache:    Redis (ElastiCache)\nQueue:    SQS or BullMQ\n```\n\n**Why:** Separation allows independent scaling, team specialization.\n\n### Enterprise Application\n\n```\nFrontend: Next.js or React + Vite\nBackend:  NestJS or Go\nDatabase: PostgreSQL (Aurora)\nAuth:     Keycloak or Auth0\nDeploy:   Kubernetes (EKS/GKE)\nCache:    Redis Cluster\nQueue:    Kafka or RabbitMQ\nObservability: Datadog or Grafana Stack\n```\n\n**Why:** Maximum control, compliance requirements, team expertise.\n\n### Internal Tool\n\n```\nFrontend: React + Vite + Tailwind\nBackend:  Express or FastAPI\nDatabase: PostgreSQL or SQLite\nAuth:     OIDC with corporate IdP\nDeploy:   Docker on internal infrastructure\n```\n\n**Why:** Simple, low maintenance, integrates with existing systems.\n\n---\n\n## Quick Decision Guide\n\n| Question | If Yes → | If No → |\n|----------|----------|---------|\n| Need SEO? | Next.js SSR | React SPA |\n| Complex backend? | Separate API | Next.js routes |\n| Team knows Python? | FastAPI | Node.js |\n| Need real-time? | Add WebSockets | REST is fine |\n| Enterprise compliance? | Self-hosted | Managed services |\n| Budget constrained? | Railway/Render | Vercel/AWS |\n| Schema changes often? | MongoDB | PostgreSQL |","readmeExcerpt":"Skill: Senior Fullstack Owner: alirezarezvani Summary: Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-06T18:27:48.566Z | auto - Initial release of the senior-fullstack skill. - Prov","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"# List available templates\npython scripts/project_scaffolder.py --list-templates\n\n# Create Next.js project\npython scripts/project_scaffolder.py nextjs my-app\n\n# Create FastAPI + React project\npython scripts/project_scaffolder.py fastapi-react my-api\n\n# Create MERN stack project\npython scripts/project_scaffolder.py mern my-project\n\n# Create Django + React project\npython scripts/project_scaffolder.py django-react my-app\n\n# Specify output directory\npython scripts/project_scaffolder.py nextjs my-app --output ./projects\n\n# JSON output\npython scripts/project_scaffolder.py nextjs my-app --json"},{"language":"bash","snippet":"# Analyze current directory\npython scripts/code_quality_analyzer.py .\n\n# Analyze specific project\npython scripts/code_quality_analyzer.py /path/to/project\n\n# Verbose output with detailed findings\npython scripts/code_quality_analyzer.py . --verbose\n\n# JSON output\npython scripts/code_quality_analyzer.py . --json\n\n# Save report to file\npython scripts/code_quality_analyzer.py . --output report.json"},{"language":"text","snippet":"============================================================\nCODE QUALITY ANALYSIS REPORT\n============================================================\n\nOverall Score: 75/100 (Grade: C)\nFiles Analyzed: 45\nTotal Lines: 12,500\n\n--- SECURITY ---\n  Critical: 1\n  High: 2\n  Medium: 5\n\n--- COMPLEXITY ---\n  Average Complexity: 8.5\n  High Complexity Files: 3\n\n--- RECOMMENDATIONS ---\n1. [P0] SECURITY\n   Issue: Potential hardcoded secret detected\n   Action: Remove or secure sensitive data at line 42"},{"language":"bash","snippet":"# 1. Scaffold project\npython scripts/project_scaffolder.py nextjs my-saas-app\n\n# 2. Navigate and install\ncd my-saas-app\nnpm install\n\n# 3. Configure environment\ncp .env.example .env.local\n\n# 4. Run quality check\npython ../scripts/code_quality_analyzer.py .\n\n# 5. Start development\nnpm run dev"},{"language":"bash","snippet":"# 1. Full analysis\npython scripts/code_quality_analyzer.py /path/to/project --verbose\n\n# 2. Generate detailed report\npython scripts/code_quality_analyzer.py /path/to/project --json --output audit.json\n\n# 3. Address P0 issues immediately\n# 4. Create tickets for P1/P2 issues"},{"language":"text","snippet":"src/components/\n├── atoms/           # Button, Input, Icon\n├── molecules/       # SearchInput, FormField\n├── organisms/       # Header, Footer, Sidebar\n├── templates/       # PageLayout, DashboardLayout\n└── pages/           # Home, Profile, Settings"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: senior-fullstack\ndescription: Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns.\n---\n\n# Senior Fullstack\n\nFullstack development skill with project scaffolding and code quality analysis tools.\n\n---\n\n## Table of Contents\n\n- [Trigger Phrases](#trigger-phrases)\n- [Tools](#tools)\n- [Workflows](#workflows)\n- [Reference Guides](#reference-guides)\n\n---\n\n## Trigger Phrases\n\nUse this skill when you hear:\n- \"scaffold a new project\"\n- \"create a Next.js app\"\n- \"set up FastAPI with React\"\n- \"analyze code quality\"\n- \"check for security issues in codebase\"\n- \"what stack should I use\"\n- \"set up a fullstack project\"\n- \"generate project boilerplate\"\n\n---\n\n## Tools\n\n### Project Scaffolder\n\nGenerates fullstack project structures with boilerplate code.\n\n**Supported Templates:**\n- `nextjs` - Next.js 14+ with App Router, TypeScript, Tailwind CSS\n- `fastapi-react` - FastAPI backend + React frontend + PostgreSQL\n- `mern` - MongoDB, Express, React, Node.js with TypeScript\n- `django-react` - Django REST Framework + React frontend\n\n**Usage:**\n\n```bash\n# List available templates\npython scripts/project_scaffolder.py --list-templates\n\n# Create Next.js project\npython scripts/project_scaffolder.py nextjs my-app\n\n# Create FastAPI + React project\npython scripts/project_scaffolder.py fastapi-react my-api\n\n# Create MERN stack project\npython scripts/project_scaffolder.py mern my-project\n\n# Create Django + React project\npython scripts/project_scaffolder.py django-react my-app\n\n# Specify output directory\npython scripts/project_scaffolder.py nextjs my-app --output ./projects\n\n# JSON output\npython scripts/project_scaffolder.py nextjs my-app --json\n```\n\n**Parameters:**\n\n| Parameter | Description |\n|-----------|-------------|\n| `template` | Template name (nextjs, fastapi-react, mern, django-react) |\n| `project_name` | Name for the new project directory |\n| `--output, -o` | Output directory (default: current directory) |\n| `--list-templates, -l` | List all available templates |\n| `--json` | Output in JSON format |\n\n**Output includes:**\n- Project structure with all necessary files\n- Package configurations (package.json, requirements.txt)\n- TypeScript configuration\n- Docker and docker-compose setup\n- Environment file templates\n- Next steps for running the project\n\n---\n\n### Code Quality Analyzer\n\nAnalyzes fullstack codebases for quality issues.\n\n**Analysis Categories:**\n- Security vulnerabilities (hardcoded secrets, injection risks)\n- Code complexity metrics (cyclomatic complexity, nesting depth)\n- Dependency health (outdated packages, known CVEs)\n- Test coverage estimation\n- Documentation quality\n\n**Usage:**\n\n```bash\n# Analyze current directory\npython scripts/code_quality_analyzer.py .\n\n# Analyze specific project\npython scripts/code_quality_analyzer.py /path/to/project\n\n# Verbose output with detailed find"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7f2gr00xy51fj1nx2y64ckjs800mhn\",\n  \"slug\": \"senior-fullstack\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1770402468566\n}"},{"path":"references/architecture_patterns.md","content":"# Fullstack Architecture Patterns\n\nProven architectural patterns for scalable fullstack applications covering frontend, backend, and their integration.\n\n---\n\n## Table of Contents\n\n- [Frontend Architecture](#frontend-architecture)\n- [Backend Architecture](#backend-architecture)\n- [API Design Patterns](#api-design-patterns)\n- [Database Patterns](#database-patterns)\n- [Caching Strategies](#caching-strategies)\n- [Authentication Architecture](#authentication-architecture)\n\n---\n\n## Frontend Architecture\n\n### Component Architecture\n\n**Atomic Design Pattern**\n\nOrganize components in hierarchical levels:\n\n```\nsrc/components/\n├── atoms/           # Button, Input, Icon\n├── molecules/       # SearchInput, FormField\n├── organisms/       # Header, Footer, Sidebar\n├── templates/       # PageLayout, DashboardLayout\n└── pages/           # Home, Profile, Settings\n```\n\n**When to use:** Large applications with design systems and multiple teams.\n\n**Container/Presentational Pattern**\n\n```typescript\n// Presentational - pure rendering, no state\nfunction UserCard({ name, email, avatar }: UserCardProps) {\n  return (\n    <div className=\"card\">\n      <img src={avatar} alt={name} />\n      <h3>{name}</h3>\n      <p>{email}</p>\n    </div>\n  );\n}\n\n// Container - handles data fetching and state\nfunction UserCardContainer({ userId }: { userId: string }) {\n  const { data, loading } = useUser(userId);\n  if (loading) return <Skeleton />;\n  return <UserCard {...data} />;\n}\n```\n\n**When to use:** When you need clear separation between UI and logic.\n\n### State Management Patterns\n\n**Server State vs Client State**\n\n| Type | Examples | Tools |\n|------|----------|-------|\n| Server State | User data, API responses | React Query, SWR |\n| Client State | UI toggles, form inputs | Zustand, Jotai |\n| URL State | Filters, pagination | Next.js router |\n\n**React Query for Server State:**\n\n```typescript\nfunction useUsers(filters: Filters) {\n  return useQuery({\n    queryKey: [\"users\", filters],\n    queryFn: () => api.getUsers(filters),\n    staleTime: 5 * 60 * 1000, // 5 minutes\n    gcTime: 30 * 60 * 1000,   // 30 minutes\n  });\n}\n\n// Mutations with optimistic updates\nfunction useUpdateUser() {\n  const queryClient = useQueryClient();\n\n  return useMutation({\n    mutationFn: api.updateUser,\n    onMutate: async (newUser) => {\n      await queryClient.cancelQueries({ queryKey: [\"users\"] });\n      const previous = queryClient.getQueryData([\"users\"]);\n      queryClient.setQueryData([\"users\"], (old) =>\n        old.map(u => u.id === newUser.id ? newUser : u)\n      );\n      return { previous };\n    },\n    onError: (err, newUser, context) => {\n      queryClient.setQueryData([\"users\"], context.previous);\n    },\n    onSettled: () => {\n      queryClient.invalidateQueries({ queryKey: [\"users\"] });\n    },\n  });\n}\n```\n\n---\n\n## Backend Architecture\n\n### Clean Architecture\n\n```\nsrc/\n├── domain/              # Business entities, no dependencies\n│   ├── entities/        # User, Order, Product\n│   └── interfaces/      # Repo"},{"path":"references/development_workflows.md","content":"# Fullstack Development Workflows\n\nComplete development lifecycle workflows from local setup to production deployment.\n\n---\n\n## Table of Contents\n\n- [Local Development Setup](#local-development-setup)\n- [Git Workflows](#git-workflows)\n- [CI/CD Pipelines](#cicd-pipelines)\n- [Testing Strategies](#testing-strategies)\n- [Code Review Process](#code-review-process)\n- [Deployment Strategies](#deployment-strategies)\n- [Monitoring and Observability](#monitoring-and-observability)\n\n---\n\n## Local Development Setup\n\n### Docker Compose Development Environment\n\n```yaml\n# docker-compose.yml\nversion: \"3.8\"\n\nservices:\n  app:\n    build:\n      context: .\n      target: development\n    volumes:\n      - .:/app\n      - /app/node_modules\n    ports:\n      - \"3000:3000\"\n    environment:\n      - DATABASE_URL=postgresql://user:pass@db:5432/app\n      - REDIS_URL=redis://redis:6379\n    depends_on:\n      - db\n      - redis\n\n  db:\n    image: postgres:16-alpine\n    environment:\n      POSTGRES_USER: user\n      POSTGRES_PASSWORD: pass\n      POSTGRES_DB: app\n    volumes:\n      - postgres_data:/var/lib/postgresql/data\n    ports:\n      - \"5432:5432\"\n\n  redis:\n    image: redis:7-alpine\n    ports:\n      - \"6379:6379\"\n\nvolumes:\n  postgres_data:\n```\n\n**Multistage Dockerfile:**\n\n```dockerfile\n# Base stage\nFROM node:20-alpine AS base\nWORKDIR /app\nRUN apk add --no-cache libc6-compat\n\n# Development stage\nFROM base AS development\nCOPY package*.json ./\nRUN npm ci\nCOPY . .\nCMD [\"npm\", \"run\", \"dev\"]\n\n# Builder stage\nFROM base AS builder\nCOPY package*.json ./\nRUN npm ci\nCOPY . .\nRUN npm run build\n\n# Production stage\nFROM base AS production\nENV NODE_ENV=production\nCOPY --from=builder /app/package*.json ./\nRUN npm ci --only=production\nCOPY --from=builder /app/dist ./dist\nUSER node\nCMD [\"node\", \"dist/index.js\"]\n```\n\n### Environment Configuration\n\n```bash\n# .env.local (development)\nDATABASE_URL=\"postgresql://user:pass@localhost:5432/app_dev\"\nREDIS_URL=\"redis://localhost:6379\"\nJWT_SECRET=\"development-secret-change-in-prod\"\nLOG_LEVEL=\"debug\"\n\n# .env.test\nDATABASE_URL=\"postgresql://user:pass@localhost:5432/app_test\"\nLOG_LEVEL=\"error\"\n\n# .env.production (via secrets management)\nDATABASE_URL=\"${DATABASE_URL}\"\nREDIS_URL=\"${REDIS_URL}\"\nJWT_SECRET=\"${JWT_SECRET}\"\n```\n\n**Environment validation:**\n\n```typescript\nimport { z } from \"zod\";\n\nconst envSchema = z.object({\n  NODE_ENV: z.enum([\"development\", \"test\", \"production\"]),\n  DATABASE_URL: z.string().url(),\n  REDIS_URL: z.string().url().optional(),\n  JWT_SECRET: z.string().min(32),\n  PORT: z.coerce.number().default(3000),\n});\n\nexport const env = envSchema.parse(process.env);\n```\n\n---\n\n## Git Workflows\n\n### Trunk-Based Development\n\n```\nmain (protected)\n  │\n  ├── feature/user-auth (short-lived, 1-2 days max)\n  │   └── squash merge → main\n  │\n  ├── feature/payment-flow\n  │   └── squash merge → main\n  │\n  └── release/v1.2.0 (cut from main for hotfixes)\n```\n\n**Branch naming:**\n- `feature/description` - New features\n- `fix/description` - Bug fixes\n- `chore/descripti"},{"path":"references/tech_stack_guide.md","content":"# Fullstack Tech Stack Guide\n\nTechnology selection guide with trade-offs, use cases, and integration patterns for modern fullstack development.\n\n---\n\n## Table of Contents\n\n- [Frontend Frameworks](#frontend-frameworks)\n- [Backend Frameworks](#backend-frameworks)\n- [Databases](#databases)\n- [ORMs and Query Builders](#orms-and-query-builders)\n- [Authentication Solutions](#authentication-solutions)\n- [Deployment Platforms](#deployment-platforms)\n- [Stack Recommendations](#stack-recommendations)\n\n---\n\n## Frontend Frameworks\n\n### Next.js\n\n**Best for:** Production React apps, SEO-critical sites, full-stack applications\n\n| Pros | Cons |\n|------|------|\n| Server components, streaming | Learning curve for advanced features |\n| Built-in routing, API routes | Vercel lock-in concerns |\n| Excellent DX and performance | Bundle size can grow |\n| Strong TypeScript support | Complex mental model (client/server) |\n\n**When to choose:**\n- Need SSR/SSG for SEO\n- Building a product that may scale\n- Want full-stack in one framework\n- Team familiar with React\n\n```typescript\n// App Router pattern\n// app/users/page.tsx\nasync function UsersPage() {\n  const users = await db.user.findMany(); // Server component\n  return <UserList users={users} />;\n}\n\n// app/users/[id]/page.tsx\nexport async function generateStaticParams() {\n  const users = await db.user.findMany();\n  return users.map((user) => ({ id: user.id }));\n}\n```\n\n### React + Vite\n\n**Best for:** SPAs, dashboards, internal tools\n\n| Pros | Cons |\n|------|------|\n| Fast development with HMR | No SSR out of the box |\n| Simple mental model | Manual routing setup |\n| Flexible architecture | No built-in API routes |\n| Smaller bundle potential | Need separate backend |\n\n**When to choose:**\n- Building internal dashboards\n- SEO not important\n- Need maximum flexibility\n- Prefer decoupled frontend/backend\n\n### Vue 3\n\n**Best for:** Teams transitioning from jQuery, progressive enhancement\n\n| Pros | Cons |\n|------|------|\n| Gentle learning curve | Smaller ecosystem than React |\n| Excellent documentation | Fewer enterprise adoptions |\n| Single-file components | Composition API learning curve |\n| Good TypeScript support | Two paradigms (Options/Composition) |\n\n**When to choose:**\n- Team new to modern frameworks\n- Progressive enhancement needed\n- Prefer official solutions (Pinia, Vue Router)\n\n### Comparison Matrix\n\n| Feature | Next.js | React+Vite | Vue 3 | Svelte |\n|---------|---------|------------|-------|--------|\n| SSR | Built-in | Manual | Nuxt | SvelteKit |\n| Bundle size | Medium | Small | Small | Smallest |\n| Learning curve | Medium | Low | Low | Low |\n| Enterprise adoption | High | High | Medium | Low |\n| Job market | Large | Large | Medium | Small |\n\n---\n\n## Backend Frameworks\n\n### Node.js Ecosystem\n\n**Express.js**\n\n```typescript\nimport express from \"express\";\nimport { userRouter } from \"./routes/users\";\n\nconst app = express();\napp.use(express.json());\napp.use(\"/api/users\", userRouter);\napp.listen(3000);\n```\n\n| Pros | Cons |\n|---"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns. Skill: Senior Fullstack Owner: alirezarezvani Summary: Fullstack development toolkit with project scaffolding for Next.js/FastAPI/MERN/Django stacks and code quality analysis. Use when scaffolding new projects, analyzing codebase quality, or implementing fullstack architecture patterns. Tags: latest:1.0.0 Version history: v1.0.0 | 2026-02-06T18:27:48.566Z | auto - Initial release of the senior-fullstack skill. - Prov","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1191,"uniquenessScore":54,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-04-15T00:45:39.800Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-09T09:25:44.279Z","emptyReason":null},"items":[{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-10T18:48:31.762Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}