Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into refactor/nittis
Browse files Browse the repository at this point in the history
  • Loading branch information
darmiel committed Oct 9, 2023
2 parents 6b31176 + c3074d3 commit 9c31be7
Show file tree
Hide file tree
Showing 13 changed files with 580 additions and 142 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bug Report
description: File a bug report
title: "[🐛]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: what-happened
attributes:
label: What happened?
description: Also tell us, what did you expect to happen?
placeholder: Tell us what you see!
value: "A bug happened!"
validations:
required: true
- type: dropdown
id: browsers
attributes:
label: On which browsers are you encountering the issue?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Other
- type: textarea
id: logs
attributes:
label: Relevant information
description: Please add further relevant information here.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Feature Request
description: Create a feature request
title: "[✨]: "
labels: ["enhancement"]
body:
- type: dropdown
id:
attributes:
label: What part of the project does your feature concern?
multiple: true
options:
- Frontend
- Backend
- Infrastructure
- Documentation
- type: markdown
attributes:
value: |
Thanks for taking the time to let us know your ideas for an awesome new feature for Kioku!
- type: textarea
id: feature-description
attributes:
label: Feature description
description: Please describe your desired feature in a few short sentences.
placeholder: Tell us what you would like to see!
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives
description: What alternatives have you considered?
validations:
required: true
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Description

Please provide a comprehensive description of the pull request's contents here.

## Resolved Issues

