Code Monkey home page Code Monkey logo

concha's Introduction

Folder structure

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

concha's People

Contributors

n0vit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.