Closed antaranyan closed 1 year ago
As our CLI-related functionality will take place mostly in src/
, we can keep an single executable script for NPM in the root.
{
"name": "machina",
"bin": "./cli.js"
}
NOTE: This may be not enough organization when more functionality appears utilizing various API and adapters.
Better* layout can be:
twitter-api
- high-level functions and their dependencies
ports
- defined interfaces for necessary adapterstwitter-model
- types, domain logic, etc.twitter-browser-adapter-playwright
- port implementation using Playwright.instagram-api
, instagram-model
, ...twitter-browser-adapter-puppeteer
twitter-browser-adapter-playwright
is the longest I'd like to deal with
Proposing top-level layout for
src/
like:src/
- root for source codecli/
- command-line interface, usingapi/
api/
- main functionalityports/
- defined interfaces for necessary adaptersapi-adapter-playwright
- implementation for the definedports/
using Playwrightcommon/
- shared utilities and typesNOTE: This may be not enough organization when more functionality appears utilizing various API and adapters.