As a circuit designer,
I want to add a element to the circuit,
So that I can include resistance as part of the design.
- The element has a unique identifier.
- The element is displayed on the canvas at a specified position.
- Element properties are editable in the view to update resistance, capacitance, etc.
- The Element has default properties that can be edited.
- The resistor must be added to the
Circuit
aggregate logic. - Elements can be added to the circuit via the GUI.
- An Element is an abstract class that can be extended by adding new component types.
- The element is visible on the canvas.
- The element's data is stored in the domain model.
- Create a class
Element
with propertiesid
,type
,position
, andproperties
. - Create a class
Resistor
that extendsElement
with a propertyresistance
. - Create a class
Capacitor
that extendsElement
with a propertycapacitance
. - Create e class
Junction
that extendsElement
with a propertytype
.
As a circuit designer,
I want to connect two elements in the circuit,
So that I can define relationships between components.
- A connection is established between two valid elements.
- A line with terminal dots is drawn between the connected elements.
- The connection is recorded in the domain model as a relationship.
- A line with dots is visible between two connected elements on the canvas.
- The connection is stored in the domain model.
- The system validates the connection logic (e.g., elements must exist).
As a circuit designer,
I want to export the circuit to a netlist file,
So that I can save my design for later use.
- The circuit can be exported to a netlist file.
- The exported file includes all elements and connections, as well as relative positions.
- The export functionality is triggered via the GUI.
- A netlist file is downloaded when the export button is clicked.
- The file contains all elements and connections from the domain model.
As a circuit designer, I want to import a circuit from a Netlist file, So that I can load an existing design.
As a circuit designer, I want to import multiple circuits from multiple Netlist files, So that I can load and reuse multiple existing designs.
- When circuits are loaded they should not overlap on the canvas instead they should be distanced from each other.
As a circuit designer, I want to abstract circuits as components, So that I can reuse circuits in other designs.
- A circuit can be abstracted as a component.
- Circuits could be programmaticallly added to create connections even without a GUI.
This feature could influence the decision of adding Resistance, Capacitance, etc as value objects for example.
As a circuit designer,
I want to edit the properties of an element,
So that I can customize the circuit components.
- The element properties can be edited through a properties panel.
- Changes to properties are reflected in the domain model.
- The canvas updates to reflect changes in properties (e.g., resistance value).
- The properties panel is visible and functional.
- Changes to properties are stored in the domain model.
- The canvas updates to reflect changes in properties.
- Create a
PropertiesPanel
component insrc/gui/PropertiesPanel.js
to display and edit element properties. - Implement the
updateElementProperties
method insrc/application/CircuitAppService.js
to handle property updates. - Update the
CanvasAdapter
insrc/infrastructure/adapters/CanvasAdapter.js
to reflect changes on the canvas. - Update the GUI in
src/gui/index.html
to include the properties panel.
As a circuit designer,
I want to delete an element from the circuit,
So that I can remove unwanted components.
- The element can be selected and deleted from the canvas.
- The element is removed from the domain model.
- The canvas updates to reflect the removal of the element.
- The element is no longer visible on the canvas.
- The element's data is removed from the domain model.
- Implement the
deleteElement
method insrc/application/CircuitAppService.js
to handle element deletion. - Update the
CanvasAdapter
insrc/infrastructure/adapters/CanvasAdapter.js
to handle element removal from the canvas. - Update the GUI in
src/gui/index.html
to allow selecting and deleting elements.
As a circuit designer,
I want to zoom and pan the canvas,
So that I can navigate and view different parts of the circuit.
- The canvas can be zoomed in and out.
- The canvas can be panned in all directions.
- The zoom and pan functionality is smooth and responsive.
- The canvas supports zooming and panning.
- The zoom and pan functionality is smooth and responsive.
- Implement zoom functionality in
src/infrastructure/adapters/CanvasAdapter.js
. - Implement pan functionality in
src/infrastructure/adapters/CanvasAdapter.js
. - Update the GUI in
src/gui/index.html
to include zoom and pan controls.
As a circuit designer,
I want to save the circuit design,
So that I can preserve my work for future use.
- The circuit design can be saved to a file.
- The save functionality is accessible via the GUI.
- The saved file includes all elements and connections.
- The save functionality is implemented and accessible.
- The saved file contains all circuit data.
- Implement the
saveCircuit
method insrc/application/CircuitAppService.js
to handle saving circuit designs. - Update the
CircuitRepository
insrc/infrastructure/repositories/CircuitRepository.js
to handle saving data to a file. - Update the GUI in
src/gui/index.html
to include a save button.
As a circuit designer,
I want to load a saved circuit design,
So that I can continue working on a previous design.
- The circuit design can be loaded from a file.
- The load functionality is accessible via the GUI.
- The loaded design includes all elements and connections.
- The load functionality is implemented and accessible.
- The loaded data is correctly displayed on the canvas.
- Implement the
loadCircuit
method insrc/application/CircuitAppService.js
to handle loading circuit designs. - Update the
CircuitRepository
insrc/infrastructure/repositories/CircuitRepository.js
to handle loading data from a file. - Update the GUI in
src/gui/index.html
to include a load button.
As a circuit designer,
I want to undo and redo actions,
So that I can easily correct mistakes and revert changes.
- The undo functionality reverts the last action.
- The redo functionality re-applies the last undone action.
- The undo and redo functionality is accessible via the GUI.
- The undo and redo functionality is implemented and accessible.
- The canvas and domain model correctly reflect the undo and redo actions.
- Implement the
undo
andredo
methods insrc/application/CircuitAppService.js
to handle undoing and redoing actions. - Update the
CanvasAdapter
insrc/infrastructure/adapters/CanvasAdapter.js
to reflect undo and redo actions on the canvas. - Update the GUI in
src/gui/index.html
to include undo and redo buttons.
As a circuit designer,
I want to simulate the behavior of the circuit,
So that I can analyze its performance.
- The simulation can be started and stopped via the GUI.
- The simulation results are displayed on the canvas.
- The simulation takes into account all elements and connections.
- The simulation functionality is implemented and accessible.
- The simulation results are correctly displayed on the canvas.
- Implement the
simulateCircuit
method insrc/application/CircuitAppService.js
to handle circuit simulation. - Update the
CanvasAdapter
insrc/infrastructure/adapters/CanvasAdapter.js
to display simulation results on the canvas. - Update the GUI in
src/gui/index.html
to include simulation controls.
As a circuit designer,
I want to display information about the circuit,
So that I can view details about the components and connections.
- The circuit information is displayed in an information panel.
- The information includes details about all elements and connections.
- The information panel is accessible via the GUI.
- The information panel is implemented and accessible.
- The information panel displays correct and up-to-date circuit information.
- Create an
InformationPanel
component insrc/gui/InformationPanel.js
to display circuit information. - Implement the
getCircuitInformation
method insrc/application/CircuitAppService.js
to retrieve circuit information. - Update the GUI in
src/gui/index.html
to include the information panel.
These additional user stories should cover more functionalities and interactions within the GUI module of the QuCAT package.