🎯

dynamic

🎯Skill

from popup-studio-ai/bkit-claude-code

VibeIndex|
What it does

Initializes fullstack web apps with authentication, database, and API integration using bkend.ai BaaS platform.

πŸ“¦

Part of

popup-studio-ai/bkit-claude-code(17 items)

dynamic

Installation

Server ConfigurationMCP server configuration block
{ "mcpServers": { "bkend": { "command": "npx", "args": ["@bken...
πŸ“– Extracted from docs: popup-studio-ai/bkit-claude-code
3Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

|

Overview

# Intermediate (Dynamic) Skill

Actions

| Action | Description | Example |

|--------|-------------|---------|

| init | Project initialization (/init-dynamic feature) | /dynamic init my-saas |

| guide | Display development guide | /dynamic guide |

| help | BaaS integration help | /dynamic help |

init (Project Initialization)

  1. Create Next.js + Tailwind project structure
  2. Configure bkend.ai MCP (.mcp.json)
  3. Create CLAUDE.md (Level: Dynamic specified)
  4. Create docs/ folder structure
  5. src/lib/bkend.ts client template
  6. Initialize .bkit-memory.json

guide (Development Guide)

  • bkend.ai auth/data configuration guide
  • Phase 1-9 full Pipeline guide
  • API integration patterns

help (BaaS Help)

  • Explain bkend.ai basic concepts
  • Auth, database, file storage usage
  • MCP integration methods

Target Audience

  • Frontend developers
  • Solo entrepreneurs
  • Those who want to build fullstack services quickly

Tech Stack

```

Frontend:

  • React / Next.js 14+
  • TypeScript
  • Tailwind CSS
  • TanStack Query (data fetching)
  • Zustand (state management)

Backend (BaaS):

  • bkend.ai

- Auto REST API

- MongoDB database

- Built-in authentication (JWT)

- Real-time features (WebSocket)

Deployment:

  • Vercel (frontend)
  • bkend.ai (backend)

```

Language Tier Guidance (v1.3.0)

> Recommended: Tier 1-2 languages

>

> Dynamic level supports full-stack development with strong AI compatibility.

| Tier | Allowed | Reason |

|------|---------|--------|

| Tier 1 | βœ… Primary | Full AI support |

| Tier 2 | βœ… Yes | Mobile (Flutter/RN), Modern web (Vue, Astro) |

| Tier 3 | ⚠️ Limited | Platform-specific needs only |

| Tier 4 | ❌ No | Migration recommended |

Mobile Development:

  • React Native (Tier 1 via TypeScript) - Recommended
  • Flutter (Tier 2 via Dart) - Supported

Project Structure

```

project/

β”œβ”€β”€ src/

β”‚ β”œβ”€β”€ app/ # Next.js App Router

β”‚ β”‚ β”œβ”€β”€ (auth)/ # Auth-related routes

β”‚ β”‚ β”‚ β”œβ”€β”€ login/

β”‚ β”‚ β”‚ └── register/

β”‚ β”‚ β”œβ”€β”€ (main)/ # Main routes

β”‚ β”‚ β”‚ β”œβ”€β”€ dashboard/

β”‚ β”‚ β”‚ └── settings/

β”‚ β”‚ β”œβ”€β”€ layout.tsx

β”‚ β”‚ └── page.tsx

β”‚ β”‚

β”‚ β”œβ”€β”€ components/ # UI components

β”‚ β”‚ β”œβ”€β”€ ui/ # Basic UI (Button, Input...)

β”‚ β”‚ └── features/ # Feature-specific components

β”‚ β”‚

β”‚ β”œβ”€β”€ hooks/ # Custom hooks

β”‚ β”‚ β”œβ”€β”€ useAuth.ts

β”‚ β”‚ └── useQuery.ts

β”‚ β”‚

β”‚ β”œβ”€β”€ lib/ # Utilities

β”‚ β”‚ β”œβ”€β”€ bkend.ts # bkend.ai client

β”‚ β”‚ └── utils.ts

β”‚ β”‚

β”‚ β”œβ”€β”€ stores/ # State management (Zustand)

β”‚ β”‚ └── auth-store.ts

β”‚ β”‚

β”‚ └── types/ # TypeScript types

β”‚ └── index.ts

β”‚

β”œβ”€β”€ docs/ # PDCA documents

β”‚ β”œβ”€β”€ 01-plan/

β”‚ β”œβ”€β”€ 02-design/

β”‚ β”‚ β”œβ”€β”€ data-model.md # Data model

β”‚ β”‚ └── api-spec.md # API specification

β”‚ β”œβ”€β”€ 03-analysis/

β”‚ └── 04-report/

β”‚

β”œβ”€β”€ .mcp.json # bkend.ai MCP config

β”œβ”€β”€ .env.local # Environment variables

β”œβ”€β”€ package.json

└── README.md

```

Core Patterns

bkend.ai Client Setup

```typescript

// lib/bkend.ts

import { createClient } from '@bkend/client';

export const bkend = createClient({

apiKey: process.env.NEXT_PUBLIC_BKEND_API_KEY!,

projectId: process.env.NEXT_PUBLIC_BKEND_PROJECT_ID!,

});

```

Authentication Hook

```typescript

// hooks/useAuth.ts

import { create } from 'zustand';

import { persist } from 'zustand/middleware';

import { bkend } from '@/lib/bkend';

interface AuthState {

user: User | null;

isLoading: boolean;

login: (email: string, password: string) => Promise;

logout: () => void;

}

export const useAuth = create()(

persist(

(set) => ({

user: null,

isLoading: false,

login: async (email, password) => {

set({ isLoading: true });

const { user, token } = await bkend.auth.login({ email, password });

set({ user, isLoading: false });

},

logout: () => {

bkend.auth.logout();

set({ user: null });

},

}),

{ name: 'auth-storage' }

)

);

```

Data Fetching (TanStack Query)

```typescript

// List query

const { data, isLoading, error } = useQuery({

queryKey: ['items', filters],

queryFn: () => bkend.collection('items').find(filters),

});

// Single item query

const { data: item } = useQuery({

queryKey: ['items', id],

queryFn: () => bkend.collection('items').findById(id),

enabled: !!id,

});

// Create/Update (Mutation)

const mutation = useMutation({

mutationFn: (newItem) => bkend.collection('items').create(newItem),

onSuccess: () => {

queryClient.invalidateQueries(['items']);

},

});

```

Protected Route

```typescript

// components/ProtectedRoute.tsx

'use client';

import { useAuth } from '@/hooks/useAuth';

import { redirect } from 'next/navigation';

export function ProtectedRoute({ children }: { children: React.ReactNode }) {

const { user, isLoading } = useAuth();

if (isLoading) return ;

if (!user) redirect('/login');

return <>{children};

}

```

Data Model Design Principles

```typescript

// Base fields (auto-generated)

interface BaseDocument {

_id: string;

createdAt: Date;

updatedAt: Date;

}

// User reference

interface Post extends BaseDocument {

userId: string; // Author ID (reference)

title: string;

content: string;

tags: string[]; // Array field

metadata: { // Embedded object

viewCount: number;

likeCount: number;

};

}

```

MCP Integration (.mcp.json)

```json

{

"mcpServers": {

"bkend": {

"command": "npx",

"args": ["@bkend/mcp-server"],

"env": {

"BKEND_API_KEY": "${BKEND_API_KEY}",

"BKEND_PROJECT_ID": "${BKEND_PROJECT_ID}"

}

}

}

}

```

Limitations

```

❌ Complex backend logic (serverless function limits)

❌ Large-scale traffic (within BaaS limits)

❌ Custom infrastructure control

❌ Microservices architecture

```

When to Upgrade

Move to Enterprise Level if you need:

```

β†’ "Traffic will increase significantly"

β†’ "I want to split into microservices"

β†’ "I need my own server/infrastructure"

β†’ "I need complex backend logic"

```

Common Mistakes

| Mistake | Solution |

|---------|----------|

| CORS error | Register domain in bkend.ai console |

| 401 Unauthorized | Token expired, re-login or refresh token |

| Data not showing | Check collection name, query conditions |

| Type error | Sync TypeScript type definitions with schema |