Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the operational npm packages #30

Open
22 tasks
VGau opened this issue Sep 12, 2024 · 0 comments
Open
22 tasks

Refactor the operational npm packages #30

VGau opened this issue Sep 12, 2024 · 0 comments
Assignees

Comments

@VGau
Copy link
Collaborator

VGau commented Sep 12, 2024

Description

Refactor the operations folder to improve its structure, organization, and maintainability. This involves organizing code by feature, separating configuration and scripts, cleaning up ignored files, and modularizing the code.

Motivation

The current structure of the operations folder is not optimal for maintainability. By refactoring the folder, we can make the codebase more navigable, easier to manage, and more maintainable in the long run.

Tasks

  • Organize code by feature, grouping related files together.
  • Use consistent naming conventions for files and directories.
  • Separate configuration files from source code.
  • Clean up .gitignore, .dockerignore, and other ignore files.
  • Modularize large files into smaller, more manageable modules.
  • Update package.json scripts to reflect the new paths.
  • Update tsconfig.json and tsconfig.build.json to include the new paths.
  • Ensure Dockerfiles are updated to reflect the new structure.

Here is an example of structure that can be used:

operations/
├── src/
│   ├── common/                # Common utilities and helpers
│   │   ├── __tests__/         # Unit tests for common utilities
│   │   ├── utils/             # Utility functions
│   │   │   ├── config.ts      # Configuration-related utilities
│   │   │   └── helpers.ts     # General helper functions
│   ├── synctx/                # Synchronization tasks
│   │   ├── bin/               # Executable scripts
│   │   │   ├── dev.js        
│   │   │   ├── dev.cmd       
│   │   │   └── run.js       
│   │   ├── src/               
│   │   │   ├── index.ts       # Main entry point for synctx
│   │   │   └── utils.ts       # Utility functions for synctx
│   ├── ethTransfer/           # Ethereum transfer tasks
│   │   ├── index.ts           # Main entry point for ethTransfer
│   │   └── utils.ts           # Utility functions for ethTransfer
│   ├── Dockerfile             
│   ├── Dockerfile.alpine      
│   ├── package.json          
│   ├── tsconfig.json        
│   ├── tsconfig.build.json   
│   ├── .eslintignore          
│   ├── .prettierignore     
│   ├── .prettierrc.js         

Acceptance criteria

  • Code is organized by feature, with related files grouped together.
  • Consistent naming conventions are used throughout the operations folder.
  • Configuration files are separated from source code.
  • Ignore files are properly configured and cleaned up.
  • Large files are broken down into smaller, more manageable modules.
  • package.json scripts are updated and functional.
  • TypeScript configuration files (tsconfig.json and tsconfig.build.json) are updated and functional.
  • Dockerfiles are updated and functional.

Risks

  • Potential for breaking changes if paths are not updated correctly.
  • Risk of missing dependencies or configurations during the refactor.
  • Ensure all scripts and configurations are thoroughly tested after refactoring.

Remember to

  • Add the documentation label in case there is an impact on the documentation.
  • Add priority and team labels.
  • Add Task for updating the Runbook or adding/updating existing metrics and alerts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants