Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
61a97d7
feat(server): add xAI Grok provider with X Search support
dhvll Oct 20, 2025
86bf1b6
feat(sdk): add xAI Grok model definitions and pricing
dhvll Oct 20, 2025
e31f040
feat(sdk): add xAI provider wrapper for TypeScript SDK
dhvll Oct 20, 2025
8d11e86
feat(sdk): add xAI provider to Next.js SDK
dhvll Oct 20, 2025
1d67031
feat(sdk): integrate XAI tool support in React and TypeScript SDKs
dhvll Oct 20, 2025
eac1e3c
feat: add smoke tests for xAI streamText functionality
dhvll Oct 20, 2025
b9799a1
feat(sdk): update xAI provider integration and add dependency
dhvll Oct 20, 2025
ed9057d
remove deprecated web_search request handling.
dhvll Oct 20, 2025
c285dd1
refactor: standardize naming for XaiProvider and update related imports
dhvll Oct 20, 2025
1d854ae
temp fix
dhvll Oct 20, 2025
c155f7d
Add Documentation for Echo Shadcn Components Registry
dhvll Oct 22, 2025
00c50bb
fix imports
dhvll Oct 22, 2025
51dedc6
relaxing env validation locally
fmhall Oct 22, 2025
d31535f
Merge branch 'master' into mason/env-validation-local
fmhall Oct 22, 2025
832a467
formatting
fmhall Oct 22, 2025
30ecdb3
resend lint error
fmhall Oct 22, 2025
1ebf7c9
test user locally
fmhall Oct 23, 2025
7e95386
Merge branch 'mason/env-validation-local-2' into mason/env-validation…
fmhall Oct 23, 2025
f425d59
test user clean up
fmhall Oct 23, 2025
379a75f
cleaning up env
fmhall Oct 23, 2025
a2d0dde
contributing.md
fmhall Oct 23, 2025
35d234a
updates to readme and instructions
fmhall Oct 23, 2025
bc88aad
batched fundRepo event
zdql Oct 27, 2025
cf13b2e
Merge pull request #622 from Merit-Systems/br/batched-delivery-of-funds
zdql Oct 27, 2025
64f00e7
more env vars
zdql Oct 27, 2025
00163ff
Merge pull request #624 from Merit-Systems/br/batched-delivery-of-funds
zdql Oct 27, 2025
73d1c59
merge
fmhall Oct 27, 2025
511c53b
formatting
fmhall Oct 27, 2025
c867824
Update packages/app/server/src/utils.ts
zdql Oct 27, 2025
1c233b4
Update packages/app/server/src/services/fund-repo/fundRepoService.ts
zdql Oct 27, 2025
141e755
redirects
fmhall Oct 27, 2025
fd5a3ea
remove skip env validation
fmhall Oct 27, 2025
e4d6c71
Merge branch 'master' into mason/env-validation-local
fmhall Oct 27, 2025
8b54e22
format
fmhall Oct 27, 2025
760e61d
bigint operations
zdql Oct 27, 2025
023d0f5
update db name
fmhall Oct 27, 2025
1ccc6f3
update env.ts
fmhall Oct 27, 2025
0598857
add linkage in introduction
fmhall Oct 27, 2025
ed2ac97
Merge pull request #625 from Merit-Systems/br/bigint-fundrepo-operations
zdql Oct 27, 2025
b82208a
Merge branch 'master' into mason/env-validation-local
fmhall Oct 27, 2025
bc7ce83
formatting
fmhall Oct 27, 2025
c9ce68b
Update packages/app/control/scripts/setup.sh
fmhall Oct 27, 2025
b987d8d
fix file
fmhall Oct 27, 2025
ca91096
Update packages/app/server/src/handlers.ts
zdql Oct 27, 2025
e7bb7c6
Merge pull request #586 from dhvll/grok-ai
rsproule Oct 27, 2025
df698cb
Merge pull request #602 from dhvll/docs
rsproule Oct 27, 2025
358ddb5
version bump errting
rsproule Oct 28, 2025
9f9a58f
spelling in provider name
rsproule Oct 28, 2025
5d9dd8f
Merge branch 'master' into mason/env-validation-local
rsproule Oct 28, 2025
f945129
Merge pull request #607 from Merit-Systems/mason/env-validation-local
rsproule Oct 28, 2025
5213889
Merge pull request #626 from Merit-Systems/rfs/bump-versions
rsproule Oct 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
472 changes: 472 additions & 0 deletions packages/app/control/docs/components/customization.mdx

