VibeCoding with Claude Code

Best Practices for AI-Assisted Development

2. Platform Documentation Folder

Platform Documentation Framework Docs Library APIs Version Info react.md next.js.md stripe-api.md aws-sdk.md compatibility.md updates.md Claude

Creating a dedicated Platform Documentation folder is essential for providing Claude Code with up-to-date information about the tools and technologies you're using in your project. This practice addresses one of the key limitations of AI models: their knowledge cutoff.

Why Platform Documentation Matters

Most AI coding models have knowledge that may be dated compared to the latest versions of frameworks, libraries, and technologies. By maintaining dedicated platform documentation, you ensure that Claude has access to the most current information, avoiding outdated implementation suggestions.

Pro Tip

Platform documentation isn't just for the AI—it's for your application. The Claude.md tells Claude what you're going to do, while Platform Docs tells it what tools you're going to use.

What to Include in Your Platform Documentation

Recommended Folder Structure

platform_docs/
├── frameworks/
│   ├── react.md
│   ├── nextjs.md
│   └── express.md
├── libraries/
│   ├── stripe-api.md
│   ├── aws-sdk.md
│   └── mongodb.md
├── tools/
│   ├── webpack.md
│   └── docker.md
├── integration/
│   ├── auth-flow.md
│   └── payment-flow.md
└── compatibility.md

Documentation Example

Here's an example of what a library documentation file might contain:

# Stripe API Documentation (v2023-10-16)

## Key Features
- Payment Intents API for direct card processing
- Customer Portal for subscription management
- Strong Customer Authentication (SCA) compliance
- Webhook event handling

## Basic Implementation

```javascript
// Creating a payment intent
const paymentIntent = await stripe.paymentIntents.create({
  amount: 1000, // in smallest currency unit (e.g., cents)
  currency: 'usd',
  payment_method_types: ['card'],
  metadata: { orderId: '12345' }
});

// Handling webhook events
app.post('/webhook', async (req, res) => {
  const sig = req.headers['stripe-signature'];
  const event = stripe.webhooks.constructEvent(
    req.body, 
    sig, 
    process.env.STRIPE_WEBHOOK_SECRET
  );
  
  if (event.type === 'payment_intent.succeeded') {
    const paymentIntent = event.data.object;
    // Handle successful payment
  }
});
```

## Important Notes
- Always use asynchronous code with await/then
- Test webhooks locally using the Stripe CLI
- Use idempotency keys for retries
- Store customer IDs in your database

## Resources
- [Official Documentation](https://stripe.com/docs/api)
- [Testing Guide](https://stripe.com/docs/testing)
- [Webhook Guide](https://stripe.com/docs/webhooks)

Best Practices

Remember

This approach isn't just for Claude Code. It's a good development practice that helps maintain project knowledge and onboard new team members.

Explore the VibeCoding Series

Home Series Overview 1 In-file Documentation 2 Platform Documentation 3 Managing Context Window 4 Web Fetch vs. Tavily 5 Effective Markdown Usage 6 Terminal Limitations 7 GitHub Copilot Integration 8 Central Documentation Repository 9 List Formatting Techniques 10 Portable Development 11 Advanced Claude Code Techniques REF Quick Reference FAQ Frequently Asked Questions