Daily Stars is a motivational daily rewards programme for kids (and parents)!
It has:
- A backend (with Dockerfile) and CLI tool (itsself a full client, plus admin tool), written in V.
- a web/mobile frontend, written in React (coming soon!)
First install v.
Then install dependencies:
$ v install edam.ggetopt
$ ( cd webapp && npm install )
Then build
$ make
Output:
src/starsd
-- backendsrc/stars
-- CLI tool
First initialise database with --create
, which also adds a defalt "admin"
user.
$ src/starsd --db-file=stars.db --create
(Note: other database options exist too; the above uses local sqlite3 DB. See
--help
for other options, including PostgreSQL.)
Then start backend normally:
$ src/starsd --db-file=stars.db
You can add/remove other users with the CLI tool. And if you even lose access, you can re-add and reset the admin user:
$ src/starsd --db-file=stars.db --reset-admin
Copy starsrc.example
to ~/starsrc
and edit config to specify the server and
user credentials.
Then run:
$ stars
Also, for help/options, go:
$ stars --help
And for the admin menu, to set up prizes/stars:
$ stars admin
TBD
Install project dependencies, as per Build seciton.
To run a local test server with a local test database:
$ make dev-starsd
And to recreate the local test database:
$ make dev-starsd-reset
$ cd src
$ v run cmd/cli --host=localhost admin
To see network activity:
$ v -d trace_stars run cmd/cli --host=localhost admin
$ make dev-webapp
This connects to the local test server (above) by default.