This guide provides step-by-step instructions to set up the Akkuea development environment on your local machine.
Ensure you have the following installed:
Bun is the primary runtime and package manager used in this project.
curl -fsSL https://bun.sh/install | bashDocker is required to run the database and caching services locally.
Required only if you intend to work on smart contracts.
git clone https://github.com/akkuea/akkuea.git
cd akkueaInstall all dependencies across the monorepo:
bun installYou need to set up environment variables for the API and Webapp.
cp apps/api/.env.example apps/api/.envKey Variables in apps/api/.env:
DATABASE_URL: Connection string for PostgreSQL (default:postgresql://user:password@localhost:5432/akkuea_defi).PORT: The port on which the API will run (default:3001).OPERATIONS_BACKEND_CREDENTIAL: A secret key used for internal admin operations. Must match the value inapps/webapp/.env.REDIS_URL: (Optional) Connection string for Redis caching (redis://localhost:6379).STELLAR_NETWORK: Set totestnetormainnet.LIQUIDATOR_API_KEY&INTERNAL_API_KEY: Secrets for restricted API endpoints.
cp apps/webapp/.env.example apps/webapp/.env.localKey Variables in apps/webapp/.env.local:
NEXT_PUBLIC_API_URL: The public URL of your local API (e.g.,http://localhost:3001).API_URL: The server-side URL of your local API (e.g.,http://localhost:3001).OPERATIONS_BACKEND_CREDENTIAL: Must match the value inapps/api/.env.OPERATIONS_ALLOWED_WALLETS: Comma-separated list of Stellar addresses allowed to access admin operations.NEXT_PUBLIC_USE_MOCK: Set totrueto use mock data instead of the actual API.
Use Docker Compose to start PostgreSQL and Redis:
docker compose -f docker-compose.dev.yml up -dIf this is your first time running the project, run the migrations:
cd apps/api
bun run db:migrate
cd ../..You will need to run each application in a separate terminal window or use a process manager.
Run API:
cd apps/api && bun run devRun Webapp:
cd apps/webapp && bun run devRun Akkuea Land (Game):
cd apps/akkuea-land && bun run devTo run the test suite across the entire project:
bun test