mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add Dockerfile
This commit is contained in:
parent
543e78e7ab
commit
509455c4d8
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
.git
|
||||
.gitignore
|
||||
16
Dockerfile
Normal file
16
Dockerfile
Normal file
@ -0,0 +1,16 @@
|
||||
# base image
|
||||
FROM node:10.15.0
|
||||
|
||||
# set working directory
|
||||
RUN mkdir /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# add `/usr/src/app/node_modules/.bin` to $PATH
|
||||
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||
|
||||
# install and cache app dependencies
|
||||
COPY package.json /usr/src/app/package.json
|
||||
RUN npm install
|
||||
RUN npm install -g @vue/cli
|
||||
# start app
|
||||
CMD ["npm", "run", "serve"]
|
||||
369
README.md
369
README.md
@ -1,200 +1,237 @@
|
||||
# Vue Gradido Wallet
|
||||
|
||||
|
||||
# install mit npm
|
||||
```
|
||||
$ git clone https://github.com/gradido/gradido_vue_wallet.git [project-name]
|
||||
$ cd [project-name]
|
||||
$ npm install
|
||||
$ npm run serve
|
||||
|
||||
### Build
|
||||
$ npm run build
|
||||
```
|
||||
|
||||
# install mit docker
|
||||
```
|
||||
$ docker build -t [project-name] .
|
||||
$ docker run -it -p 80:80 --rm [project-name]
|
||||
```
|
||||
|
||||
# Bootstrap Vue Gradido Wallet
|
||||
|
||||
|
||||
|
||||
**Fully Coded Components**
|
||||
|
||||
Bootstrap Vue Gradido Wallet - is built with over 100 individual components, giving you the freedom of choosing and combining. All components can take variations in color, that you can easily modify using SASS files.
|
||||
You will save a lot of time going from prototyping to full-functional code, because all elements are implemented. This Dashboard is coming with pre-built examples, so the development process is seamless, switching from our pages to the real website is very easy to be done.
|
||||
Every element has multiple states for colors, styles, hover, focus, that you can easily access and use.
|
||||
Bootstrap Vue Gradido Wallet -
|
||||
|
||||
**DEMO:** [https://vast-atoll-44277.herokuapp.com/](https://vast-atoll-44277.herokuapp.com/)
|
||||
|
||||
|
||||
**Complex Documentation**
|
||||
ISSUES:
|
||||
|
||||
- [ ] csrf token management
|
||||
|
||||
|
||||
- [ ] Userdaten - Testbenutzer - test.json
|
||||
|
||||
|
||||
**Example Pages**
|
||||
- [ ] Session Cookie: GRADIDO_LOGIN enhancement
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Table of Contents
|
||||
|
||||
* [Versions](#versions)
|
||||
* [Demo](#demo)
|
||||
* [Quick Start](#quick-start)
|
||||
* [Documentation](#documentation)
|
||||
* [File Structure](#file-structure)
|
||||
* [Browser Support](#browser-support)
|
||||
* [Resources](#resources)
|
||||
* [Reporting Issues](#reporting-issues)
|
||||
* [Licensing](#licensing)
|
||||
* [Useful Links](#useful-links)
|
||||
|
||||
## Versions
|
||||
- [ ] 🚀 [Feature] - Create a dockerfile for the frontend application enhancement
|
||||
|
||||
|
||||
|
||||
|
||||
## Demo
|
||||
|
||||
|
||||
## Quick start
|
||||
|
||||
|
||||
|
||||
## Documentation
|
||||
The documentation for the Bootstrap Vue Gradido Wallet is hosted at our [website]().
|
||||
___________
|
||||
|
||||
|
||||
## File Structure
|
||||
Within the download you'll find the following directories and files:
|
||||
# 🌟 [EPIC] - Gradido Web- and App- Client
|
||||
|
||||
Web-App:
|
||||
Einstiegspunkt:
|
||||
[ ] Login-Server for app-requests (Sollte in der App einstellbar sein) https://staging.gradido.net/appRequest
|
||||
|
||||
[ ] Auch die url für Community-Server requests sollte in einer Variable gespeichert sein.
|
||||
CakePHP Seite auf die der Login-Server nach dem Login weiterleitet.
|
||||
https://staging.gradido.net/client
|
||||
|
||||
Hiermit kann ein Konto anlegt werden:
|
||||
https://staging.gradido.net/account/registerDirect
|
||||
|
||||
# Fehler im Code
|
||||
Wenn etwas nicht stimmt, entweder mit den Input-Paremetern, oder ein Fehler im Code gibt es meistens folgendes als Ergebnis:
|
||||
```
|
||||
|-- Bootstrap Vue Gradido Wallet
|
||||
|-- .gitignore
|
||||
|-- CHANGELOG.md
|
||||
|-- ISSUES_TEMPLATE.md
|
||||
|-- LICENSE.md
|
||||
|-- README.md
|
||||
|-- babel.config.js
|
||||
|-- package.json
|
||||
|-- public
|
||||
| |-- img
|
||||
| |-- favicon.ico
|
||||
| |-- index.html
|
||||
|-- src
|
||||
|-- assets
|
||||
| |-- logo.png
|
||||
| |-- scss
|
||||
| | |-- core
|
||||
| | |-- custom
|
||||
| | |-- argon.scss
|
||||
| |-- vendor
|
||||
| |-- nucleo
|
||||
|-- components
|
||||
| |-- Badge.vue
|
||||
| |-- BaseAlert.vue
|
||||
| |-- BaseButton.vue
|
||||
| |-- BaseDropdown.vue
|
||||
| |-- BaseHeader.vue
|
||||
| |-- BasePagination.vue
|
||||
| |-- BaseProgress.vue
|
||||
| |-- BaseSlider.vue
|
||||
| |-- BaseTable.vue
|
||||
| |-- ButtonCheckbox.vue
|
||||
| |-- ButtonRadioGroup.vue
|
||||
| |-- CloseButton.vue
|
||||
| |-- index.js
|
||||
| |-- LoadingPanel.vue
|
||||
| |-- Modal.vue
|
||||
| |-- NavbarToggleButton.vue
|
||||
| |-- Breadcrumb
|
||||
| | |-- Breadcrumb.vue
|
||||
| | |-- BreadcrumbItem.vue
|
||||
| | |-- RouteBreadcrumb.vue
|
||||
| |-- Cards
|
||||
| | |-- Card.vue
|
||||
| | |-- StatsCard.vue
|
||||
| |-- Charts
|
||||
| | |-- BarChart.js
|
||||
| | |-- config.js
|
||||
| | |-- globalOptionsMixin.js
|
||||
| | |-- LineChart.js
|
||||
| | |-- optionHelpers.js
|
||||
| | |-- roundedCornersExtension.js
|
||||
| |-- Collapse
|
||||
| | |-- Collapse.vue
|
||||
| | |-- CollapseItem.vue
|
||||
| |-- Inputs
|
||||
| | |-- BaseCheckbox.vue
|
||||
| | |-- BaseInput.vue
|
||||
| | |-- BaseRadio.vue
|
||||
| |-- Navbar
|
||||
| | |-- BaseNav.vue
|
||||
| | |-- NavbarToggleButton.vue
|
||||
| |-- NotificationPlugin
|
||||
| | |-- index.js
|
||||
| | |-- Notification.vue
|
||||
| | |-- Notifications.vue
|
||||
| |-- SidebarPlugin
|
||||
| | |-- index.js
|
||||
| | |-- SideBar.vue
|
||||
| | |-- SidebarItem.vue
|
||||
| |-- Tabs
|
||||
| | |-- Tab.vue
|
||||
| | |-- Tabs.vue
|
||||
|-- directives
|
||||
| |-- click-ouside.js
|
||||
|-- plugins
|
||||
| |-- dashboard-plugin.js
|
||||
| |-- globalComponents.js
|
||||
| |-- globalDirectives.js
|
||||
|-- routes
|
||||
| |-- router.js
|
||||
| |-- routes.js
|
||||
| |-- starterRouter.js
|
||||
|-- util
|
||||
| |-- throttle.js
|
||||
|-- views
|
||||
|-- Dashboard.vue
|
||||
|-- GoogleMaps.vue
|
||||
|-- Icons.vue
|
||||
|-- NotFoundPage.vue
|
||||
|-- RegularTables.vue
|
||||
|-- Dashboard
|
||||
| |-- PageVisitsTable.vue
|
||||
| |-- SocialTrafficTable.vue
|
||||
|-- Layout
|
||||
| |-- Content.vue
|
||||
| |-- ContentFooter.vue
|
||||
| |-- DashboardLayout.vue
|
||||
| |-- DashboardNavbar.vue
|
||||
|-- Maps
|
||||
|-- APY_KEY.js
|
||||
|-- Pages
|
||||
|-- UserProfile
|
||||
|-- AuthLayout.vue
|
||||
|-- Login.vue
|
||||
|-- Register.vue
|
||||
|-- UserProfile.vue
|
||||
|-- Starter
|
||||
|-- SampleFooter.vue
|
||||
|-- SampleLayout.vue
|
||||
|-- SampleNavbar.vue
|
||||
|-- SamplePage.vue
|
||||
|-- Tables
|
||||
|-- RegularTables
|
||||
|-- projects.js
|
||||
|-- users.js
|
||||
|-- App.vue
|
||||
|-- main.js
|
||||
|-- polyfills.js
|
||||
{
|
||||
"state": "error",
|
||||
"msg": "<kurze Fehlerbeschreibung>",
|
||||
"details": "<optional zusätzliche Informationen zum Fehler, z.B. Framework Fehlermeldung>"
|
||||
}
|
||||
```
|
||||
|
||||
# csfr Token
|
||||
Bindet das js ein.
|
||||
Stellt folgende js-Variablen zur Verfügung:
|
||||
|
||||
csfr : string
|
||||
csfr Token (https://book.cakephp.org/3/en/controllers/components/csrf.html)
|
||||
user: object
|
||||
|
||||
# Testbenutzer
|
||||
Enthält Daten des aktuell eingeloggten Benutzers, z.B.: mein Testbenutzer:
|
||||
console.log(user);
|
||||
```
|
||||
{
|
||||
"created": 1578688666,
|
||||
"disabled": false,
|
||||
"email": "dervommond@gmail.com",
|
||||
"email_checked": true,
|
||||
"first_name": "Max",
|
||||
"group_alias": "gdd1",
|
||||
"ident_hash": 2928827813,
|
||||
"last_name": "Miau",
|
||||
"public_hex": "2ed28a1cf5e116d83615406bc577152221c2f774a5656f66a0e7540f7576d71b",
|
||||
"role": "admin",
|
||||
"username": "",
|
||||
"balance": 174500, // Gradido Cent, 4 Nachkommastellen (2 Reserve) entspricht 17,45
|
||||
"id": 1,
|
||||
"errorCount": 0
|
||||
}
|
||||
```
|
||||
Das sind im Grunde die Benutzerangaben aus der Login-Server Datenbank.
|
||||
|
||||
session :int
|
||||
Login-Server session id, notwendig für alle ajax-request.
|
||||
|
||||
## Browser Support
|
||||
# Seiten
|
||||
Navigation:
|
||||
Für alle Benutzer:
|
||||
|
||||
At present, we officially aim to support the last two versions of the following browsers:
|
||||
Kontoübersicht
|
||||
Startseite
|
||||
Überweisung
|
||||
Mitgliederbereich (externer Link zu elopage: https://elopage.com/s/gradido/sign_in)
|
||||
Rechts oben:
|
||||
Profil
|
||||
Abmelden
|
||||
Startseite:
|
||||
Für alle Benutzer:
|
||||
Kontoübersicht
|
||||
Überweisung
|
||||
Benutzer Suche:
|
||||
http://daten.einhornimmond.de/gradido_mithril_user_search.zip
|
||||
|
||||
<img src="https://github.com/creativetimofficial/public-assets/blob/master/logos/chrome-logo.png?raw=true" width="64" height="64"> <img src="https://raw.githubusercontent.com/creativetimofficial/public-assets/master/logos/firefox-logo.png" width="64" height="64"> <img src="https://raw.githubusercontent.com/creativetimofficial/public-assets/master/logos/edge-logo.png" width="64" height="64"> <img src="https://raw.githubusercontent.com/creativetimofficial/public-assets/master/logos/safari-logo.png" width="64" height="64"> <img src="https://raw.githubusercontent.com/creativetimofficial/public-assets/master/logos/opera-logo.png" width="64" height="64">
|
||||
# Mobile App
|
||||
Login über eingebundene Login-Seite
|
||||
auslesen der session_id aus dem Session Cookie: GRADIDO_LOGIN
|
||||
Access Token vom Login-Server anfragen:
|
||||
GET https://staging.gradido.net/appRequest/acquireAccessToken?session_id = <GRADIDO_LOGIN>
|
||||
Du kannst auch den Cookie wieder mitschicken, solange die Login-Server Basis-url die gleiche ist, müsste das auch funktionieren.
|
||||
Antwort:
|
||||
```
|
||||
{
|
||||
"state":"success",
|
||||
"access_token" : "<integer>",
|
||||
"group_base_url":"<Community Server Base Url>"
|
||||
}
|
||||
```
|
||||
Unterschied Access Token von der session_id: Access Tokens sind länger gültig
|
||||
Du kannst über eine gültige session_id einen Access Token erhalten der eine Woche gültig ist. Die Client-IP des Aufrufess muss die gleiche sein, mit der eingeloggt wurde.
|
||||
|
||||
Mit einem gültigen Access-Token kannst du eine session_id erhalten.
|
||||
GET https://staging.gradido.net/appRequest/appLogin?access_token =
|
||||
Mit jedem Aufruf wird die Gültigkeit der Access-Tokens erneuert.
|
||||
Antwort:
|
||||
```
|
||||
{
|
||||
"state":"success",
|
||||
"session_id" : "<integer>"
|
||||
}
|
||||
```
|
||||
# Kontoübersicht:
|
||||
Liefert den aktuellen Kontostand.
|
||||
Ajax:
|
||||
GET https://staging.gradido.net/state-balances/ajaxGetBalance
|
||||
Antwort:
|
||||
`{"state":"success","balance":<GDD cent (4 Nachkommastellen)>}`
|
||||
|
||||
Listet die letzten Transaktionen auf, mit Paging.
|
||||
Ajax:
|
||||
GET https://staging.gradido.net/state-user-transactions/ajaxListTransactions//
|
||||
page: Seite der Transaktionen, default = 1
|
||||
count: Wie viele Transaktionen pro Seite, default = 20
|
||||
|
||||
## Resources
|
||||
|
||||
## Reporting Issues
|
||||
Antwort:
|
||||
Wenn alles okay:
|
||||
```
|
||||
{"state":"success", "transactions":
|
||||
[
|
||||
{
|
||||
"name": "<first_name last_name>",
|
||||
"email": "<other_user.email>", //optional, only if send or receive and other user is known
|
||||
"type": "creation|send|receive",
|
||||
"transaction_id": <transaction_id>, // db id not id from blockchain
|
||||
"date": "<date string>",
|
||||
"balance": <GDD balance in GDD cent /10000>,
|
||||
"memo": "<Verwendungszweck>",
|
||||
"pubkey": "<other_user.public_key in hex>"
|
||||
|
||||
}
|
||||
],
|
||||
"transactionExecutingCount": <how many transaction for this user currently pending>,
|
||||
"count": <sum of finished transactions user is involved>
|
||||
}
|
||||
```
|
||||
Holt die aktuelle Summe und Anzahl Einträge vom GDT Server für den Benutzer.
|
||||
Ajax:
|
||||
GET https://staging.gradido.net/state-balances/ajaxGdtOverview
|
||||
```{"state": "success", "gdt": {"sum": <sum of all gdt transactions>, "count":<count of all gdt transactions>}}```
|
||||
|
||||
|
||||
|
||||
Holt die letzten 100 GDT-Einträge für den Benutzer
|
||||
|
||||
## Licensing
|
||||
Ein GDT Eintrag sieht so aus:
|
||||
```
|
||||
{
|
||||
"id": 8857,
|
||||
"amount": 1000, // = 10,00 Euro
|
||||
"date": "2020-06-17T14:12:00+00:00",
|
||||
"email": "foerderkreis-1@gradido.org",
|
||||
"comment": null,
|
||||
"coupon_code": "",
|
||||
"gdt_entry_type_id": 4,
|
||||
"factor": "20.0000",
|
||||
"amount2": 0,
|
||||
"factor2": "0.0500",
|
||||
"gdt": 1000
|
||||
}
|
||||
```
|
||||
gdt entry types: (Auf welchen Weg der Eintrag eingetragen wurde)
|
||||
1. Form: einzeln über das Formular, sollte nur wenige Einträg e betreffen
|
||||
2. CVS: CVS Import, betrifft vor allem ältere Einträge von Spenden die weder über Elopage noch über Digistore reinkamen
|
||||
3. Elopage: Alle GDT Einträge die automatisch durch eine Elopage-Transaktion erstellt wurden für den Einzahlenden.
|
||||
4. Elopage-Publisher: Alle GDT Einträge die automatisch durch eine Elopage-Transaktion erstellt wurden für den Publisher, bis zu 5 Level nach oben.
|
||||
5. Digistore: Alle GDT Einträge die automatisch durch eine Digistore-Transaktion angelegt wurden.
|
||||
6. Cvs2: GDT Einträge die durch ein anderen CVS Import eingetragen wurden, betrifft ebenfalls nur alte Einträge.
|
||||
amount: Menge in Euro-cent (2 Nachkommastellen) was eingezahlt wurde
|
||||
factor: Der Umrechnungsfaktor der beim Einzahlen für den betreffenden Unterstützer galt.
|
||||
amount2: ein Bonus Factor der drauf gerechnet wird bei Sonderaktionen, default 0
|
||||
factor2: ein Bonus-Factor, default 1, wird aktuell im Code auf für Publisher-Transactionen benutzt.
|
||||
Gdt: resultierender GDT Wert, wird folgendermaßen aus den bisherigen Werten berechnet:
|
||||
gdt = amount * factor * factor2 + amount2
|
||||
Es gibt zwei Arten von GDT Einträgen:
|
||||
|
||||
- Copyright 2020 Creative Tim (https://www.creative-tim.com/?ref=bvad-github-readme)
|
||||
Was der Benutzer selbst in Euro gespendet hat
|
||||
Was jemand anderes an Euro gespendet hat, der den Benutzer als Publisher gewählt hat (publisher-id bei Elopage), Publisher bis Level 5 erhalten jeweils 5% an GDT was der Spender erhalten hat.
|
||||
z.B. Anna spendet 100 Euro bei einem Faktor von 20, bekommt also 2000 GDT.
|
||||
Sie hat als Publisher Bernd angegeben, Bern erhält 100 GDT.
|
||||
Bernd hat als Publisher damals Paul angegeben, Paul erhält also ebenfalls noch 100 GDT.
|
||||
Bis zum 5. (Bernd ist 2.)
|
||||
Diese Beziehung wird durch die connectEntries dargestellt.
|
||||
Insbesondere durch den publishersPath, connect enthält einfach nur alle mögliche Daten.
|
||||
|
||||
- Licensed under MIT (https://github.com/creativetimofficial/vue-argon-dashboard/blob/master/LICENSE.md)
|
||||
# TODO
|
||||
TODO: Update GDT-Server um paging und Zugriff auf alle Einträge zu erhalten, optimierter Zugriff
|
||||
GET https://staging.gradido.net/state-balances/ajaxGdtTransactions
|
||||
Liefert wenn alles in Ordnung ist:
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user