NOTE: Some files was removed for reduce tree view.
Folder structure has some description for explain relations between folders
├── Dockerfile ├── README.md ├── config │ ├── app.json │ ├── flyway.dev.conf │ └── flyway.prod.conf ├── docker-compose.worker.yml ├── docker-compose.yml ├──migrations - Databse migrations │ ├── V1__initial.sql │ └── V2__missed_epochs.sql ├── package.json ├── pnpm-lock.yaml ├── process.docker.json ├── process.worker.docker.json ├── src | ├── app.ts - Main file │ ├── assets │ ├── constants.ts - May will separated to logic foldet in future | | │ ├── custom.d.ts | | Logic contains main logic for REST API method and Workers.
Can used everywhere. Can contain cohesion logic between shared and specific services | | | ├── logic │ │ └── ethereum │ │ ├── index.ts │ │ ├── scanner │ │ │ ├── filter-validators.ts │ │ │ ├── get-rewards-per-epoh-all-validators.ts │ │ │ ├── get-rewards-per-epoh-selected-validators.ts │ │ │ └── index.ts │ │ ├── tables │ │ │ ├── index.ts │ │ │ ├── rewards-details.ts │ │ │ ├── rewards-summary.ts │ │ │ └── withdrawals.ts │ │ └── utils │ │ └── index.ts | | Api model as bridge iterface between codebase and DB,
can implement own crud logic | | │ ├── models │ │ ├── attestation-rewards.ts │ │ ├── proposer-rewards.ts │ │ └── sync-committee-rewards.ts | Static Server folder │ ├── public │ │ └── docs │ │ └── ethereum | | Folder with services, that's should use in other components | | │ ├── services | | Private - contains specifics services, it primitives functions, that has base logic,
private services can have hight cohesion and can use shared services │ │ ├── private │ │ │ └── ethrereum │ │ │ ├── api - SWAGER BEACOUN NODE API │ │ │ ├── eth-cache.ts │ │ │ ├── eth-client.ts │ │ │ ├── eth-db.ts │ │ │ ├── index.ts | Shared - contains shared services, it can use everywhere,
should contains only primitive logic │ │ └── shared │ │ ├── database │ │ │ ├── clients.ts │ │ │ ├── database.ts │ │ │ └── index.ts │ │ ├── env │ │ │ ├── index.ts │ │ │ ├── is-development.ts │ │ ├── orm │ │ │ └── index.ts │ │ ├── redis │ │ │ ├── client.ts │ │ │ └── simple-cache.ts │ │ └── worker │ │ ├── constants.ts │ │ ├── index.ts │ │ ├── types.ts │ │ └── worker.ts | Types - contains special types,
that can be used in many places | │ ├── types │ │ ├── ethereum.ts │ │ └── index.ts | Utils - small helpers functions | │ ├── utils │ │ ├── errors.ts │ │ ├── index.ts │ │ └── logger.ts | Workers - contains scripts for execution in separated shells,
all of them should be running via pm2 | │ └── workers │ └── ethereum │ ├── rewards-scanner │ │ └── missed-epoch.ts │ └── withdrawals.ts └── tsconfig.json