Large diffs are not rendered by default.

267 changes: 267 additions & 0 deletions packages/app/control/docs/components/echo-account.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,267 @@
---
title: Echo Account Component
description: Complete guide to the Echo Account component
---

# Echo Account Component

The Echo Account component is a comprehensive user account management interface that provides everything you need for user authentication, balance display, and account management in your Echo applications.

## Overview

The Echo Account component includes:

- **User authentication status** - Shows login/logout functionality
- **Balance display** - Real-time user balance with currency formatting
- **Top-up functionality** - Easy way for users to add funds
- **User profile management** - Avatar, name, and account details
- **Responsive design** - Works on desktop and mobile devices

## Installation

### React Version

```bash
pnpm dlx shadcn@latest add https://echo-components.com/r/echo-account-react.json
```

### Next.js Version

```bash
pnpm dlx shadcn@latest add https://echo-components.com/r/echo-account-next.json
```

## Basic Usage

### React

```tsx
import { EchoAccount } from '@/components/echo-account-react';

export default function MyApp() {
return (
<div>
<h1>My Echo App</h1>
<EchoAccount />
</div>
);
}
```

### Next.js

```tsx
import { EchoAccount } from '@/components/echo-account-next';

export default function MyApp() {
return (
<div>
<h1>My Echo App</h1>
<EchoAccount />
</div>
);
}
```

## Component Structure

The Echo Account component is composed of several sub-components:

### EchoAccountButton

The main button that triggers the account popover:

```tsx
import { EchoAccountButton } from '@/components/echo-account-button/echo-account';
import { useEcho } from '@merit-systems/echo-react-sdk';

// Usage with Echo context
const echo = useEcho();
return <EchoAccountButton echo={echo} />;
```

### EchoPopover

The popover container that holds the account interface:

```tsx
import { EchoPopover } from '@/components/echo-account-button/echo-popover';
```

### Balance Component

Displays the user's current balance:

```tsx
import { Balance } from '@/components/echo-account-button/balance';
```

### TopUpButton

Handles adding funds to the user's account:

```tsx
import { TopUpButton } from '@/components/echo-account-button/top-up-button';
```

## Customization

### Styling

You can customize the appearance using Tailwind classes:

```tsx
<EchoAccount className="custom-account-styles" />
```

### Custom Props

The component accepts various props for customization:

```tsx
interface EchoAccountProps {
className?: string;
showBalance?: boolean;
showTopUp?: boolean;
variant?: 'default' | 'compact' | 'minimal';
}
```

### Example with Custom Props

```tsx
<EchoAccount
className="my-custom-styles"
showBalance={true}
showTopUp={true}
variant="compact"
/>
```

## Advanced Usage

### Custom Account Button

You can create a custom account button with your own styling:

```tsx
import { EchoAccountButton } from '@/components/echo-account-button/echo-account';
import { useEcho } from '@merit-systems/echo-react-sdk';

function CustomAccountButton() {
const echo = useEcho();

return (
<EchoAccountButton
echo={echo}
className="bg-custom-primary text-white rounded-lg px-4 py-2"
/>
);
}
```

### Standalone Components

You can use individual components for custom layouts:

```tsx
import { Balance } from '@/components/echo-account-button/balance';
import { TopUpButton } from '@/components/echo-account-button/top-up-button';

function CustomAccountLayout() {
return (
<div className="flex items-center gap-4">
<Balance />
<TopUpButton />
</div>
);
}
```

## Integration with Echo SDK

The Echo Account component automatically integrates with the Echo SDK:

### Authentication

