This project is an experiment to create a single globally available counter. Users can either increment the counter by one, or reset it to zero.
The counter was live at onesinglecounter.com.
It is also an excuse to experiment with technologies and concepts:
- concurrency patterns, eg. using channels to store values
syncprimitives likeatomicvalues,Condto syncronize events across goroutines- observability setups using
VictoriaMetrics,VictoriaLogsandGrafana shadcncomponentssvelte5
This project is inspired by One Million Checkboxes by Eieio Games.
If you use direnv, just :
direnv allow
otherwise, :
nix develop
You will need to install the following dependencies:
go1.23 or laterpnpm9 or later
And, optionally :
The first time you run the project, you will have to install pnpm dependencies:
cd web
pnpm i
Just:
mprocs
cd server
go run cmd/counter/main.go
cd web
pnpm run dev