Skip to content

Commit

Permalink
feat: 🎨 adding a readme and a license
Browse files Browse the repository at this point in the history
  • Loading branch information
cestoliv committed Oct 27, 2022
1 parent 955b133 commit 1d642c8
Show file tree
Hide file tree
Showing 4 changed files with 308 additions and 54 deletions.
Binary file added .readme/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
215 changes: 215 additions & 0 deletions .readme/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Olivier Cartier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
126 changes: 72 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,91 @@
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="200" alt="Nest Logo" /></a>
</p>

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.

## Installation
![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)
![Gitlab pipeline status (self-hosted)](https://img.shields.io/gitlab/pipeline-status/streaks/streaks?branch=main&gitlab_url=https%3A%2F%2Fgit.chevro.fr&style=flat-square)
![Maintenance](https://img.shields.io/maintenance/yes/2022?style=flat-square)

<img src=".readme/logo.svg" height="60" width="60" align="right">

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](.readme/dashboard.png)

There is also [Streaks Runner](https://git.chevro.fr/streaks/runner), to automate your tasks.

Installation
============

With Docker (recommended)
-------------------------
Download the `docker-compose.yml`
```bash
$ npm install
mkdir streaks && cd "$_"
wget https://git.chevro.fr/streaks/runner/-/raw/main/docker-compose.yml
```

## Running the app
Edit the `docker-compose.yml` to suit your needs.

```bash
# development
$ npm run start
**Go to the [Configuration](#configuration) section to edit your `.env` file, then come back here.**

# watch mode
$ npm run start:dev
Start your container with:
```bash
docker-compose up -d
```

# production mode
$ npm run start:prod
You can check that everything went well by looking at the container logs:
```bash
docker-compose logs
```

## Test
Manual install
--------------
Officially supported on Linux, may work on another platform.

```bash
# unit tests
$ npm run test
Install the following dependencies on your server:
- NodeJS (with npm)

# e2e tests
$ npm run test:e2e
Clone the repository:
```bash
git clone https://git.chevro.fr/streaks/streaks.git streaks && cd streaks
```

# test coverage
$ npm run test:cov
You can now install the runner dependencies:
```bash
npm i
```

## Support
**Go to the [Configuration](#configuration) section to edit your `.env` file, then come back here.**

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
Build and start the server with:
```bash
npm run build
npm run start
```

## Stay in touch
Configuration
=============

- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)
Use the creation script to create your `.env` file.

## License
If you use docker, run:
```bash
docker-compose exec streaks node user_scripts/set_env.js
```
Otherwise, run:
```bash
node user_scripts/set_env.js
```

This script should create an `.env` file that looks like this:
```env
PORT=80
TZ=Europe/Paris
JWT_KEY=random
MONGO_URI=mongodb+srv://your-mongodb-connection-string
```
Edit-it to suit your needs.

Nest is [MIT licensed](LICENSE).
**If the MongoDB database is the one deployed by the `docker-compose.yml`, leave `MONGO_URI` empty.**

0 comments on commit 1d642c8

Please sign in to comment.