# CLAUDE.md - Movement Kit

This file provides guidance to Claude Code (claude.ai/code) when building dApps on the Movement blockchain.

## Role & Responsibilities

Your role is to analyze user requirements for Movement blockchain dApps, generate production-ready code using Move smart contracts and React frontend with wallet integration.

## Movement Network Context

**Network Endpoints:**
- Mainnet: `https://full.mainnet.movementinfra.xyz/v1` (Chain ID: 126)
- Testnet: `https://full.testnet.movementinfra.xyz/v1` (Chain ID: 250)
- Faucet: `https://faucet.movementnetwork.xyz/`
- Explorer: `https://explorer.movementnetwork.xyz/`

**Key Technologies:**
- Smart Contracts: Move language (Aptos-compatible)
- TypeScript SDK: `@aptos-labs/ts-sdk`
- Wallet Integration: `@aptos-labs/wallet-adapter-react`
- CLI: `movement` (Aptos-compatible commands)

## Commands

Slash commands for dApp development:

| Command | Description |
|---------|-------------|
| `/plan` | Create architecture plan for a dApp |
| `/cook` | Generate full dApp code (contracts + frontend) |
| `/cook:contracts` | Generate Move smart contracts only |
| `/cook:frontend` | Generate React frontend only |
| `/test` | Generate and run comprehensive tests |
| `/review` | Perform security audit and code review |
| `/deploy-smart-contract` | Deploy Move smart contracts to Movement Network |
| `/deploy-full` | Deploy complete dApp to testnet or mainnet |
| `/watzup` | Check project status |
| `/docs:init` | Initialize documentation structure |
| `/docs:generate` | Auto-generate API and contract docs |

## Workflows

- Primary workflow: `./.claude/workflows/primary-workflow.md`
- Development rules: `./.claude/workflows/development-rules.md`
- Commands reference: `./.claude/commands/*.md`

## Project Structure

```
movement-kit/
├── CLAUDE.md                    # This file
├── contracts/                   # Move smart contracts
│   ├── Move.toml
│   ├── sources/                 # .move source files
│   └── tests/                   # Move unit tests
├── frontend/                    # React frontend
│   ├── package.json
│   ├── src/
│   │   ├── App.tsx
│   │   ├── components/
│   │   ├── hooks/
│   │   └── contexts/
│   └── tests/
├── docs/                        # Documentation
│   ├── MOVE_LANGUAGE_REFERENCE.md
│   └── contracts/
├── plans/                       # Architecture plans
└── templates/                   # Code templates
```

## Development Principles

1. **Security First**: All contracts must follow Move security best practices
2. **Type Safety**: Use strict TypeScript with no `any` types
3. **Test Coverage**: Target >90% code coverage
4. **Event Emission**: Emit events for all state changes
5. **Error Handling**: Use descriptive error codes in contracts

## Critical Instructions

**IMPORTANT:** Always read `docs/MOVE_LANGUAGE_REFERENCE.md` before generating Move contracts
**IMPORTANT:** Use Movement-specific network configuration (not generic Aptos)
**IMPORTANT:** Test on Movement testnet before mainnet deployment
**IMPORTANT:** Follow the command workflows in `.claude/commands/`
**IMPORTANT:** For dates, use `bash -c 'date +%y%m%d'` command

## Quick Start

```bash
# Create a new dApp
/plan Create a simple counter dApp

# Generate the code
/cook

# Test everything
/test

# Review for security
/review

# Deploy to testnet
/deploy-full:testnet
```

