This guide covers how to deploy the Astera frontend to various hosting providers.
The easiest way to deploy the Astera frontend is via Vercel.
Click the button below to fork the repository and deploy a new instance to Vercel:
- Push your code to GitHub/GitLab/Bitbucket.
- Connect your repository to Vercel.
- Configure the following environment variables:
NEXT_PUBLIC_NETWORK:testnetormainnetNEXT_PUBLIC_INVOICE_CONTRACT_ID: Your deployed contract IDNEXT_PUBLIC_POOL_CONTRACT_ID: Your deployed contract IDNEXT_PUBLIC_USDC_TOKEN_ID: The SAC address for USDC
- Vercel will automatically detect the Next.js framework and build the project.
- Connect your repository to Netlify.
- Set the Base directory to
frontend. - Set the Build command to
npm run build. - Set the Publish directory to
.next. - Add the environment variables listed above in the Site settings > Environment variables section.
You can build and run the frontend using the provided Dockerfile.
- Build the image:
docker build -t astera-frontend ./frontend
- Run the container:
docker run -p 3000:3000 \ -e NEXT_PUBLIC_NETWORK=testnet \ -e NEXT_PUBLIC_INVOICE_CONTRACT_ID=... \ -e NEXT_PUBLIC_POOL_CONTRACT_ID=... \ astera-frontend
| Variable | Description | Example |
|---|---|---|
NEXT_PUBLIC_NETWORK |
Stellar network to use | testnet |
NEXT_PUBLIC_INVOICE_CONTRACT_ID |
ID of the Invoice contract | CA... |
NEXT_PUBLIC_POOL_CONTRACT_ID |
ID of the Pool contract | CB... |
NEXT_PUBLIC_USDC_TOKEN_ID |
ID of the USDC stablecoin contract | CC... |
NEXT_PUBLIC_CREDIT_SCORE_CONTRACT_ID |
(Optional) ID of the Credit Score contract | CD... |