Free, open-source humanitarian aid platform using Stellar blockchain for transparent, zero-friction direct aid from donors to people in need.
- Overview
- Why Alian Structure
- Key Features
- Technology Stack
- Architecture
- Quick Start
- Project Structure
- Contributing
- Support & Community
- License
Alian Structure is a revolutionary humanitarian aid platform that leverages the Stellar blockchain to solve the fundamental problems in charitable giving:
Traditional aid systems suffer from:
- Aid Leakage: 40-60% of donations lost to intermediaries
- Lack of Transparency: Donors can't verify where money goes
- Unbanked Exclusion: Recipients without bank accounts can't receive aid
- Verification Impossibility: No way to prove aid reached intended recipients
Alian Structure enables:
- β Direct Delivery: Donor β Recipient (zero intermediaries)
- β Complete Transparency: Immutable on-chain proof of delivery
- β Financial Inclusion: Stellar wallets accessible globally
- β AI-Verified Safety: Private need assessment before payment
- β Cost Efficiency: Near-zero transaction fees (~0.00001 XLM)
- π Verification: See exactly where your money goes via transaction hash
- π° Efficiency: 95%+ of donation reaches beneficiaries (vs 40% traditionally)
- π Global Reach: Support anyone with internet, no geography barriers
- π Impact Tracking: Real-time dashboard showing lives affected
- πΌ No Bank Required: Only internet connection needed
- β‘ Instant Settlement: Receive funds in 3-5 seconds
- π Security: Cryptographic proof of ownership
- π Global Access: Money works across 150+ countries
- π Program Management: Affiliate system, commission tracking, payouts
- π§ AI Verification: Privacy-preserving need assessment
- π Detailed Reporting: Export data, track metrics, audit trail
- π Security: Wallet-based authentication, role-based access control
- π§ Claim Link Creation: Simple interface for donors to create aid claim links
- π Referral System: Share links, earn commissions in XLM
- π Real-Time Dashboard: Track referrals, earnings, and impact
- π€ AI Verification: Privacy-first need assessment before settlement
- βοΈ On-Chain Proof: Immutable transaction records for transparency
- π΅ Multi-Tier Commissions: Direct, Tier 2, Tier 3 referral rewards
- π Earnings Analytics: Charts, breakdowns, trend analysis
- πΈ Payout Management: Request payouts, track status, view history
- π Secure Wallets: Freighter, Albedo, Ledger wallet support
- β¨ Cosmic UI Theme: Beautiful dark-mode interface with animations
- π± PWA Ready: Offline support, installable app, background sync
- β‘ Lightning Fast: Advanced caching, optimized performance
- π Push Notifications: Real-time updates on activities
- π Educational Mode: Learn best practices for platform use
| Technology | Purpose | Version |
|---|---|---|
| Next.js | React framework with SSR/SSG | 14+ |
| TypeScript | Type-safe development | 5.0+ |
| Tailwind CSS | Utility-first styling | 3.x |
| React Context | Global state management | Latest |
| Stellar SDK | Blockchain integration | Latest |
| Technology | Purpose | Version |
|---|---|---|
| NestJS | Node.js framework | 10+ |
| TypeScript | Type-safe backend | 5.0+ |
| PostgreSQL | Primary database | 14+ |
| Redis | Caching & queuing | 7+ |
| BullMQ | Job queue | Latest |
| Service | Role | Network |
|---|---|---|
| Stellar | Payment settlement | Public/Testnet |
| Freighter | Wallet integration | Multi-chain |
| Albedo | Alternative wallet | Stellar |
| Ledger | Hardware wallet | Stellar |
- Docker: Containerized deployment
- OpenTelemetry: Distributed tracing
- Prometheus: Metrics collection
- Grafana: Monitoring dashboard
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Donor / Recipient β
ββββββββββββββββ¬βββββββββββββββββββββββββββββ¬βββββββββββββββββββ
β β
ββββββββΌβββββββββ ββββββββΌβββββββββ
β Frontend β β Wallet β
β (Next.js) β β (Stellar) β
β β β β
β β’ UI/UX ββββββββββββΊβ β’ Freighter β
β β’ Forms β β β’ Albedo β
β β’ Dashboard β β β’ Ledger β
ββββββββ¬βββββββββ ββββββββββββββββ
β
ββββββββΌββββββββββββββββββββββββββββββββββββββ
β API Gateway & Auth β
β (JWT, Wallet Signature) β
ββββββββ¬βββββββββββββββββββββββββββββββββββββββ
β
ββββββββΌββββββββββββββββββββββββββββββββββββββ
β Backend Services (NestJS) β
β β
β ββββββββββββββββ ββββββββββββββββ β
β β Affiliate β β Payment β β
β β Service β β Service β β
β ββββββββββββββββ€ ββββββββββββββββ€ β
β β Commission β β AI β β
β β Tracking β β Verify β β
β ββββββββββββββββ€ ββββββββββββββββ€ β
β β Payout Mgmt β β Oracle β β
β ββββββββββββββββ ββββββββββββββββ β
ββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββ΄βββββββββββββββ¬ββββββββββββββββββββββ
β β β
βββββΌβββββ ββββββββΌβββββββ ββββββββΌβββββββ
βPostgreSQL β Redis β β Stellar β
βDatabase β Cache β β Blockchain β
β β β β β
β β’ Users β β’ Sessions β β β’ Payments β
β β’ Affiliates β β’ Jobs β β β’ Ledger β
β β’ Referrals β β’ Metrics β β β’ Accounts β
β β’ Payouts β β β β
ββββββββββ ββββββββββββββββ βββββββββββββββ
-
User Connection
- User connects Stellar wallet (Freighter/Albedo/Ledger)
- Wallet address used for authentication
- JWT token issued for session
-
Aid Creation
- Donor creates claim link with amount
- Link shared with recipients
- Recipients access via link
-
Verification & Settlement
- AI verifies recipient need (private)
- Payment executed on Stellar blockchain
- Transaction hash stored immutably
- Verification metadata recorded on-chain
-
Affiliate Tracking
- Referral tracked via code/link
- Commission calculated automatically
- Stored in database and on-chain
- User can request payout anytime
# Required
- Node.js 18+ (https://nodejs.org/)
- npm or yarn (https://yarnpkg.com/)
- Git (https://git-scm.com/)
# Optional but recommended
- Docker & Docker Compose
- PostgreSQL 14+ (or use Docker)
- Redis (or use Docker)git clone https://github.com/SourceXXL/alian_structure-UI.git
cd alian_structure-UI# Using npm
npm install
# Or using yarn
yarn install# Copy environment template
cp .env.example .env.local
# Edit .env.local with your configuration
# Minimum required:
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_ENVIRONMENT=development
NEXT_PUBLIC_STELLAR_NETWORK=testnet# Start development server with hot reload
npm run dev
# Visit http://localhost:3000# Build optimized bundle
npm run build
# Run production server
npm run start# Run test suite
npm test
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverage# Build Docker image
docker build -t alian-structure:latest .
# Run container
docker run -p 3000:3000 \
-e NEXT_PUBLIC_API_URL=http://localhost:3001 \
alian-structure:latest# Run full stack (frontend + backend + database)
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose downalian_structure-UI/
βββ app/ # Next.js app directory
β βββ layout.tsx # Root layout
β βββ page.tsx # Home page
β βββ affiliates/ # Affiliate routes
β β βββ page.tsx
β β βββ [id]/page.tsx
β βββ api/ # API routes
β βββ auth/
β βββ affiliates/
βββ components/ # React components
β βββ Navigation.tsx # Header/nav
β βββ ConnectWallet.tsx # Wallet connection button
β βββ WalletAddress.tsx # Address display
β βββ NetworkSwitcher.tsx # Network selector
β βββ context/
β βββ StellarWalletProvider.tsx # Wallet context
βββ features/ # Feature modules
β βββ affiliate-dashboard/
β βββ components/
β βββ hooks/
β βββ store/
β βββ services/
β βββ types/
βββ lib/ # Utilities & helpers
β βββ stellar.ts # Stellar SDK utilities
β βββ stellar-constants.ts # Network config
β βββ api-client.ts # API utilities
βββ styles/ # Global styles
β βββ globals.css
β βββ tailwind.config.js
βββ public/ # Static assets
β βββ images/
β βββ icons/
βββ tests/ # Test suite
β βββ __tests__/
β βββ e2e/
βββ docs/ # Documentation
β βββ SETUP.md
β βββ API.md
β βββ ARCHITECTURE.md
β βββ CONTRIBUTING.md
βββ .env.example # Environment template
βββ .env.local # Local config (not committed)
βββ package.json # Dependencies & scripts
βββ tsconfig.json # TypeScript config
βββ next.config.js # Next.js config
βββ README.md # This file
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:3001
NEXT_PUBLIC_ENVIRONMENT=development
# Stellar Network
NEXT_PUBLIC_STELLAR_NETWORK=testnet # testnet | public
NEXT_PUBLIC_STELLAR_RPC_URL=https://soroban-testnet.stellar.org
# Auth
NEXT_PUBLIC_JWT_EXPIRY=7d
SESSION_STORAGE_KEY=alian_session
# Analytics (optional)
NEXT_PUBLIC_ANALYTICS_ID=your-analytics-id
# Feature Flags
NEXT_PUBLIC_ENABLE_AFFILIATE=true
NEXT_PUBLIC_ENABLE_PWA=trueSee backend repository: alian_structure-api
| Wallet | Support | Version |
|---|---|---|
| Freighter | β Full | 5.0+ |
| Albedo | β Full | Latest |
| Ledger | β Full | Latest |
import { useStellarWallet } from '@/components/context/StellarWalletProvider';
export function MyComponent() {
const { wallet, connectWallet, disconnectWallet } = useStellarWallet();
return (
<div>
{wallet?.isConnected ? (
<>
<p>Connected: {wallet.publicKey}</p>
<p>Balance: {wallet.balances[0]?.balance} XLM</p>
<button onClick={disconnectWallet}>Disconnect</button>
</>
) : (
<button onClick={() => connectWallet('freighter')}>
Connect Wallet
</button>
)}
</div>
);
}| Tier | Source | Rate |
|---|---|---|
| Direct | Your referrals | 10% of volume |
| Tier 2 | Their referrals | 5% of volume |
| Tier 3 | Their referrals | 2% of volume |
- Minimum: 100 XLM
- Frequency: Weekly
- Processing: 1-2 business days
- Method: Stellar wallet transfer
- π Real-time earnings tracking
- π Commission breakdown by tier
- π Referral code generation
- πΈ Payout request system
- π Transaction history
- π Earnings reports
tests/
βββ __tests__/
β βββ wallet.test.tsx # Wallet component tests
β βββ affiliate.test.tsx # Affiliate dashboard tests
β βββ integration/
β βββ stellar.test.tsx # Stellar integration tests
βββ e2e/
βββ wallet.e2e.test.tsx # E2E wallet flows
βββ affiliate.e2e.test.tsx # E2E affiliate flows# Unit tests
npm test
# Watch mode
npm run test:watch
# Coverage
npm run test:coverage
# E2E tests (requires running app)
npm run test:e2e- β Offline access to cached pages
- β App installability on mobile/desktop
- β Background sync for data
- β Push notifications
- β Advanced caching strategies
# Run setup script
chmod +x scripts/setup-pwa.sh
./scripts/setup-pwa.sh
# Or manual setup
npm install next-pwa workbox-webpack-plugin
npm run build- β Never expose private keys
- β Always validate wallet addresses (56 chars, starts with G)
- β Use HTTPS in production
- β Implement rate limiting on API calls
- β Keep dependencies updated
- β Regular security audits
- Wallet-based (primary): Freighter/Albedo/Ledger
- Email/Password (optional): bcrypt hashing, JWT tokens
- Session persistence: localStorage with encryption
- Multi-wallet delegation support
- Stellar address validation on all requests
- Amount validation and minimum thresholds
- Transaction hash tracking for audit trail
- PII-safe metrics export
- CORS whitelist configuration
We welcome contributions from developers, designers, and community members!
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style (Prettier/ESLint configured)
- Add tests for new features
- Update documentation accordingly
- Keep commits atomic and descriptive
- Link related issues in PR description
# Install dependencies
npm install
# Create feature branch
git checkout -b feature/your-feature
# Make changes
# Edit files, write tests, etc.
# Run tests & linting
npm run lint
npm test
# Push and create PR
git push origin feature/your-feature- π Bugs: Use issue template, include reproduction steps
- π‘ Features: Describe use case and expected behavior
- β Questions: Use Discussions for general questions
- Setup Guide - Detailed installation instructions
- API Reference - Endpoint documentation
- Architecture - System design details
- Contributing - Contribution guidelines
- Stellar Integration - Wallet setup
- PWA Guide - Progressive Web App
- Metrics Dashboard - Telemetry & monitoring
- π Documentation: Check docs/ first
- π Issue Tracker: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Backend Repo: alian_structure-api
- π§ Email: support@alianstructure.com
- π Website: https://alianstructure.com
- π¦ Twitter: @AlianStructure
- π¬ Discord: Join Server
- β Frontend: Active Development
- β Backend: Active Development
- β Stellar Integration: Production-Ready
- π Affiliate System: Testing Phase
- π Roadmap: See ROADMAP.md
This project is licensed under the MIT License - see LICENSE file for details.
You are free to:
- β Use commercially
- β Modify
- β Distribute
- β Use privately
With the requirement to:
- π Include license and copyright notice
- Stellar Development Foundation for the incredible blockchain infrastructure
- Next.js & Vercel for the amazing React framework
- Open source community for countless libraries and tools
- Contributors who help make this project better
- Repository: SourceXXL/alian_structure-UI
- Language: TypeScript
- License: MIT
- Created: 2026
- Status: π’ Active Development
Made with β€οΈ by SourceXXL
Building transparent, direct humanitarian aid one transaction at a time.