Contributor Tour #1
Date Submitted
Dec 20, 2021
Issues/blockers
Still preparing the framework for official proposal
Progress made
Created a draft v0.1 of the Content Platform Architecture to aggregate all the content the DAO produces.
Next Steps
Decompose the architecture components and scope the v1.0 implementation for Season 2.
Notetaker: @frankTurtle.crypto
# CG Notes 12/20
### Speakers
@addamsson
@0xNSHuman
## Dev environment
uses Node / TS
why? -> Very popular!
Heroku component - Node program
REST endpoint
MongoDB storage -> Migrated from Postgres
## Architecture diagram
2 modules
1. endpoint to query whats in the system - API
2. consumes data and sends to storage instance - Loader
## DB:
Validator with schemas
GraphQL API
everyone can use to access data
## Loader:
Another project
what?
scheduler access upstream system API -> loads -> sends to content Gateway
has SDK which does the sending
no need to REST api call by hand
2 use cases
1. use the SDK on your local machine
sdk on NPM
@banklessdao/content-gat
Push based API
2. pull mechanics
has a loader to pull th data and convert it and send to same SDK
uses scheduler
**Highly encouraged to use VSCode - has a guide for setup**
## Project:
nx: tool for monorepo
as many packages as you want within the monorepo
manages it
crutch: scripts folder - 95% of the things you want to do in the project
ex: startup local docker env
using Prisma for postgres
migration scripts to run first
sometimes there will be timeout errors
it will try to run the same job again
grows exponentially
** DON"T SEND JUNK DATA TO THE PROD DB!! Next season will add validation **
## Code Structure:
own decorators
highly modular
share code within project ( FE / BE ) with nx
libs folder
intended to be shared
domain - domain logic
banklessdao - published on NPM
apps - can be deployed
technically a FE - but ignore it
domain - logic
API
loader
utils
loader - interfaces / types
context - passed as params
3 steps:
1. register
2. loading
3. saving
every loader has to have a root type
scheduler - toad? scheduler
no workers - K.I.S.S.
very modular
register loaders and it runs them for you
graphql - converting schema to graphql type
graphiql deployment available
gateway
remove/register schema
receive/receiveBatch records
SDK
ContentGatewayClient
register schema and save/savebatch data
accepts OutboundDataAdapter - accepts HTTP
no API keys yet - season 3 implementation
Node app for both loader and
no frameworks - minimize third party risks
API
app to creat REST endpoints
** Using FPTS (article coming soon) / IOTS(runtime typesystem) **