Please reference issues that get resolved by this PR here (resolves #<issue>)
146 changes: 121 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,130 @@
# Kioku
Welcome to the kioku-project!
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/kioku-project/kioku/assets/71837281/62942574-34ef-4e75-9b17-9721444f9d74">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/kioku-project/kioku/assets/60541979/1f827df3-5882-4285-913f-47f04b26196b">
<img alt="Kioku banner" src="">
</picture>

## Deploy Kioku to Kubernetes cluster
![GitHub contributors](https://img.shields.io/github/contributors/kioku-project/kioku)
[![Backend Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kioku-project_kioku_services&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kioku-project_kioku_services)
[![Frontend Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=kioku-project_kioku_frontend&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=kioku-project_kioku_frontend)
[![Backend Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=kioku-project_kioku_services&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=kioku-project_kioku_services)
[![Frontend Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=kioku-project_kioku_frontend&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=kioku-project_kioku_frontend)
[![Storybook link](https://github.com/storybookjs/brand/blob/master/badge/badge-storybook.svg)](https://main--63e354941aa15501d3467f88.chromatic.com)

### Prerequisites
- Kubernetes cluster
- Ingress controller
- [`helm`](https://helm.sh/)
# Welcome to Kioku!

### Installation
The cloud native flashcard application that focuses on collaborative content creation.

It is generally recommended to install Kioku to a fresh Kubernetes cluster, because there are some dependent deployments, which are all being deployed using the `deploy.sh` script:
- [`postgres-operator`](https://github.com/zalando/postgres-operator)
## Features

From the root-directory of the repository execute the following:
<table>
<tbody>
<tr>
<td><picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/kioku-project/kioku/assets/60541979/0cc0f108-f0e7-49c5-bafc-02123afdf514">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/kioku-project/kioku/assets/60541979/2e21c7e1-304d-4f2c-9328-3f0486c12d0c">
<img alt="Collaborative icon" src="">
</picture>
<b>Collaborative</b>

Collaborate with your friends and fellow students in groups and work on shared decks. Learn together and motivate each other!

</td>
<td><picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/kioku-project/kioku/assets/60541979/a3dbfa9e-0b38-477d-b1eb-705f30b45eda">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/kioku-project/kioku/assets/60541979/91a42bb7-8985-435f-8c61-c8a1f455dd7c">
<img alt="Individual icon" src="">
</picture>
<b>Individual</b>

Create and customize your own flashcards tailored to your needs and preferences. Set your own pace with our spaced repetition system to maximize your potential!

</td>
</tr>
<tr>
<td><picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/kioku-project/kioku/assets/60541979/d2753ef0-6e62-48f5-9b1c-fc4aea450a1b">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/kioku-project/kioku/assets/60541979/f18f855c-6f26-49a7-84eb-18ef94838c69">
<img alt="Compatible icon" src="">
</picture>
<b>Compatible</b>

Kioku is compatible with [Anki](https://apps.ankiweb.net/index.html), allowing you to import and export your existing decks into our application while taking advantage of Kioku's collaborative features!

</td>
<td><picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/kioku-project/kioku/assets/60541979/5c31d81d-dedd-4abf-8012-6b5b5ca430f4">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/kioku-project/kioku/assets/60541979/fc2b34df-ee6e-48cd-b1d5-3cbdd0eb0f2c">
<img alt="Informative icon" src="">
</picture>
<b>Informative</b>

We provide you with detailed statistics and insights into your study progress. Identify areas of improvement to optimize your strategy for maximum effectiveness!

</td>
</tr>
<tr>
<td><picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/kioku-project/kioku/assets/60541979/ee59ba9e-e3ee-4dfd-a170-3f8438523309">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/kioku-project/kioku/assets/60541979/d12880ec-2d74-4146-a8f8-b2ade59688c9">
<img alt="Available icon" src="">
</picture>
<b>Available</b>

Access your flashcards everywhere and at any time. Switch seamlessly between multiple platforms and never miss a learning opportunity again!

</td>
<td>
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/kioku-project/kioku/assets/60541979/76142857-6749-419a-becc-86b234f16d42">
<source media="(prefers-color-scheme: light)" srcset="https://github.com/kioku-project/kioku/assets/60541979/87bfe7ed-e292-4cd1-a6a3-ac26c0ea27ca">
<img alt="Entertaining icon" src="">
</picture>
<b vertical-align="center">Entertaining</b>

Achievements and leaderboards make learning more engaging and motivating. Kioku helps you to achieve better results and stay on track with your personal learning goals!

</td>
</tr>
</tbody>
</table>

# Index

1. [Getting started](#getting-started)
2. [Frontend development](./doc/frontend_development.md)
3. [Backend development](./doc/backend_development.md)
4. [Deployment](./doc/deployment.md)

# Getting started

In order to run Kioku locally, first clone the repository

```bash
./deploy.sh
```
git clone https://github.com/kioku-project/kioku
```

and configure the `.env` file in the `backend` folder

## Setup Storybook and Chromatic

To use [Storybook](https://storybook.js.org/) locally run `npm run storybook` and open [localhost:6006](http://localhost:6006) if it does not open automatically.

New to Storybook? Learn how to write stories [here](https://storybook.js.org/docs/react/writing-stories/introduction).

To use [Chromatic](https://www.chromatic.com/) you have to add the [chromatic-project-token](https://www.chromatic.com/manage?appId=63e354941aa15501d3467f88&view=configure) to your .env file.
```
cp .env.example .env
```
You can generate the `JWT_PRIVATE_KEY` with the following command
```
openssl ecparam -name secp521r1 -genkey -noout -out my.key.pem
```

> [!WARNING]
> The example environment file is populated with default values, be sure to change all values before using the application in production!
Finally, start the frontend and backend using [Docker Compose](https://docs.docker.com/compose/).

```
docker compose up
```

```
CHROMATIC_PROJECT_TOKEN=
```
To publish storybook to Chromatic run `npm run chromatic`.
|Service|URL|
|---|---|
| **Frontend** | [`http://localhost:3000`](http://localhost:3000) |
| **pgAdmin** | [`http://localhost:3002`](http://localhost:3002) |
| **micro dashboard** | [`http://localhost:3001`](http://localhost:3001) |
18 changes: 10 additions & 8 deletions backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
POSTGRES_HOST=db
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_USER=kioku
POSTGRES_PASSWORD=kioku
POSTGRES_DB=kioku
POSTGRES_PORT=5432

MICRO_REGISTRY=mdns
SERVER_AUTH_USERNAME=
SERVER_AUTH_PASSWORD=
PGADMIN_DEFAULT_EMAIL="[email protected]"
PGADMIN_DEFAULT_PASSWORD="test"

PGADMIN_DEFAULT_EMAIL=
PGADMIN_DEFAULT_PASSWORD=
MICRO_REGISTRY=mdns
SERVER_AUTH_USERNAME=admin
SERVER_AUTH_PASSWORD=micro

JWT_PRIVATE_KEY=
JWT_PRIVATE_KEY="
# generate with: `openssl ecparam -name secp521r1 -genkey -noout -out my.key.pem`
"
33 changes: 0 additions & 33 deletions backend/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions backend/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ require (
require (
dario.cat/mergo v1.0.0 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand All @@ -33,17 +32,11 @@ require (
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/savsgio/dictpool v0.0.0-20221023140959-7bf2e61cea94 // indirect
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect
github.com/tinylib/msgp v1.1.8 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.50.0 // indirect
github.com/valyala/tcplisten v1.0.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231002182017-d307bd883b97 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Expand Down
Loading

0 comments on commit 9c31be7

Please sign in to comment.