Skip to content
damianobarbatiPublic

About

Make your voice heard.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

voto.io

Make your voice heard.
Soon (but not yet) available here.
This project is 100% generated using AI and agentic workflows.

Development

Requirements:

  • fnm (eg: brew install fnm)
  • add eval "$(fnm env --use-on-cd)" into your ~/.zprofile or ~/.profile

Setup:

fnm install # nodejs from .nvmrc
npm install -g corepack
corepack enable # package manager from package.json
corepack install # package manager from package.json
pnpm install # install deps
export $(grep -v '^#' .env | xargs) # load-scenarios env vars
pnpm env:down # remove docker containers
pnpm env:up # start docker containers
pnpm -F api db:migrate # run migrations
pnpm -F api db:seed # seed db

Run:

pnpm -F api start:dev
pnpm -F webapp build:dev

Test:

pnpm -F api test
pnpm -F webapp test

Linting and typechecking:

pnpm lint
pnpm tsc

To run with https locally:

npx ngrok start --all --config ngrok.yml --authtoken <authtoken>

To run docker containers locally:

DOCKER_BUILDKIT=1 docker build --rm --force-rm -t api -f ./packages/api/Dockerfile .
DOCKER_BUILDKIT=1 docker build --rm --force-rm -t webapp --build-arg VITE_API_URL="http://localhost:8080" -f ./packages/webapp/Dockerfile .
docker run --rm -ti -p 8080:8080 --env-file .env -e DB_URI=postgresql://user:password@host.docker.internal/voto api
docker run --rm -ti -p 3000:80 webapp

NFRs

Run e2e testing:

pnpm -F e2e exec playwright install
pnpm -F e2e test

Run load testing:

pnpm -F api test:load

You can prefix with DEBUG=http to log every HTTP request being issued. Load testing should run on two dedicated runners with fixed CPU and memory limits/quotas for predictable results.
The load generator should run separately from the API host, otherwise Artillery competes with the service for CPU and network.

About

Make your voice heard.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages