Talk:PKC documentation
Draft Plan (proof of concept
To prove a multiple environment engine, secured by DAO essence, conducting a new developed society through “Science of Governance”
#1API integrations
- restAPI
- integrate several open source or with open APIs to PKC
- TOP - metrics on performance and CpL
- Fossil - Use Fossil's SQlite relational engine, and Version control semantics to manage data assets and drive the commit workflow of Git
- GitHub - Ability to deploy through PKC,
- GIT - create CICD environments to Github, from Editors
- VSC - Ability to program and deploy through
- Matomo - metrics on history records
- other apps and services
- quantUX
- WEb3D
- integrate several open source or with open APIs to PKC
- QuantUX widget experiment (Guntur)
- Apollo Spreadsheets (Pedro’s team 1 developer?)
DID
- #4 E-ID - Auth, smart contract, Blockchain
- Keycloak (done)
- simulated packages (Working with Donald Gao)
- #5 E-Land -
- #6 E - Catalogue - (future clients such as LKPP)
Only visual simulated packages
#13 Content
- Build a new frontEnd design (UI/UX) “new skin”
- Create interesting content to introduce new members to the PKC multiple programs
- Create presentation of everything we want to build with PKC
- Expand online self accountable and self pace education
- Measure capacity of students and work force (CpL)
- Create a promo video explaining the benefits to the world and the future of PKC
Internal
Essential for us, not to the proof of concept
#8 Security
- Finish the CICD - project was very open and Haviz had no control
#9 Testings #10 Deployments - Everyweek after CICD is set up in 2 stages
- From Dev to QA (Approved my Pedro and Haviz)
- From QA to Production (approved after Pedro stress testing and final approved by Ben)
#11 Documentation - Create a proper documentation
- Create flows of all component relations
- Create design portfolio of all components
- Create a DDT protocol
- Create technology documentation and implementation (including Open API doc)
#12 Core Development - stable the app
#14 Operations - Correct daily issues
RestAPI testing
- User
+ Base Url: https://app.trackonperformance.com/api/user/ + Swagger Url: https://app.trackonperformance.com/swagger/#/User
- Description
User's are the primary resource that holds every other resource and they have the following properties:
+ _id | the unique identifier for this entity + name | string | max_length 50 + email | string | max_length 255 + password | string | min_length 3 | max_length 50 + contact | string | max_length 30 + avatarUrl | string + location | string | default: England + language | string | default: auto | Auto by default which allows frontend application to choose from the URL + mainSkills | string | default: + personalInterests | string | default: + lastLogin | Date | ($date-time) + lastWorking | Date | ($date-time) + lastAccount | string + signature | string | default: + birthdate | string or null + clockPaused | boolean | default: false + coffeePauses | + + pauseAt | Date | ($date-time) + + resumedAt | Date | ($date-time) + clockAbsences | + + leftAt | Date | ($date-time) + + returnedAt | Date | ($date-time) + clockBurnedHours | + + credits | number | + + createdAt | Date | ($date-time) + howToBegin | UserHowToBegin + + firstTimeCharter | boolean | default:false + + firstTimeProject | boolean | default:false + + firstTimeOBS | boolean | default:false + isTopAdmin | boolean | default:false + timezone | string | default: Europe/Lisbon + hubspotTokens | + + accessToken | string + + refreshToken | string
user How to begin has a special condition, for the new coming users, on a process of entering:
+ firstTimeCharter | boolean | default: false + firstTimeProject | boolean | default: false + firstTimeOBS | boolean | default: false
- Returns user Notifications
Returns user Notifications
Request example: ```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/notifications`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user was notified") } } )()
```
- Returns user archive
Returns user archive
Request example: ```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/archive`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the archive") } } )()
```
- Returns user projects
Returns the user portfolio and projects
Request example: ```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/projects`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the portfolio or projects") const { data } = response console.log({ "current": { "_id": data._id, "name": data.name, "portfolios": { "_id": data._id, "name": data.name, "projects": { "_id": data._id, "name": data.name, } "programs": { "_id": data._id, "name": data.name, "projects":{ "_id": data._id, "name": data.name, } } } }) } } )()
```
- Returns user charters
Returns the list of charters the user can see (members or team leaders dont have access)
Request example:
```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/charters`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the charters") const { data } = response console.log({ "_id": data._id, "name": data.name, } } } )()
```
- Returns user orgs
Returns the organizations the authenticated user has access to
Request example: ```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/orgs`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the orgs") const { data } = response console.log({ "_id": data._id, "name": data.name, "description": data.description, "creator": data.creator, "jobDescription": data.jobDescription, "admins": data.admins, } } } )()
```
- Returns user logins
Returns the login history
Request example:
```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/logins`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the logins") const { data } = response console.log({ "_id": data._id, "loggedAt": data.loggedAt, "userId": data.userId, "platform": data.platform, "browser": data.browser, "location": data.location, "ip": data.ip, } } } )()
```
- Returns user authenticated
Returns the authenticated user information
Request example: ```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user`, method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the auth") const { data } = response console.log({ "_id": data._id, "role": data.role, "payroll": data.payroll, "workType": data.workType, "clockPaused": data.clockPaused, "jobDescription": data.jobDescription, "user":{ "_id": data._id, "name": data.name, "email": data.email, "contact": data.contact, "avatarUrl": data.avatarUrl, "location": data.location, "language": data.language, "mainSkills": data.mainSkills, "personalInterests": data.personalInterests, "signature": data.signature, "birthdate": data.birthdate, "howToBegin": { "firstTimeCharter": data.firstTimeCharter, "firstTimeProject": data.firstTimeProject, "firstTimeOBS": data.firstTimeOBS, } "isTopAdmin": data.isTopAdmin, } "account": { "_id": data._id, "name": data.name, "creator": data.creator, "creatorMetadata": { "phone": data.phone, "licenseCost": data.licenseCost, "licenses": data.licenses, } "metadata": data.metadata, "description": data.description, "status": data.status, "payrollFrequency": data.payrollFrequency, "admins": data.admins, "schedule": { "dailyStartTime": data.dailyStartTime, "dailyEndTime": data.dailyEndTime, "businessDays": { "monday": data.monday, "tuesday": data.tuesday, "wednesday": data.wednesday, "thursday": data.thursday, "friday": data.friday, "saturday": data.saturday, "sunday": data.sunday, } "breaks": data.breaks, } "autoPlayEnabled": data.autoPlayEnabled, "realTimeEditableBy": data.realTimeEditableBy, "defaultProjectPreferences": data.defaultProjectPreferences, "createdAt": data.createdAt, } "permissions": data.permissions, } } } )()
```
- Update user
Update User information
```typescript
import axios from 'axios' import moment from 'moment'
( async function () { const response = await axios({ url: 'https://app.trackonperformance.com/api/user', method: 'PATCH', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' }, data: { userId: 1234, //your user id property: 'birthdate', value: moment().format('YYYY-MM-DD') } })
if (response.status === 200) { const { data } = response console.log("Returned the new updated data") console.log({ "id": data.id, "name": data.name, "email": data.email, "password": data.password, "contact": data.contact, "avatarUrl": data.contact, "location": data.registerDate, "language": data.birthdate, "mainSkills": data.avatar, "location": data.location, "language": data.language, "mainSkills": data.mainSkills "personalInterests": data.personalInterests "lastLogin": data.lastLogin, "lastWorking": data.lastWorking, "lastAccount": data.lastAccount, "signature": data.signature, "birthdate": data.birthdate, "clockPaused": data.clockPaused, "coffeePauses": data.coffeePauses, "clockAbsences": data.clockAbsences, "clockBurnedHours": data.clockBurnedHours, "howToBegin": { "firstTimeCharter": data.firstTimeCharter, "firstTimeProject": data.firstTimeProject, "firstTimeOBS": data.firstTimeOBS, } }) } } )()
```
- Change user avatar
Change the authenticated user avatar image
Request example:
```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/avatar`, method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the auth") const { data } = response console.log({ "url": data.url, } } } )()
```
- Clear user avatar
Clears the current user avatar image
Request example:
```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/avatarClear`, method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 200) { console.log("user got the auth") const { data } = response console.log({ "id": data.id, "orgMemberId": data.orgMemberId, } } } )()
```
- Change Auth Password
Changes the authenticated user password
Request example: ```typescript
import axios from 'axios'
( async function () { const accountId = 1234 const response = await axios({ url: `https://app.trackonperformance.com/api/user/password`, method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <your token>' } })
if (response.status === 201) { console.log("user got the auth") const { data } = response console.log({ "currentPassword": data.currentPassword, "newPassword": data.newPassword, } } } )()
```