- Automatically detects user login status
- Shows login button when user is not authenticated
- Displays user information when authenticated

### Balance Management

- Real-time balance updates
- Currency formatting
- Balance history (if available)

### Payment Processing

- Integrated top-up functionality
- Secure payment processing
- Transaction history

## Responsive Design

The Echo Account component is fully responsive:

- **Desktop**: Full popover with all account details
- **Tablet**: Optimized layout for touch interfaces
- **Mobile**: Compact design with essential features

## Accessibility

The component includes comprehensive accessibility features:

- **Keyboard navigation** - Full keyboard support
- **Screen reader support** - Proper ARIA labels and descriptions
- **Focus management** - Proper focus handling for popovers
- **Color contrast** - Meets WCAG guidelines

## Best Practices

### Performance

- The component uses React.memo for optimal re-rendering
- Balance updates are debounced to prevent excessive API calls
- Lazy loading for non-critical components

### Security

- All user data is handled securely through the Echo SDK
- No sensitive information is stored in component state
- Proper error handling for failed operations

### User Experience

- Clear visual feedback for all user actions
- Loading states for async operations
- Error states with helpful messages

## Troubleshooting

### Common Issues

**Component not rendering:**
- Ensure Echo provider is properly configured
- Check that user is authenticated
- Verify all required dependencies are installed

**Balance not updating:**
- Check Echo SDK configuration
- Verify API endpoints are accessible
- Check browser console for errors

**Styling issues:**
- Ensure Tailwind CSS is properly configured
- Check that component CSS is loaded
- Verify custom styles don't conflict

### Debug Mode

Enable debug mode to see detailed logging:

```tsx
<EchoAccount debug={true} />
```

This will log component state changes and API calls to the browser console.
60 changes: 60 additions & 0 deletions packages/app/control/docs/components/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Echo Components
description: Pre-built UI components for Echo applications
---

# Echo Components

Echo provides a comprehensive set of pre-built UI components through our [Shadcn Components Registry](https://echo-components.com/). These components are specifically designed for Echo applications and include everything you need to build beautiful, functional user interfaces.

## What are Echo Components?

Echo Components are pre-built React components that integrate seamlessly with the Echo ecosystem. They provide:

- **Ready-to-use UI elements** - Drop-in components for common Echo app patterns
- **Echo integration** - Built-in support for Echo authentication, billing, and user management
- **Consistent design** - Unified design system across all Echo applications
- **Accessibility** - WCAG compliant components out of the box
- **Customization** - Easy theming and styling options

## Available Components

### Echo Account Components

- **Echo Account Button** - Complete user account management with balance display, top-up functionality, and user profile
- **Echo Account (React)** - React-specific implementation with hooks integration
- **Echo Account (Next.js)** - Next.js optimized version with server-side rendering support

### UI Components

- **Echo Button** - Enhanced button component with Echo-specific variants
- **Money Input** - Specialized input for handling monetary values with proper formatting
- **Echo Logo** - Branded logo component with light/dark mode support

## Quick Start

To get started with Echo Components, you can install them using the Shadcn CLI:

```bash
# Install Echo Account component for React
pnpm dlx shadcn@latest add https://echo-components.com/r/echo-account-react.json

# Install Echo Account component for Next.js
pnpm dlx shadcn@latest add https://echo-components.com/r/echo-account-next.json
```

## When to Use Echo Components

Use Echo Components when you want to:

- **Speed up development** - Skip building common UI patterns from scratch
- **Ensure consistency** - Maintain design consistency across Echo applications
- **Focus on business logic** - Spend time on your app's unique features instead of UI
- **Leverage Echo integration** - Get built-in support for Echo's authentication and billing systems

## Next Steps

- **[Installation Guide](/docs/components/installation)** - Learn how to set up Echo Components in your project
- **[Echo Account Component](/docs/components/echo-account)** - Complete guide to the Echo Account component
- **[UI Components](/docs/components/ui-components)** - Overview of available UI components
- **[Customization](/docs/components/customization)** - How to customize and theme Echo Components
Loading
Loading