Skip to content

👨‍💻 Manage your Nx Workspaces like a boss

License

Notifications You must be signed in to change notification settings

curkovicf/nx-cli

Repository files navigation

Nx Cli

Angular Electron.js

Desktop app built to improve developer's productivity while working with Nx Workspaces


plot


Manage your Nx projects like a boss. Don't spend too much time on the CLI, and focus on implemenation with the Nx-cli. App is intended to work on Linux, Mac and Windows.


👨‍💻 Who is it for

While working at my current job with Nx monorepos I have noticed that I spend a lot of time in CLI manually typing various commands to generate stuff and to manouver around the nx monorepo. The core idea of this app is to minimize the time spent in the CLI, and automate the process of creating, deletion etc. of libs, projects and their artifacts.


🏢 Architecture & Patterns

  • SCAM -> Single component angular modules for better tree shaking
  • UI components -> Everthing that is under UI folder should recieve the data only via @Input(), and emit it via @Output(). These components can only inject services regarding the view, E.g. MaterialDialog service
  • Feature components -> Can be routed to, can access data from any source
  • Shell -> Entry point for some domain. Shell should always have feature in which we store routes, and layout which should be the layout for the current domain. Layout can access any data and should be in layout folder under shell lib.
  • ViewModel -> Ngrx Store is used as a global store while ngrx/@component-store is used as a viewmodel. Viewmodel should grab the data from the global store (or some other source) and prepare it for the view injection via async pipe, also, majority of the business logic is located in the viewmodels which helps to keep our components clean and extremely easy to test and maintain.

🚨 Some of the patterns are not 100% enforced because I am still exploring and trying stuff out


🚧 Feature Status

Implemented Feature / Use case Description
User can add workspace Once user starts the app he will be able to add new Nx Workspace via absolute path. Path is properly validated.
User can see all libs & apps Once use has added workspace he can preview his installed apps & libs
User can select app or lib On the left side of the app, user can see list of apps & libs which are selectable
User can see detail view of a lib or app Once lib or app is selected, user can see details (List of angular components, modules) etc.
User can generate a component In detail view, there is an option which enables user to create new component with a couple of flags (--flat, --buildable, --publishable)
User can generate a service In detail view, there is option to create new Angular service with couple of flags
User can delete apps & libs In detail view, user has an option to delete selected app or project
User can move libs & apps In detail view, user is able to move libs and apps to different dirs
User can rename libs & apps In detail view, user is able to rename libs and apps
User can see all tags of selectd libs & apps Once the user selects app or lib, he will be able to see all the tags from nx.json
User can create new lib If workspace is added, user will be able to create new lib
User can create new app If workspace is added, user will be able to create new app
User can remove workspace from app Workspaces can only be added ATM
Add additional flags for lib generation ATM it is not possible to add flags for a lib generation (Only via single input)
Add additional flags for app generation ATM it is not possible to add flags for a app generation (Only via single input)
User can see outputs of commands Add console to the app so user can see and interact with the console logs
User can see if Nx is not installed on his machine Add notification if user doesn't have Nx installed on his machine
User can see lib or app tree Once app or lib is selected, user can see folder tree in the detail view
User can start dep graph User can run nx dep graph from the app
User can add/delete tags Ability to add tags for a selected app or lib
User can use React & Angular Nx generators Ability to create all supported artifacts

📜 References