Skip to content

Streaks-Habits/streaks

Repository files navigation

License Gitlab pipeline status (self-hosted) Maintenance

Streaks

Streaks is a habit-tracking app that relies on streaks (like Duolingo or Snapchat), to help you build habits.

The principle is simple: when you accomplish your goal of the day you accumulate streaks, and the more streaks you have, the less you want to lose them (by not accomplishing your goal).

Streaks's dashboard

There is also Streaks CLI, to manage your calendars and progresses and automatically validate streaks by checking online services (Duolingo, Strava, GitLab...).

Installation

With Docker (recommended)

Edit the docker-compose.yml to suit your needs.

Go to the Configuration section to edit your .env file, then come back here.

Start your container with:

docker-compose up -d

You can check that everything went well by looking at the container logs:

docker-compose logs

Manual install

Officially supported on Linux, may work on another platform.

Install the following dependencies on your server:

  • NodeJS (with npm)

Clone the repository:

git clone https://git.chevro.fr/streaks/streaks.git streaks && cd streaks

You can now install the runner dependencies:

npm i

Go to the Configuration section to edit your .env file, then come back here.

Build and start the server with:

npm run build
npm run start

Configuration

Create a .env with the following content

PORT=80

REGISTRATIONS_ENABLED=true # allow users to create an account
DEMO_USER_ENABLED=true # add a demo user, which is reseted every day

ADMIN_API_KEY=<the admin api key> # for admin access

AUTH_JWT_EXPIRES=20d # three weeks
AUTH_JWT_SECRET=<a random key>
AUTH_COOKIE_EXPIRES=1814400 # three weeks
AUTH_COOKIE_SECRET=<a random key>

MONGO_URI=mongodb+srv://your-mongodb-connection-string
# On docker, use:
MONGO_URI=mongodb://db:27017/streaks?retryWrites=true&w=majority

# Matrix notifications
MATRIX_ENABLED=true
MATRIX_USER=<the complete username of the user that sends notifications>
MATRIX_URL=<your instanec>
MATRIX_TOKEN=<the token of the user>

Edit-it to suit your needs.

If the MongoDB database is the one deployed by the docker-compose.yml, leave MONGO_URI empty.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published