Astra is a platform for collecting and storing women's health data. It is built on top of the Akave and Vana protocols, and includes a telegram bot and mini app with Self.xyz for zk-proof identity verification.
Can switch to a feature based architecture to scale.
- Implement logging
- Set up production environment
- Optimize localized notifications in telegram
Data is collected from a telegram bot and mini app. The bot is used to collect user data and the mini app is used to collect health data. This process is creates a web2 experience for users.
The application handles health data through multiple services:
-
Akave Service (
services/akave.js)- Handles encrypted data storage on O3 (Object Storage)
- Uses OpenPGP encryption for data security
- Maintains data integrity through consistent encryption/decryption processes
- Stores both health profiles and daily check-ins
-
Vana Service (
services/vana.js)- Manages data contribution to the Vana data liquidity pool
- Handles file registration and permission management
- Implements TEE (Trusted Execution Environment) proof submission
- Manages reward claiming for data contributions
- Data is first converted to a File object
- File is encrypted using OpenPGP with user's signature
- Encrypted data is uploaded to O3 storage
- Returns a signed URL for future access
- Takes the O3 storage URL from Akave
- Registers the file with the Data Registry contract
- Requests contribution proof from TEE Pool
- Submits proof to TEE with:
- Fixed IV and ephemeral keys for consistent encryption
- Permission validation parameters
- Encrypted encryption key for TEE
- Claims rewards upon successful proof submission
- Consistent encryption parameters across services
- Permission-based access control
- TEE validation for secure data processing
- Checksum verification for data integrity
The application uses a Bull queue system to handle:
- Asynchronous data uploads
- Retry mechanisms for failed uploads
- State management between upload attempts
- Parallel processing of health and check-in data
This architecture ensures:
- Data privacy through encryption
- Reliable data storage and contribution
- Consistent reward distribution
- Scalable processing of user data
Proofs and contracts are stored in different repositories.
Summary Table:
| Action | Command Example |
|---|---|
| List buckets | aws s3 ls --profile akave --endpoint-url https://o3-rc2.akave.xyz |
| Make bucket | aws s3 mb s3://asterisk-checkin-data --profile akave --endpoint-url https://o3-rc2.akave.xyz |
| List contents | aws s3 ls s3://my-bucket --profile akave --endpoint-url https://o3-rc2.akave.xyz |
| Remove bucket | aws s3 rb s3://my-bucket --profile akave --endpoint-url https://o3-rc2.akave.xyz |