How ramachandrapetla/fele-simulator works
Fele Simulator provides CLI and HTTP interfaces for managing simulated Fabric networks, channels, organizations, users, and chaincode invocations. The principal workflow accepts a CLI/API request, routes it to a management or invocation handler, then delegates network operations to scripts/services or chaincode arguments to invocation code. Local-organization administration and CA enrollment are distinct capabilities, with CouchDB supporting persisted simulator state. The graph follows documented features and shown call ownership; several service internals and integrations are unsampled, so those links are omitted rather than inferred.
Main entry points: command.js Interactive CLI · routes.js API route mount · channel.controller.js Channel and network API · server.js HTTP server
Components 29
User interfaces
- Interactive CLI
fele-client-api/src/cli/command.js - HTTP server
fele-client-api/src/server.js - API route mount
fele-client-api/src/routes/routes.js - Channel and network API
fele-client-api/src/controllers/channel.controller.js - Chaincode API
fele-client-api/src/controllers/chaincode.controller.js - CA user API
fele-client-api/src/controllers/ca.controller.js - User API
fele-client-api/src/controllers/user.controller.js
Fabric management
- Network commands
fele-client-api/src/cli/scripts/network.js - Channel commands
fele-client-api/src/cli/scripts/channel.js - Channel operations
fele-client-api/src/services/channel.js - Network operations
fele-client-api/src/services/network.js
Identity and organizations
- CA commands
fele-client-api/src/cli/scripts/ca.js - Fele organization commands
fele-client-api/src/cli/scripts/feleOrg.js - Local org commands
fele-client-api/src/cli/scripts/localOrg.js - CA enrollment
fele-client-api/src/services/ca.js - Organization operations
fele-client-api/src/services/organization.js - Local organization API
local-organization-api/src/controllers/localorganization.handler.js - Local org state
local-organization-api/src/services/LocalOrganization.js - Local org routes
local-organization-api/src/routes/localorganization.route.js
Chaincode runtime
- Chaincode commands
fele-client-api/src/cli/scripts/chaincode.js - Chaincode operations
fele-client-api/src/services/chaincode.js - Employee asset contract
fele-client-api/src/tmpworkspaceforuser/EmployeeAsset/lib/EmployeeAsset.js - Contract context
fele-client-api/src/services/smart-contract/Context.js
Persistence and support
- CouchDB
- CouchDB access
fele-client-api/src/utils/db.js - Channel validation
fele-client-api/src/validators/channelValidator.js - Logger
fele-client-api/src/utils/logger.js
Other components
- CLI user
- API client
Connections 24
- CLI user → Interactive CLI: runs commands
fele-client-api/src/cli/command.js - Interactive CLI → Network commands: dispatches network
fele-client-api/src/cli/command.js - Interactive CLI → Channel commands: dispatches channel
fele-client-api/src/cli/command.js - Interactive CLI → Chaincode commands: dispatches invocation
fele-client-api/src/cli/command.js - Interactive CLI → CA commands: dispatches CA
fele-client-api/src/cli/command.js - Interactive CLI → Fele organization commands: dispatches organization
fele-client-api/src/cli/command.js - Interactive CLI → Local org commands: dispatches local org
fele-client-api/src/cli/command.js - API client → HTTP server: sends requests
fele-client-api/src/server.js - HTTP server → API route mount: mounts routes
fele-client-api/src/server.js - API route mount → Channel and network API: routes requests
fele-client-api/src/routes/routes.js - API route mount → Chaincode API: routes requests
fele-client-api/src/routes/routes.js - API route mount → CA user API: routes requests
fele-client-api/src/routes/routes.js - API route mount → User API: routes requests
fele-client-api/src/routes/routes.js - Channel and network API → Network operations: creates network
- Channel and network API → Channel operations: creates channel
- Chaincode API → Chaincode operations: invokes chaincode
- Channel and network API → Channel validation: validates payload
fele-client-api/src/routes/channel.route.js - CA user API → CA enrollment: registers and enrolls
- Local org routes → Local organization API: routes requests
- Local organization API → Local org state: delegates operations
- CouchDB access → CouchDB: reads and writes
fele-client-api/src/utils/db.js - Interactive CLI → CouchDB access: loads local state
fele-client-api/src/cli/command.js - Interactive CLI → Logger: logs activity
fele-client-api/src/cli/command.js - Channel validation → Logger: logs validation
fele-client-api/src/validators/channelValidator.js