|
| 1 | +# AnchorPoint: Standardized Stellar Anchor Dashboard |
| 2 | + |
| 3 | +AnchorPoint is a premium, developer-first dashboard template designed for Stellar Anchors. It provides a standardized UI for implementing Stellar Ecosystem Proposals (SEPs), specifically focusing on SEP-24 (Interactive Self-Contained Deposits and Withdrawals). |
| 4 | + |
| 5 | +## Project Structure |
| 6 | + |
| 7 | +This is a monorepo containing: |
| 8 | +- `/dashboard`: A React/Vite frontend built with TypeScript, Tailwind CSS, and Framer Motion. |
| 9 | +- `/demo`: A mock anchor server to simulate SEP responses for local development and testing. |
| 10 | + |
| 11 | +## Key Features |
| 12 | + |
| 13 | +- **SEP-24 Wizard**: A multi-step UI flow for handling deposits and withdrawals. |
| 14 | +- **Transaction Management**: A detailed view of pending and historical transactions. |
| 15 | +- **Interactive KYC**: Placeholder integration for SEP-12 interactive flows. |
| 16 | +- **Institutional Branding**: Easily customizable via CSS variables. |
| 17 | + |
| 18 | +## Implementation Guide: Stellar Ecosystem Proposals (SEPs) |
| 19 | + |
| 20 | +### 1. SEP-1: stellar.toml |
| 21 | +The entry point for any anchor. It defines the supported assets and the URLs for other SEPs. |
| 22 | +- Place your `stellar.toml` in `/.well-known/stellar.toml`. |
| 23 | +- Ensure CORS is enabled on your server. |
| 24 | + |
| 25 | +### 2. SEP-10: Stellar Web Authentication |
| 26 | +Before initiating transactions, the dashboard must authenticate the user's wallet. |
| 27 | +- The dashboard requests a challenge transaction from the anchor. |
| 28 | +- The user signs it with their wallet (e.g., Freight, Albedo, or Rabe). |
| 29 | +- The dashboard submits the signed transaction to get a JWT. |
| 30 | + |
| 31 | +### 3. SEP-24: Interactive Flows |
| 32 | +The core of AnchorPoint. |
| 33 | +- **Deposit**: Request `/transactions/deposit/interactive`. The anchor returns a URL to a webview. |
| 34 | +- **Withdraw**: Request `/transactions/withdraw/interactive`. Similar to deposit, but requires a subsequent transaction to the anchor's distribution account. |
| 35 | + |
| 36 | +### 4. SEP-12: KYC |
| 37 | +Standardized way to collect user information. |
| 38 | +- Interactive KYC (supported by AnchorPoint) allows the anchor to provide a URL for complex data collection (documents, biometrics). |
| 39 | + |
| 40 | +## Customization |
| 41 | + |
| 42 | + instituciones can change the branding by modifying `/dashboard/src/index.css`: |
| 43 | + |
| 44 | +```css |
| 45 | +:root { |
| 46 | + --primary: #0052FF; |
| 47 | + --primary-foreground: #FFFFFF; |
| 48 | + --accent: #7928CA; |
| 49 | + --background: #000000; |
| 50 | + --card: #111111; |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +## Getting Started |
| 55 | + |
| 56 | +1. **Install dependencies**: |
| 57 | + ```bash |
| 58 | + npm run install:all |
| 59 | + ``` |
| 60 | + |
| 61 | +2. **Run the project**: |
| 62 | + ```bash |
| 63 | + npm run dev |
| 64 | + ``` |
| 65 | + |
| 66 | +3. **Explore the Demo**: |
| 67 | + The dashboard is pre-configured to point to the local mock anchor server running on port 3001. |
| 68 | + |
| 69 | +## Docker Setup |
| 70 | + |
| 71 | +Quickly deploy the backend with all dependencies using Docker Compose. |
| 72 | + |
| 73 | +### Prerequisites |
| 74 | +- Docker (v20+) |
| 75 | +- Docker Compose (v2.0+) |
| 76 | + |
| 77 | +### Quick Start |
| 78 | + |
| 79 | +```bash |
| 80 | +# Start all services (backend, Redis, SQLite) |
| 81 | +docker-compose up -d |
| 82 | + |
| 83 | +# View logs |
| 84 | +docker-compose logs -f |
| 85 | + |
| 86 | +# Stop services |
| 87 | +docker-compose down |
| 88 | +``` |
| 89 | + |
| 90 | +### Services |
| 91 | + |
| 92 | +| Service | Port | Description | |
| 93 | +|-----------|------|--------------------------------| |
| 94 | +| Backend | 3002 | Node.js/TypeScript API server | |
| 95 | +| Redis | 6379 | Cache and session store | |
| 96 | + |
| 97 | +### Health Check |
| 98 | + |
| 99 | +Verify the backend is running: |
| 100 | + |
| 101 | +```bash |
| 102 | +curl http://localhost:3002/health |
| 103 | +``` |
| 104 | + |
| 105 | +### Data Persistence |
| 106 | + |
| 107 | +Data is stored in Docker volumes: |
| 108 | +- `backend-data`: SQLite database |
| 109 | +- `redis-data`: Redis data |
| 110 | + |
| 111 | +To remove volumes along with containers: |
| 112 | + |
| 113 | +```bash |
| 114 | +docker-compose down -v |
| 115 | +``` |
| 116 | + |
| 117 | +### Development |
| 118 | + |
| 119 | +For local development without Docker, see the [Backend README](./backend/README.md). |
0 commit comments