> ## Documentation Index
> Fetch the complete documentation index at: https://core.anylayer.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Guides Overview

> Comprehensive guides for integrating ZKScore into your applications

## Welcome to ZKScore Guides

This section provides step-by-step guides for integrating ZKScore into your applications, from basic setup to advanced features.

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/guides/getting-started">
    Your first ZKScore integration in 5 minutes
  </Card>

  <Card title="API Keys" icon="key" href="/guides/api-keys">
    Manage API keys and authentication
  </Card>

  <Card title="Trust Gating" icon="shield" href="/guides/trust-gating">
    Build trust-gated applications
  </Card>

  <Card title="Webhooks" icon="webhook" href="/guides/webhooks">
    Real-time event notifications
  </Card>

  <Card title="Attesters" icon="certificate" href="/guides/attesters">
    Become an attestation provider
  </Card>

  <Card title="Multi-Chain" icon="network-wired" href="/guides/multi-chain">
    Deploy across multiple networks
  </Card>
</CardGroup>

## Quick Start Path

<Steps>
  <Step title="Get API Key">
    Create your API key in the [Builder Portal](https://builder.onzks.com)
    [API Keys Guide →](/guides/api-keys)
  </Step>

  <Step title="Install SDK">
    Add ZKScore SDK to your project
    [Getting Started →](/guides/getting-started)
  </Step>

  <Step title="Create Identity">
    Mint your first ZKScore identity
    [Identity Guide →](/guides/using-zks-ids)
  </Step>

  <Step title="Build Features">
    Add trust and reputation to your app
    [Trust Gating →](/guides/trust-gating)
  </Step>
</Steps>

## Integration Patterns

### Score-Gated Applications

Control access based on reputation scores:

```typescript theme={null}
import { ZKScoreSDK } from '@zkscore/sdk';

const sdk = new ZKScoreSDK({ apiKey: 'your-key' });

async function checkAccess(userAddress: string, minScore: number) {
  const score = await sdk.scores.getScore(userAddress);
  return score.overall >= minScore;
}

// Gate premium features
if (await checkAccess(userAddress, 700)) {
  showPremiumContent();
} else {
  showUpgradePrompt();
}
```

### Achievement Systems

Gamify user engagement with achievements:

```typescript theme={null}
// Track user progress
const progress = await sdk.achievements.getProgress(userAddress, 'defi-expert');

// Show progress bar
<ProgressBar 
  current={progress.requirements.defiTransactions.current}
  total={progress.requirements.defiTransactions.required}
  label="DeFi Transactions"
/>

// Claim when eligible
if (progress.completed) {
  await sdk.achievements.claim({ achievementId: 'defi-expert' });
}
```

### Privacy-Preserving Verification

Use zero-knowledge proofs for private verification:

```typescript theme={null}
// Generate proof without revealing exact score
const proof = await sdk.zkProofs.generate({
  address: userAddress,
  type: 'score-threshold',
  threshold: 700,
  hideExactScore: true,
});

// Verify on server
const isValid = await sdk.zkProofs.verify(proof);
```

### Trust Systems

Build custom trust frameworks with attestations:

```typescript theme={null}
// Create KYC attestation
await sdk.trustLayer.createAttestation({
  subject: userAddress,
  schema: 'kyc-verification',
  data: {
    verified: true,
    level: 'tier-2',
    provider: 'Synaps',
  },
});

// Check trust requirements
const evaluation = await sdk.trustLayer.evaluatePolicy(userAddress, {
  rules: [
    {
      schema: 'kyc-verification',
      required: true,
      conditions: { 'data.verified': true },
    },
  ],
});
```

## Common Use Cases

<CardGroup cols={2}>
  <Card title="DeFi Lending" icon="hand-holding-dollar" href="/use-cases/lending">
    Undercollateralized loans based on reputation
  </Card>

  <Card title="NFT Gating" icon="image" href="/use-cases/nft-gating">
    Exclusive NFT access for high-reputation users
  </Card>

  <Card title="DAO Governance" icon="users" href="/use-cases/dao-governance">
    Weighted voting based on expertise
  </Card>

  <Card title="Social Platforms" icon="comments" href="/use-cases/social">
    Trust-based social interactions
  </Card>

  <Card title="Gaming" icon="gamepad" href="/use-cases/gaming">
    Anti-sybil systems and player rankings
  </Card>

  <Card title="Marketplaces" icon="store" href="/use-cases/marketplace">
    Seller reputation and buyer protection
  </Card>
</CardGroup>

## Platform-Specific Guides

### Web Applications

<CardGroup cols={2}>
  <Card title="React Integration" icon="react" href="/sdk/react/getting-started">
    React hooks and components
  </Card>

  <Card title="Next.js Setup" icon="nextjs" href="/guides/nextjs">
    Next.js integration guide
  </Card>

  <Card title="Vue.js Integration" icon="vue" href="/guides/vue">
    Vue.js application setup
  </Card>

  <Card title="Angular Setup" icon="angular" href="/guides/angular">
    Angular framework integration
  </Card>
</CardGroup>

### Mobile Applications

<CardGroup cols={2}>
  <Card title="React Native" icon="mobile" href="/guides/react-native">
    Mobile app integration
  </Card>

  <Card title="Flutter" icon="flutter" href="/guides/flutter">
    Flutter SDK integration
  </Card>

  <Card title="iOS Native" icon="apple" href="/guides/ios">
    Swift/iOS integration
  </Card>

  <Card title="Android Native" icon="android" href="/guides/android">
    Kotlin/Android integration
  </Card>
</CardGroup>

### Backend Services

<CardGroup cols={2}>
  <Card title="Node.js" icon="node-js" href="/guides/nodejs">
    Node.js server integration
  </Card>

  <Card title="Python" icon="python" href="/guides/python">
    Python backend integration
  </Card>

  <Card title="Go" icon="golang" href="/guides/go">
    Go server integration
  </Card>

  <Card title="PHP" icon="php" href="/guides/php">
    PHP application integration
  </Card>
</CardGroup>

## Advanced Topics

<CardGroup cols={2}>
  <Card title="Custom Scoring" icon="chart-line" href="/advanced/custom-scoring">
    Build custom reputation algorithms
  </Card>

  <Card title="ZK Privacy" icon="lock" href="/advanced/privacy">
    Advanced privacy features
  </Card>

  <Card title="Batch Operations" icon="layer-group" href="/advanced/batch">
    Optimize with batch processing
  </Card>

  <Card title="Webhooks Advanced" icon="webhook" href="/advanced/webhooks-advanced">
    Advanced webhook configurations
  </Card>
</CardGroup>

## Best Practices

### Security

<CardGroup cols={2}>
  <Card title="API Key Security" icon="shield">
    Never expose API keys in client-side code
  </Card>

  <Card title="Input Validation" icon="check-circle">
    Always validate user inputs
  </Card>

  <Card title="Error Handling" icon="exclamation-triangle">
    Implement comprehensive error handling
  </Card>

  <Card title="Rate Limiting" icon="gauge">
    Respect API rate limits
  </Card>
</CardGroup>

### Performance

<CardGroup cols={2}>
  <Card title="Caching" icon="database">
    Cache frequently accessed data
  </Card>

  <Card title="Batch Requests" icon="layer-group">
    Combine multiple API calls
  </Card>

  <Card title="Lazy Loading" icon="clock">
    Load data only when needed
  </Card>

  <Card title="Optimistic Updates" icon="arrow-up">
    Update UI before API confirmation
  </Card>
</CardGroup>

### User Experience

<CardGroup cols={2}>
  <Card title="Loading States" icon="spinner">
    Show loading indicators
  </Card>

  <Card title="Error Messages" icon="exclamation-circle">
    Provide clear error feedback
  </Card>

  <Card title="Progressive Enhancement" icon="arrow-up">
    Graceful degradation
  </Card>

  <Card title="Accessibility" icon="universal-access">
    Ensure inclusive design
  </Card>
</CardGroup>

## Troubleshooting

### Common Issues

<AccordionGroup>
  <Accordion title="API Key Invalid">
    **Problem**: Getting 401 Unauthorized errors\
    **Solution**: Verify your API key is correct and active in the [Builder Portal](https://builder.onzks.com)
  </Accordion>

  <Accordion title="Identity Not Found">
    **Problem**: User doesn't have a ZKScore identity\
    **Solution**: Prompt user to create an identity using `sdk.identity.mint()`
  </Accordion>

  <Accordion title="Rate Limited">
    **Problem**: Too many API requests\
    **Solution**: Implement exponential backoff and caching
  </Accordion>

  <Accordion title="Score Not Updating">
    **Problem**: Scores appear outdated\
    **Solution**: Scores update in real-time, check for caching issues
  </Accordion>
</AccordionGroup>

### Debug Mode

Enable debug logging to troubleshoot issues:

```typescript theme={null}
const sdk = new ZKScoreSDK({
  apiKey: 'your-key',
  debug: true, // Enable debug logging
});

// Debug logs will show:
// - API requests and responses
// - Cache hits and misses
// - Error details
// - Performance metrics
```

## Community Resources

<CardGroup cols={2}>
  <Card title="Discord Community" icon="discord" href="https://discord.gg/zkscore">
    Get help from developers
  </Card>

  <Card title="GitHub Examples" icon="github" href="https://github.com/metalanddev/ZKScoreEVM/tree/main/examples">
    Code examples and templates
  </Card>

  <Card title="Blog Posts" icon="newspaper" href="https://blog.onzks.com">
    Latest updates and tutorials
  </Card>

  <Card title="Video Tutorials" icon="play" href="https://youtube.com/@zkscore">
    Step-by-step video guides
  </Card>
</CardGroup>

## Migration Guides

### From v1 to v2

<Steps>
  <Step title="Update Dependencies">
    Install the latest SDK version

    ```bash theme={null}
    npm install @zkscore/sdk@latest
    ```
  </Step>

  <Step title="Update API Calls">
    Replace deprecated methods with new ones

    ```typescript theme={null}
    // Old
    const client = new ZKScoreClient(apiKey);
    const score = await client.getScore(address);

    // New
    const sdk = new ZKScoreSDK({ apiKey });
    const score = await sdk.scores.getScore(address);
    ```
  </Step>

  <Step title="Test Integration">
    Verify all features work correctly
  </Step>
</Steps>

## Support

<CardGroup cols={2}>
  <Card title="Documentation" icon="book" href="/docs">
    Complete API and SDK documentation
  </Card>

  <Card title="Discord Support" icon="discord" href="https://discord.gg/zkscore">
    Real-time community support
  </Card>

  <Card title="GitHub Issues" icon="github" href="https://github.com/metalanddev/ZKScoreEVM/issues">
    Report bugs and request features
  </Card>

  <Card title="Email Support" icon="envelope" href="mailto:support@onzks.com">
    Direct support for enterprise users
  </Card>
</CardGroup>

***

<Note>
  **New to ZKScore?** Start with our [Getting Started Guide](/guides/getting-started) for a quick 5-minute setup.
</Note>
