This repository contains the frontend and core web application code for ASA Stats, a platform that evaluates and presents ASA and NFT price information on the Algorand blockchain.
For full installation, deployment, and troubleshooting instructions, please refer to the Official Documentation.
Requires Python 3 and PostgreSQL.
# Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements/development.txt
# Set environment variable and run
export DJANGO_SETTINGS_MODULE=asastats.settings.development
python manage.py migrate
python manage.py runserverManages UI state, Web3 wallet connections, and interactive charts.
cd asastats
npm install
npm run buildThe project uses pytest for Python and jest for Typescript/Javascript.
# Backend tests
pytest --cov . --cov-report term-missing
# Frontend Typescript tests
cd asastats
npm run test:coverage
# Frontend Javascript tests
cd frontend
npm run test:coverageThe repository uses a component-based architecture split into modular Django apps and a Vite frontend:
api: Frontend API (v2) for data processing and scoped endpoints.core: Main Django application (ORM, views, templates, permissions).nameservice: Integrations for NFDs and xChain accounts.walletauth: Web3 wallet authentication and cryptographic verifiers.widgethost: Registry and enforcement for modular interactive widgets.utils: Application-wide constants, charts, and caching utilities.frontend: Vite/TypeScript application utilizing@txnlab/use-walletfor transaction signing.
This repository relies on submodules. The widgets submodule is obligatory, and permissiondapp is optional.
To fetch their absolute latest remote updates:
git submodule update --remote asastats/widgets
git submodule update --remote asastats/permissiondappTo revert changes and reset them to the specific commits this frontend repo expects:
git submodule update --init --recursive --forcePython code formatting is enforced using isort and black. Be sure to exclude the submodules when running the formatter:
cd asastats/
isort .
black . --extend-exclude="widgets/" --extend-exclude="permissiondapp/"Infrastructure provisioning and deployment are handled via Ansible targeting Ubuntu Server 24.04 LTS. Playbooks and environment configurations can be found in the deploy/ directory.
# Example: Deploying project code to production
ansible-playbook --limit production --tags update-project-code deploy/site_playbook.yml