This repository contains the core API services that power the Aura platform. The diagram below illustrates the complete project architecture, with components in this repository highlighted in red.
The Aura API consists of several integrated services:
Serves the frontend UI with endpoints for:
- User authentication and authorization
- API key management
- Usage statistics and reporting
- Subscription and billing information
Facilitates communication with the Aura Proxy by:
- Providing user plan information and validation
- Receiving and processing usage statistics from the proxy
- Storing analytics data in ClickHouse databases
The API maintains several critical background processes:
- Aggregates usage statistics by hour and day
- Optimizes database performance through strategic data retention
- Prepares provider performance data for rewards calculation
- Runs on configurable schedules
- Calculates daily provider rewards based on usage
- Updates reward balances in PostgreSQL
- Monitors the blockchain for new payment transactions
- Validates transaction authenticity and completion
- Updates billing status accordingly
Project depends on PostgreSQL, ClickHouse, Consul and Dynamic. Without that services up and running Aura API will not be launched completely.
- Clone the repository
- Create a
.env
file based on the provided.env.example
- Speed up PostgreSQL. There is
docker-compose-postgre.yml
file to launch it locally - Speed up ClickHouse. There is
docker-compose-clickhouse.yml
file to launch it locally - Upload necessary configs to the Consul
- Setup Dynamic
File path config/aura-api/pricing
.
File example:
{
"free": {
"solana_das": {
"requests_per_second": 10,
"price_usd": 0
},
"eclipse_das": {
"requests_per_second": 10,
"price_usd": 0
},
"solana_rpc": {
"requests_per_second": 10,
"price_usd": 0
},
"eclipse_rpc": {
"requests_per_second": 10,
"price_usd": 0
},
"solana_get_program_accounts": {
"requests_per_second": 0,
"price_usd": 0
},
"eclipse_get_program_accounts": {
"requests_per_second": 0,
"price_usd": 0
},
"solana_swqos": {
"requests_per_second": 0,
"price_usd": 0
},
"eclipse_swqos": {
"requests_per_second": 0,
"price_usd": 0
},
"solana_websocket": {
"requests_per_second": 0,
"price_usd": 0
},
"eclipse_websocket": {
"requests_per_second": 0,
"price_usd": 0
},
"monthly_price_mplx": null,
"priority_support": false
},
"developer": {
"solana_das": {
"requests_per_second": 75,
"price_usd": 0.0000380
},
"eclipse_das": {
"requests_per_second": 75,
"price_usd": 0.0000380
},
"solana_rpc": {
"requests_per_second": 50,
"price_usd": 0.0000048
},
"eclipse_rpc": {
"requests_per_second": 50,
"price_usd": 0.0000048
},
"solana_get_program_accounts": {
"requests_per_second": 25,
"price_usd": 0.0000475
},
"eclipse_get_program_accounts": {
"requests_per_second": 25,
"price_usd": 0.0000475
},
"solana_swqos": {
"requests_per_second": 20,
"price_usd": 0.0001900
},
"eclipse_swqos": {
"requests_per_second": 20,
"price_usd": 0.0001900
},
"solana_websocket": {
"requests_per_second": 10,
"price_usd": 0.0000048
},
"eclipse_websocket": {
"requests_per_second": 10,
"price_usd": 0.0000048
},
"monthly_price_mplx": null,
"priority_support": false
},
"advanced": {
"solana_das": {
"requests_per_second": 30,
"price_usd": 0
},
"eclipse_das": {
"requests_per_second": 30,
"price_usd": 0
},
"solana_rpc": {
"requests_per_second": 30,
"price_usd": 0
},
"eclipse_rpc": {
"requests_per_second": 30,
"price_usd": 0
},
"solana_get_program_accounts": {
"requests_per_second": 20,
"price_usd": 0
},
"eclipse_get_program_accounts": {
"requests_per_second": 20,
"price_usd": 0
},
"solana_swqos": {
"requests_per_second": 10,
"price_usd": 0
},
"eclipse_swqos": {
"requests_per_second": 10,
"price_usd": 0
},
"solana_websocket": {
"requests_per_second": 0,
"price_usd": 0
},
"eclipse_websocket": {
"requests_per_second": 0,
"price_usd": 0
},
"monthly_price_mplx": 500000000,
"priority_support": true
},
"pro": {
"solana_das": {
"requests_per_second": 100,
"price_usd": 0
},
"eclipse_das": {
"requests_per_second": 100,
"price_usd": 0
},
"solana_rpc": {
"requests_per_second": 100,
"price_usd": 0
},
"eclipse_rpc": {
"requests_per_second": 100,
"price_usd": 0
},
"solana_get_program_accounts": {
"requests_per_second": 50,
"price_usd": 0
},
"eclipse_get_program_accounts": {
"requests_per_second": 50,
"price_usd": 0
},
"solana_swqos": {
"requests_per_second": 30,
"price_usd": 0
},
"eclipse_swqos": {
"requests_per_second": 30,
"price_usd": 0
},
"solana_websocket": {
"requests_per_second": 20,
"price_usd": 0
},
"eclipse_websocket": {
"requests_per_second": 20,
"price_usd": 0
},
"monthly_price_mplx": 1500000000,
"priority_support": true
}
}
File path: config/aura-api/methods/prices
.
File example:
{
"solana_das": {
"requests_per_second": 75,
"price_usd": 0.0000380
},
"eclipse_das": {
"requests_per_second": 75,
"price_usd": 0.0000380
},
"solana_rpc": {
"requests_per_second": 50,
"price_usd": 0.0000048
},
"eclipse_rpc": {
"requests_per_second": 50,
"price_usd": 0.0000048
},
"solana_get_program_accounts": {
"requests_per_second": 25,
"price_usd": 0.0000475
},
"eclipse_get_program_accounts": {
"requests_per_second": 25,
"price_usd": 0.0000475
},
"solana_swqos": {
"requests_per_second": 20,
"price_usd": 0.0001900
},
"eclipse_swqos": {
"requests_per_second": 20,
"price_usd": 0.0001900
},
"solana_websocket": {
"requests_per_second": 10,
"price_usd": 0.0000048
},
"eclipse_websocket": {
"requests_per_second": 10,
"price_usd": 0.0000048
},
"monthly_price_mplx": null,
"priority_support": false
}
Value path: config/aura-api/mplx
.
Value example:
123.456
Value path: config/aura-api/payments/recipient
.
Value example:
METAewgxyPbgwsseH8T16a39CQ5VyVxZi9zXiDPY18m