ballot-box-ballot
v0.3.4
Published
Embeddable Ballot for BallotBox platform
Downloads
7
Readme
BallotBox-Ballot
About The Project
BallotBox is a custom Voting platform that lets you embed your Ballots on 3rd pary websites
Built With
- React v18
- Typescript
- Chakra UI
Getting Started
You will only need the BallotBox API URL and a Ballot ID number to embed in React or 3rd party.
- yarn
yarn install && yarn dev
Local dev
If you are developing locally you will be using main.tsx
as your entry point for changes. The widget will operate like a normal React app. You will need to change the vite.config.ts
environment variable to development
instead of production
when dev'ing locally, but change it back to production
before building.
3rd party embed dev
If you are developing for 3rd party you will want to preview changes by loading up test-embed.html
- you will need to build the changes by running
yarn build
- you can load up
faux-cdn
rails server to simulate cdn hosting- copy
ballot-box-ballot.umd.cjs
to the rails server so it can be served
- copy
- refresh
test-embed.html
Deploying
The flow I'm using to handle deployment is to make changes in a branch created off of dev
. Once everything is good and you're ready to publish, bump the version number in the package.json
file and then run
- npm
Once that is pushed merge the branch in and update any apps using the package.npm publish
Roadmap
Roadmap is generally located inside of our Linear project but here are some pressing items:
- [ ] Add Changelog
- [ ] Add logged in state
- [ ] Add ability to read cookies if found
License
Not open source 😉