stxeco-vote is the main ui component of the stx.eco community voting application.
The main routes are;
- home page displays current and previous votes
- voting page displays a specific proposal
- results page displays a specific proposal results
The stxeco-vote svelte application depends on;
- stxeco-api-vote for indexing contract data
- stxeco-helpers-btc wraps bitcoin api and helper methods for use in other components
- stxeco-helpers-stx wraps stacks api and helper methods for use in other components
- stxeco-components shared ui components (header/footer)
The following ts file contains an allow list of addresses;
- /src/lib/proposals.ts
Adding an address here and connecting the wallet reveals an admin link with some additional dao management features.
Test with node v20.10.0
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
Application currently runs in Linode cloud. This is an Ubuntu server running Caddy for the application and Caddy as a reverse proxy to the api docker container.
An ssh key is required for access (see @mijoco).
Web application is deployed by running
./stxeco-vote/deploy-stxeco.sh
The API application runs in a docker container which is built/deployed by running
./stxeco-api-vote/deploy-stxeco.sh