Skip to content

Commit

Permalink
feat: huge docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
maxidragon committed Sep 7, 2024
1 parent d37dd9f commit 2044267
Show file tree
Hide file tree
Showing 23 changed files with 100 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/assembly-guide/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Assembly Guide",
"position": 4,
"position": 5,
"link": {
"type": "generated-index",
"description": "How to assemble FKM devices"
Expand Down
Binary file modified docs/assets/accounts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/add-competitor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/add-staff-member.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/adding-devices.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/competition-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/create-fkm-account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/create-wca-account.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/cubing-contests-api-key.png
Binary file not shown.
Binary file modified docs/assets/selecting-groups.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/assets/unofficial-events-button.png
Binary file not shown.
19 changes: 15 additions & 4 deletions docs/basic-knowledge/accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,29 @@ sidebar_position: 3

FKMTime primarily uses WCA accounts for authentication. This means, delegates and organizers should log in with their WCA accounts and they will have admin access to the panel.

But sometimes, you want for example staff member to check-in competitors. You have to create an FKMTime account for them.
But sometimes, you want for example staff member to check-in competitors. You have to create an FKMTime account for them OR add their WCA Account to the system.

## Creating an account

Go to **accounts** page
Go to **users** page

![img.png](../assets/accounts.png)

Click on the plus button, fill in the form and click create button. Staff member can now log in with these credentials.
Click on the plus button and you can choose between FKM and WCA account.

### FKM Account
![img.png](../assets/create-fkm-account.png)

Just fill in the details and click save, user will be able to login with username and password you provided.

### WCA Account

![img.png](../assets/create-wca-account.png)

Search for a person, select role and click save. User will be able to login with WCA account and will have the same permissions as you selected.

You can also delete any account, edit details or change password.

## Access to competition

If someone who logs in with WCA account doesn't have access to the competition will obviously not be added to accounts page, you have to add them as delegate/organizer on the WCA website and sync WCIF in competition tab.
If someone who logs in with WCA account doesn't have access to the competition (except for WCA Website Admins) will obviously not be added to accounts page, you have to add them as delegate/organizer on the WCA website and sync WCIF in competition tab first (or add their WCA Account, as described above).
10 changes: 3 additions & 7 deletions docs/basic-knowledge/assigning-cards.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
sidebar_position: 5
sidebar_position: 6
---

# Assigning cards
# Assigning cards & check-in

## Buy proper cards

Expand All @@ -14,8 +14,4 @@ Go to the persons tab and click Assign cards button.

![img.png](../assets/assigning-cards.png)

Just search the competitor and scan the card you want to assign to them and click enter. Search the next competitor and repeat the process.

## Adding volunteers to the system

You can click on the plus button in the persons tab and fill in the form. After that, you can assign a card to them as well.
Just search the competitor and scan the card you want to assign to them and click enter. Search the next competitor and repeat the process.
2 changes: 1 addition & 1 deletion docs/basic-knowledge/how-updates-work.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 7
sidebar_position: 9
---

# How updates work?
Expand Down
8 changes: 7 additions & 1 deletion docs/basic-knowledge/importing-competition.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ To import a competition, you need WCA account with access to the competition you

After first login to the system, you will be redirected to the import page.

:::note
If you are a WCA Website Admin (WRT/WST/WCAT) you can import any competitions, search bar will be visible. If you are not, you can import only competitions where you are a delegate or organizer.
:::

![img.png](../assets/importing-competition.png)

Just click the green import button and you will be redirected to competition settings page.

![img.png](../assets/competition-settings.png)

You will need a scoretaking token that can be taken from WCA Live. Go to the [account](https://live.worldcubeassociation.org/account) and generate one. This token is valid for 7 days and specific to the selected competition.
You will need a scoretaking token that can be taken from WCA Live. Go to the [account](https://live.worldcubeassociation.org/account) page and generate one. This token is valid for 7 days and specific to the selected competition.

If you plan to host unofficial events and want to send results automatically to Cubing Contests you should copy the token from the Cubing Contests Edit Contest page and paste it to the input field.

Also, you can set how often you want to send results to WCA Live. By default, every attempt is sent immediately after scanning cards. But you can turn it off completely (for testing purposes) or send results every 5 minutes if internet connection in the venue is not stable.

Expand Down
10 changes: 9 additions & 1 deletion docs/basic-knowledge/selecting-event.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
---
sidebar_position: 6
sidebar_position: 8
---

# Selecting current event

FKMTime needs to know which group is currently taking place in each room in order to enter results to the correct round.

## Best option
You can opt for doing it automatically, by checking the "Change groups automatically" checkbox in the competition settings, if so Group will be automatically changed to the next one from schedule if all results are entered and there are no unresolved incidents.

## Changing groups manually
Although it is recommended to select "Change groups automatically" option you are not forced to do so, you can change groups manually (but remember to do that after every group).

Go to the rooms tab and select the group that will take place now in each room.

![img.png](../assets/selecting-groups.png)
Expand Down
19 changes: 19 additions & 0 deletions docs/basic-knowledge/staff-members.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
sidebar_position: 7
---

# Staff members

Go to the persons page and click on the plus button.

## Adding staff member to the system

![img.png](../assets/add-staff-member.png)

Fill in the form and click save. You can also assign a card to them (read more about assignig cards [here](/basic-knowledge/assigning-cards)).

## Adding a competitor competing only in unofficial events to the system

If you want to add a competitor who is competing only in unofficial events, you can do it by clicking on the plus button in the persons tab and fill in the form. After that, you can assign a card to them as well.

![img.png](../assets/add-competitor.png)
6 changes: 3 additions & 3 deletions docs/basic-knowledge/unofficial-events.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 8
sidebar_position: 10
---

# Unofficial events
Expand All @@ -10,7 +10,7 @@ It is possible to use FKMTime for unofficial events. Basically, all you need to

1. Go to Competition tab and click "Unofficial events" button.

![img.png](../assets/unofficial-events-button.png)
![img.png](../assets/competition-settings.png)

2. Click on the plus button and choose the event and adjust rounds and limits.

Expand All @@ -24,4 +24,4 @@ Then click on "Add" button.

If you want to enter unofficial events results into CubingContests, you need to enter CubingContests API key in competition settings.

![img.png](../assets/cubing-contests-api-key.png)
![img.png](../assets/competition-settings.png)
3 changes: 3 additions & 0 deletions docs/development/wca-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ By default, FKMTime uses [dummy-wca](https://github.com/maxidragon/dummy-wca) th
If you want to use real WCA Server you can either setup [local WCA Server](https://docs.worldcubeassociation.org/contributing/quickstart.html) or use a staging one (if you have access). If you want to use staging server just change `WCA_ORIGIN` in `docker-compose-dev.yml` file to `https://staging.worldcubeassociation.org` and update `frontend/src/logic/request.ts`;

## WCA Live

By default FKMTime uses [dummy-wca-live](https://github.com/maxidragon/dummmy-wca-live) that is included in `docker-compose-dev.yml` file. You need to set scoretaking token to `wca-live-token` and this server will behave like real WCA Live server.

You can read how to setup local WCA Live server [here](https://github.com/thewca/wca-live?tab=readme-ov-file#developing-in-docker)
2 changes: 1 addition & 1 deletion docs/production/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"label": "Production",
"position": 3,
"position": 4,
"link": {
"type": "generated-index",
"description": "Setup FKMTime for production"
Expand Down
8 changes: 8 additions & 0 deletions docs/tests/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Tests",
"position": 3,
"link": {
"type": "generated-index",
"description": "Testing FKMTime"
}
}
6 changes: 2 additions & 4 deletions docs/development/tests.md → docs/tests/e2e-devices.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
---
sidebar_position: 5
sidebar_position: 1
---

# Tests

## E2E devices tests
# E2E devices tests

You can test the communication of FKM devices with `micro-connector` using builtin E2E tests.

Expand Down
28 changes: 28 additions & 0 deletions docs/tests/e2e-main.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
sidebar-position: 2
---

# E2E backend tests

FKMTime has a set of E2E tests that are testing the backend part of the application. These tests are using the real database.

## Running tests

1. Go to the `backend` directory and reset the database
```bash
npm run prisma:reset
```

2. Seed the database with test data
```bash
npm run prisma:seed-test
```

3. Run the tests
```bash
npm run test:e2e
```

:::note
E2E will run after every push to the repository, so you can check the status of the tests in the GitHub Actions tab.
:::

0 comments on commit 2044267

Please sign in to comment.