- Added real-time messaging with Socket.io - Created comprehensive database schema (8 tables, functions, triggers) - Implemented messaging service with full CRUD operations - Built Socket.io service for real-time communication - Created React messaging components (Chat, ConversationList, MessageList, MessageInput) - Added end-to-end encryption utilities (RSA + AES-256-GCM) - Implemented 16 RESTful API endpoints - Added typing indicators, presence tracking, reactions - Created modern, responsive UI with animations - Updated server with Socket.io integration - Fixed auth middleware imports - Added comprehensive documentation Features: - Direct and group conversations - Real-time message delivery - Message editing and deletion - Emoji reactions - Typing indicators - Online/offline presence - Read receipts - User search - File attachment support (endpoint ready) - Client-side encryption utilities Dependencies: - socket.io ^4.7.5 - socket.io-client ^4.7.5
3.6 KiB
3.6 KiB
Frontend Integration for aethex.tech
Quick Start
Download and extract aethex-tech-frontend-components.tar.gz to get the React components.
What's Included
components/
├── DomainVerification.jsx ← Main verification UI
├── DomainVerification.css
├── VerifiedDomainBadge.jsx ← Display verified domain badge
└── VerifiedDomainBadge.css
Installation Steps
1. Copy Components
# Extract the archive
tar -xzf aethex-tech-frontend-components.tar.gz
# Copy to your aethex.tech src folder
cp -r components/* /path/to/aethex.tech/src/components/
2. Add to Your Profile/Settings Page
import DomainVerification from '@/components/DomainVerification';
import VerifiedDomainBadge from '@/components/VerifiedDomainBadge';
// In your profile settings section:
function ProfileSettings() {
return (
<div>
<h2>Domain Verification</h2>
<DomainVerification />
</div>
);
}
3. Display Badge on User Profiles
// In profile display component
function UserProfile({ user }) {
return (
<div>
<h1>{user.name}</h1>
{user.verified_domain && (
<VerifiedDomainBadge
verifiedDomain={user.verified_domain}
verifiedAt={user.domain_verified_at}
verificationType="dns"
/>
)}
</div>
);
}
How It Works
-
User clicks "Request Verification"
- Frontend calls:
POST api.aethex.cloud/api/passport/domain/request-verification - Gets back DNS TXT record to add
- Frontend calls:
-
User adds TXT record to their DNS
- Record name:
_aethex-verify - Record value:
aethex-verification=<token>
- Record name:
-
User clicks "Verify Domain"
- Frontend calls:
POST api.aethex.cloud/api/passport/domain/verify - Backend checks DNS records
- If found, domain is verified ✓
- Frontend calls:
-
Badge shows on profile
VerifiedDomainBadgecomponent displays verified domain- Shows verification date
- Green checkmark indicates ownership
API Endpoints Used
All endpoints are on api.aethex.cloud:
POST /api/passport/domain/request-verification- Get verification tokenPOST /api/passport/domain/verify- Verify ownershipGET /api/passport/domain/status- Check current status
Authentication
Components automatically use your existing auth tokens from localStorage:
const token = localStorage.getItem('authToken');
Make sure your auth token is stored with key 'authToken' or update line 26 in DomainVerification.jsx.
Customization
Change API URL
If your API is at a different endpoint:
<DomainVerification apiBaseUrl="https://your-api.com/api/passport/domain" />
Styling
- Edit
DomainVerification.cssfor the verification UI - Edit
VerifiedDomainBadge.cssfor the badge appearance - Both use CSS variables for easy theming
Testing
- Go to your profile settings on aethex.tech
- Enter a domain you own (e.g.,
yourdomain.com) - Get the TXT record
- Add it to your DNS (Cloudflare, Google Domains, etc.)
- Wait 5-10 minutes
- Click "Verify Domain"
- Badge appears! ✓
Troubleshooting
"Network error"
- Check that api.aethex.cloud is accessible
- Verify CORS is configured for aethex.tech
"Verification token not found"
- Wait longer (DNS can take 10+ minutes)
- Check TXT record was added correctly:
dig _aethex-verify.yourdomain.com TXT
Badge not showing
- Make sure
user.verified_domainis populated from your user API - Check database has
verified_domaincolumn on users table
Support
Questions? Check the main INTEGRATION.md in the AeThex-Connect repo.
Ready to verify domains! 🚀