Skip to content

edam/stars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Daily Stars

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!)

Screenshots

screenshot

Build and Install

Build

First install v.

Then install dependencies:

$ v install edam.ggetopt
$ ( cd webapp && npm install )

Then build

$ make

Output:

  • src/starsd -- backend
  • src/stars -- CLI tool

Running Backend

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

Running CLI Tool

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

Running WebApp

TBD

Development

Install project dependencies, as per Build seciton.

Backend

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

CLI Tool

$ cd src
$ v run cmd/cli --host=localhost admin

To see network activity:

$ v -d trace_stars run cmd/cli --host=localhost admin

WebApp

$ make dev-webapp

This connects to the local test server (above) by default.

About

Daily Stars (backend)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages