Compare commits
17 Commits
Author | SHA1 | Date |
---|---|---|
jaschop | 4a3065dc3c | |
jaschop | 1a4dcecaac | |
jaschop | 513bdc506b | |
weeman | 7ce61a9bc1 | |
weeman | fbd326b547 | |
gulliver | 904c7837d7 | |
Gulliver | b5e49346ee | |
Gulliver | e4c0459b60 | |
Gulliver | 10002757ab | |
Lukas Grossberger | a28bf9676d | |
gulliver | 22948e415b | |
Lukas Grossberger | 7b171a7b58 | |
Gulliver | 1ccc65a9e7 | |
Gulliver | 78347140ae | |
Gulliver | e8cdb715f2 | |
Gulliver | 774168e93a | |
Gulliver | 58d0657657 |
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
name: "Bug"
|
||||||
|
about: "Fehler melden"
|
||||||
|
labels:
|
||||||
|
- bug
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Zusammenfassung
|
||||||
|
|
||||||
|
*hier kurze Beschreibung des Problems einfügen*
|
||||||
|
|
||||||
|
## Schritte zum Nachstellen des Problems
|
||||||
|
|
||||||
|
*hier Schritte so auffschreiben, dass der Fehler nachgestellt werden kann, z.B.*
|
||||||
|
|
||||||
|
- Ich öffne die URL X
|
||||||
|
- Ich gebe `blubb` in das Name Feld ein
|
||||||
|
- Ich klicke auf den bunten Knopf
|
||||||
|
|
||||||
|
**Erwartetes Verhalten**
|
||||||
|
|
||||||
|
*hier hinschreiben, was passieren sollte, z.B.*
|
||||||
|
|
||||||
|
Ein Einhorn reitet von links nach rechts über den Bildschirm
|
||||||
|
|
||||||
|
**Aktuelles Verhalten**
|
||||||
|
|
||||||
|
*hier hinschreiben, was im Moment passiert; ggf. mit Video oder Screenshot ergänzen*
|
||||||
|
|
||||||
|
Ein Troll läuft von rechts nach links über den Bildschirm
|
||||||
|
|
||||||
|
## Sonstiges
|
||||||
|
|
||||||
|
- Betriebssystem (inkl. Version): **z.B. Ubuntu 20.04.3 LTS**
|
||||||
|
- Browser (inkl. Version): **z.B. Firefox 95.0.1 (64-bit)**
|
|
@ -0,0 +1,24 @@
|
||||||
|
---
|
||||||
|
|
||||||
|
name: "Feature"
|
||||||
|
about: "Ein neues Feature bestellen"
|
||||||
|
labels:
|
||||||
|
- enhancement
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Zusammenfassung
|
||||||
|
|
||||||
|
*hier kurze Beschreibung des gewünschten Features einfügen*
|
||||||
|
|
||||||
|
## Anwendungsfall
|
||||||
|
|
||||||
|
*hier den Anwendungsfall beschreiben*
|
||||||
|
|
||||||
|
*Warum möchte ich das haben?*
|
||||||
|
|
||||||
|
*Wie soll das neue Feature funktionieren?*
|
||||||
|
|
||||||
|
## Anhänge
|
||||||
|
|
||||||
|
*gerne Skizzen einfügen*
|
|
@ -0,0 +1,8 @@
|
||||||
|
FROM sphinxdoc/sphinx-latexpdf
|
||||||
|
|
||||||
|
RUN pip3 install sphinxcontrib-plantuml
|
||||||
|
RUN apt-get update && apt-get install plantuml locales-all -y
|
||||||
|
ENV LC_ALL="de_DE.UTF8"
|
||||||
|
WORKDIR /doc
|
||||||
|
CMD ["make", "latexpdf", "singlehtml"]
|
||||||
|
|
44
README.md
44
README.md
|
@ -13,28 +13,31 @@ Es existiert jweils ein Repo für den Frontend- und den Backend-Code:
|
||||||
- https://git.wtf-eg.de/kompetenzinventar/ki-frontend.git
|
- https://git.wtf-eg.de/kompetenzinventar/ki-frontend.git
|
||||||
- https://git.wtf-eg.de/kompetenzinventar/ki-backend.git
|
- https://git.wtf-eg.de/kompetenzinventar/ki-backend.git
|
||||||
|
|
||||||
## Features ##
|
|
||||||
|
|
||||||
TBD
|
|
||||||
|
|
||||||
## Contents
|
|
||||||
- [Features](#features)
|
|
||||||
- [Building](#building)
|
|
||||||
- [Contributing](#contributing)
|
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
building the ki-doku depends on python, sphinx,
|
Building the ki-doku depends on the following Python packages:
|
||||||
sphinx-contrib-plantuml und plantuml.
|
* `sphinx`
|
||||||
|
* `sphinxcontrib-plantuml`
|
||||||
|
|
||||||
building/ using the ki-backend depends on python and flask.
|
as well as the system dependency `plantuml`, which you can get e.g. with `apt install plantuml`
|
||||||
|
|
||||||
|
### Building with Docker
|
||||||
|
|
||||||
|
You can also build the docs using docker:
|
||||||
|
|
||||||
|
docker build -t ki-doku-builder .
|
||||||
|
docker run -v $(pwd)/doc:/doc ki-doku-builder
|
||||||
|
|
||||||
|
# results:
|
||||||
|
# ./doc/build/latex/kompetenzinventar.pdf
|
||||||
|
# ./doc/build/singlehtml/
|
||||||
|
|
||||||
|
Warning: the builder uses the `sphinx-latexpdf` base image, which contains an entire texlive environment, making it very large (~2.9G).
|
||||||
|
|
||||||
<!-- ROADMAP -->
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
See the [open issues](https://github.com/github_username/repo_name/issues) for a list of proposed features (and known issues).
|
See the [open issues](https://github.com/github_username/repo_name/issues) for a list of proposed features (and known issues).
|
||||||
|
|
||||||
<!-- CONTRIBUTING -->
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
|
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
|
||||||
|
@ -45,23 +48,14 @@ Contributions are what make the open source community such an amazing place to b
|
||||||
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
4. Push to the Branch (`git push origin feature/AmazingFeature`)
|
||||||
5. Open a Pull Request
|
5. Open a Pull Request
|
||||||
|
|
||||||
|
(Pull requests currently require an account on our private gitea, but we faithfully await deliverance from our federated [lord and saviour](forgefed.org).)
|
||||||
|
|
||||||
<!-- LICENSE -->
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Distributed under the ??? License. See `LICENSE` for more information.
|
Distributed under the ??? License. See `LICENSE` for more information.
|
||||||
|
|
||||||
<!-- CONTACT -->
|
|
||||||
## Contact
|
## Contact
|
||||||
<!--
|
|
||||||
Your Name - [@twitter_handle](https://twitter.com/twitter_handle) - email
|
|
||||||
-->
|
|
||||||
Project Link: [https://git.wtf-eg.de/kompetenzinventar](https://git.wtf-eg.de/kompetenzinventar)
|
Project Link: [https://git.wtf-eg.de/kompetenzinventar](https://git.wtf-eg.de/kompetenzinventar)
|
||||||
|
|
||||||
|
|
||||||
<!-- ACKNOWLEDGEMENTS -->
|
|
||||||
## Acknowledgements
|
|
||||||
|
|
||||||
* []()
|
|
||||||
* []()
|
|
||||||
* []()
|
|
||||||
|
|
|
@ -7,92 +7,133 @@ hide circle
|
||||||
skinparam linetype ortho
|
skinparam linetype ortho
|
||||||
|
|
||||||
entity "user" as user {
|
entity "user" as user {
|
||||||
*user_id : number <<generated>>
|
*id : number <<generated>>
|
||||||
--
|
--
|
||||||
*nickname : text
|
*auth_id : text(50)
|
||||||
*pronouns : text
|
' *created: datetime
|
||||||
*address_1_name: text
|
' *updated: datetime
|
||||||
*address_2_additional: text
|
|
||||||
*address_4_street: text
|
|
||||||
*adress_house_number: text
|
|
||||||
*adress_city_code: text
|
|
||||||
*adress_country: text
|
|
||||||
*Ehrenaemter: text
|
|
||||||
*gravatar_email : text
|
|
||||||
*Freitext: text
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entity user_skill {
|
entity tag {
|
||||||
user_id: id
|
*id : number <<generated>>
|
||||||
skill_id: id
|
*tag_type_id
|
||||||
--
|
|
||||||
level: number
|
|
||||||
}
|
|
||||||
|
|
||||||
entity user_language {
|
|
||||||
user_id: id
|
|
||||||
language_id: id
|
|
||||||
--
|
|
||||||
level: number
|
|
||||||
}
|
|
||||||
|
|
||||||
entity skill {
|
|
||||||
skill_id
|
|
||||||
--
|
--
|
||||||
*name: text
|
*name: text
|
||||||
}
|
}
|
||||||
|
|
||||||
entity user_experience {
|
entity tag_type {
|
||||||
user_id
|
*id : number <<generated>>
|
||||||
|
--
|
||||||
|
*name: text
|
||||||
|
}
|
||||||
|
|
||||||
|
tag_type ||--o{ tag
|
||||||
|
|
||||||
|
entity profile {
|
||||||
|
*id : number <<generated>>
|
||||||
|
*user_id
|
||||||
|
--
|
||||||
|
*nick_name : text(25)
|
||||||
|
pronouns : text(25)
|
||||||
|
fullname: text(100)
|
||||||
|
volunteerwork: text(4000)
|
||||||
|
freetext: text(4000)
|
||||||
|
visible: bool
|
||||||
|
*created: datetime
|
||||||
|
*updated: datetime
|
||||||
|
}
|
||||||
|
user ||-o{ profile : user_has_profile
|
||||||
|
|
||||||
|
entity token {
|
||||||
|
*id : number <<generated>>
|
||||||
|
*user_id
|
||||||
|
--
|
||||||
|
*token : text(36)
|
||||||
|
}
|
||||||
|
user ||-o{ token : user_has_token
|
||||||
|
|
||||||
|
entity profile_address {
|
||||||
|
*id : number <<generated>>
|
||||||
|
*profile_id
|
||||||
|
--
|
||||||
|
street: text(25)
|
||||||
|
house_number: text(10)
|
||||||
|
additional: text(25)
|
||||||
|
postcode: text(10)
|
||||||
|
city: text(25)
|
||||||
|
country: text(25)
|
||||||
|
}
|
||||||
|
profile ||-o{ profile_address : profile_has_address
|
||||||
|
|
||||||
|
entity profile_skill {
|
||||||
|
*profile_id: id
|
||||||
|
*skill_id: id
|
||||||
|
--
|
||||||
|
*level: number
|
||||||
|
}
|
||||||
|
|
||||||
|
entity profile_language {
|
||||||
|
*profile_id: id
|
||||||
|
*language_id: id
|
||||||
|
--
|
||||||
|
level: number
|
||||||
|
}
|
||||||
|
|
||||||
|
entity profile_experience {
|
||||||
|
*id : number <<generated>>
|
||||||
|
*profile_id
|
||||||
--
|
--
|
||||||
description
|
description
|
||||||
start: date
|
start: date
|
||||||
end: date
|
end: date
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entity profile_experience_experience {
|
||||||
|
*profile_experience_id
|
||||||
|
*experience_id
|
||||||
|
}
|
||||||
|
|
||||||
|
profile ||--o{ profile_experience : user_has_experience
|
||||||
|
profile_experience ||--o{ profile_experience_experience : user_experience_is_tagged_with
|
||||||
|
|
||||||
|
profile_experience_experience }o--|| tag
|
||||||
|
|
||||||
entity user_search_topic {
|
entity user_search_topic {
|
||||||
user_id
|
*user_id
|
||||||
topic_id
|
*topic_id
|
||||||
|
--
|
||||||
}
|
}
|
||||||
|
|
||||||
entity user_contact {
|
entity profile_contact {
|
||||||
user_id
|
*id : number <<generated>>
|
||||||
contact_type_id
|
*profile_id
|
||||||
|
*contact_type_id
|
||||||
--
|
--
|
||||||
content_: text
|
*content: text(200)
|
||||||
}
|
|
||||||
|
|
||||||
entity topic {
|
|
||||||
topic_id
|
|
||||||
--
|
|
||||||
*name: text
|
|
||||||
}
|
}
|
||||||
|
|
||||||
entity language {
|
entity language {
|
||||||
id
|
*id : number <<generated>>
|
||||||
--
|
--
|
||||||
name: text
|
*name: text(25)
|
||||||
}
|
}
|
||||||
|
|
||||||
entity experience {
|
entity contact_type {
|
||||||
id
|
*id : number <<generated>>
|
||||||
--
|
|
||||||
name: text
|
|
||||||
}
|
|
||||||
|
|
||||||
entity contact_types {
|
|
||||||
id
|
|
||||||
--
|
--
|
||||||
name
|
*name: text(25)
|
||||||
}
|
}
|
||||||
|
|
||||||
user ||--o{ user_skill : user_has_skills
|
profile ||--o{ profile_skill : user_has_skills
|
||||||
user_skill ||-o{ skill
|
profile_skill ||--o{ tag
|
||||||
user ||--o{ user_experience : user_has_experience
|
|
||||||
user_experience ||-o{ experience : user_experience_is_tagged_with
|
profile ||--o{ profile_language : user_speaks_language
|
||||||
user ||-o{ user_language : user_speaks_language
|
profile_language||--{ language
|
||||||
user_language||-{ language
|
|
||||||
user ||-o{ user_search_topic
|
user ||--o{ user_search_topic
|
||||||
user_search_topic ||-o{ topic
|
user_search_topic ||--o{ tag
|
||||||
|
|
||||||
|
profile ||-o{ profile_contact
|
||||||
|
profile_contact ||-o{ contact_type
|
||||||
|
|
||||||
@enduml
|
@enduml
|
||||||
|
|
|
@ -34,6 +34,9 @@ Technisch
|
||||||
Systemkontext
|
Systemkontext
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
Systemkontext Backend
|
||||||
|
*********************
|
||||||
|
|
||||||
.. uml:: systemcontext.plantuml.txt
|
.. uml:: systemcontext.plantuml.txt
|
||||||
|
|
||||||
Use cases
|
Use cases
|
||||||
|
@ -50,3 +53,193 @@ Datenmodell
|
||||||
|
|
||||||
.. uml:: erdmodel.plantuml.txt
|
.. uml:: erdmodel.plantuml.txt
|
||||||
|
|
||||||
|
Überblick Rest API
|
||||||
|
==================
|
||||||
|
|
||||||
|
Authentifizierung
|
||||||
|
*****************
|
||||||
|
|
||||||
|
HTTP Bearer Token. Wird vom Backend verwaltet. Es gibt eine konfigurierbare, maximale Gültigkeit für einen Token.
|
||||||
|
|
||||||
|
Allgemeine Antworten:
|
||||||
|
|
||||||
|
* 401: Anfrage ohne Token
|
||||||
|
* 403: Token abgelaufen oder ungültig
|
||||||
|
|
||||||
|
Authorisierung
|
||||||
|
**************
|
||||||
|
|
||||||
|
* Zugriff nur mit Login
|
||||||
|
* Jeder eingloggte Benutzer darf alles sehen
|
||||||
|
* Ein Benutzer darf nur sein eigenes Profil bearbeiten
|
||||||
|
|
||||||
|
Endpunkte
|
||||||
|
*****************
|
||||||
|
|
||||||
|
POST `/users/login`
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Hiermit kann sich ein Benutzer anmelden. Der Endpunkt authentifiziert gegen LDAP.
|
||||||
|
|
||||||
|
Anfrage:
|
||||||
|
|
||||||
|
.. code-block:: text
|
||||||
|
:linenos:
|
||||||
|
|
||||||
|
{
|
||||||
|
"username": "peter",
|
||||||
|
"password": "asdasd"
|
||||||
|
}
|
||||||
|
|
||||||
|
Antwort:
|
||||||
|
**Status 200**
|
||||||
|
|
||||||
|
Login hat geklappt
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"token": "aSDASDADASDASD"
|
||||||
|
}
|
||||||
|
|
||||||
|
**Status 403**
|
||||||
|
|
||||||
|
Login hat nicht geklappt. Grund ist Benutzer existiert nicht oder Passwort war falsch. Kein weiterer Text über die API wegen Sicherheit.
|
||||||
|
|
||||||
|
DELETE `/users/login`
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Markiert den zur Request Authentifizierung verwendeten Token als nicht mehr gültig.
|
||||||
|
|
||||||
|
POST `/users/profile`
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Speichert ein Profil ab. Übertragene Daten entsprechen #3 im JSON Format.
|
||||||
|
|
||||||
|
Anfrage:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"profile": {}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Antwort:
|
||||||
|
|
||||||
|
**Status 200**
|
||||||
|
|
||||||
|
Gespeichert, ok
|
||||||
|
|
||||||
|
**Status 400**
|
||||||
|
|
||||||
|
Validierung fehlgeschlagen
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"messages": {
|
||||||
|
"nickname": "Bitte ausfüllen"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GET `/users/{id}/profile`
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Endpunkt um ein Profil gezielt nach ID abzurufen.
|
||||||
|
|
||||||
|
Antwort:
|
||||||
|
|
||||||
|
|
||||||
|
**Status 200**
|
||||||
|
|
||||||
|
Profil gefunden
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"profile": {}
|
||||||
|
}
|
||||||
|
|
||||||
|
GET `/users/profiles`
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Suche nach Profilen mit Query-Parametern:
|
||||||
|
|
||||||
|
* `skill[]=PHP`
|
||||||
|
* `page=1` für die Paginierung
|
||||||
|
* `page_size=20` Einträge pro Seite
|
||||||
|
|
||||||
|
(Liste wird erweitert).
|
||||||
|
|
||||||
|
Antwort:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"total": 23,
|
||||||
|
"profiles": []
|
||||||
|
}
|
||||||
|
|
||||||
|
* `total` Gesamtanzahl der passenden Profile
|
||||||
|
* `profils` Liste mit Profilen
|
||||||
|
|
||||||
|
GET `/skills`
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Hier können die auswählbaren Fähigkeiten inkl. Autovervollständigung abgerufen werden sowie "Ich Suche".
|
||||||
|
|
||||||
|
* `search=an`
|
||||||
|
* Es werden 10 Einträge zurückgegeben
|
||||||
|
|
||||||
|
Antwort:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"skills": [
|
||||||
|
{
|
||||||
|
"id": 23,
|
||||||
|
"name": "Angular"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 42,
|
||||||
|
"name": "Anforderungs-Management"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GET `/skills/{id}/icon`
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
Icon einer Fähigkeit (weils gut ausschaut).
|
||||||
|
|
||||||
|
GET `/languages`
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Abruf der Sprachen.
|
||||||
|
|
||||||
|
* `search=fra`
|
||||||
|
* Es werden 10 Einträge zurückgegeben
|
||||||
|
|
||||||
|
Antwort:
|
||||||
|
|
||||||
|
.. code-block:: json
|
||||||
|
|
||||||
|
{
|
||||||
|
"languages": [
|
||||||
|
{
|
||||||
|
"id": 23,
|
||||||
|
"name": "Französisch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GET `/languages/{id}/icon`
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Icon einer Sprache (weils gut ausschaut).
|
||||||
|
|
|
@ -19,10 +19,10 @@
|
||||||
|
|
||||||
project = 'kompetenzinventar'
|
project = 'kompetenzinventar'
|
||||||
copyright = '2021, diverse'
|
copyright = '2021, diverse'
|
||||||
author = 'diverse'
|
author = 'Gulliver <gulliver@wtf-eg.de>, Scammo, Weeman'
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = '0.1'
|
release = '0.0.2'
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
@ -42,7 +42,7 @@ templates_path = ['_templates']
|
||||||
#
|
#
|
||||||
# This is also used if you do content translation via gettext catalogs.
|
# This is also used if you do content translation via gettext catalogs.
|
||||||
# Usually you set "language" from the command line for these cases.
|
# Usually you set "language" from the command line for these cases.
|
||||||
language = 'de en'
|
language = 'de'
|
||||||
|
|
||||||
# List of patterns, relative to source directory, that match files and
|
# List of patterns, relative to source directory, that match files and
|
||||||
# directories to ignore when looking for source files.
|
# directories to ignore when looking for source files.
|
||||||
|
|
Loading…
Reference in New Issue