
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Key Features • Installation • Usage • Configs • Technology • Contributing
You can use Voltran if you need a micro frontend framework that provides following features:
Voltran requires Node.js v10.15.0+ to run.
Install the Voltran.
$ yarn add voltranjs
$ npm install voltranjs
This is an example component.
First of all, you should import @voltran/core
.
After that we can write the component's code.
HelloWorld.js
const voltran = require('@voltran/core');
import React from 'react';
const ROUTE_PATHS = {
HELLOWORLDPAGE: '/HelloWorld'
};
const HelloWorld = ({ initialState }) => {
return <>Hello World!</>;
};
const component = voltran.default.withBaseComponent(HelloWorld, ROUTE_PATHS.HELLOWORLDPAGE);
export default component;
If you want to fetch data from server side, you should add getInitialState
.
./conf/local.config.js
const port = 3578;
module.exports = {
port: port,
baseUrl: `http://localhost:${port}`,
mediaUrl: '',
services: {
voltranapi: {
clientUrl: 'http://voltran-api.qa.hepsiburada.com',
serverUrl: 'http://voltran-api.qa.hepsiburada.com'
}
},
timeouts: {
clientApiManager: 20 * 1000,
serverApiManager: 20 * 1000
}
};
HelloWorld.js
const voltran = require('@voltran/core');
import React from 'react';
import appConfig from '../appConfig';
const ROUTE_PATHS = {
HELLOWORLDPAGE: '/HelloWorld',
};
const HelloWorld = ({initialState}) => {
HelloWorld.services = [appConfig.services.voltranApi];
HelloWorld.getInitialState = (voltranApiClientManager, context) => {
const config = { headers: context.headers };
const params = {...};
return getName({ params }, voltranApiClientManager, config);
};
return (
<>
Hello World. My name is {initialState.name}!
</>
);
};
const component = voltran.default.withBaseComponent(HelloWorld, ROUTE_PATHS.HELLOWORLDPAGE);
export default component;
Output For Preview
Hello World. My Name is Volkan!
Output For Api
{
html: ...,
scripts: [...],
style: [...],
activeComponent: {
resultPath: "/HelloWorld",
componentName: "HelloWorld",
url: "/HelloWorld"
},
}
Voltran requires following configurations:
Config | Type |
---|---|
appConfigFile | Object |
dev | Boolean |
distFolder | String |
publicDistFolder | String |
inputFolder | String * required |
monitoring | Object |
port | Number - String |
prefix | String * required |
ssr | String |
styles | Array |
output | Object |
staticProps | Array |
routing | Object |
webpackConfiguration | Object |
sassResources | Array |
criticalCssDisabled | Boolean |
It should contain environment specific configurations (test, production ...).
appConfigFile: {
entry: path.resolve(__dirname, './yourConfigFolder/'),
output: {
path: path.resolve(__dirname, './yourOutputFolder/'),
name: 'yourFileName',
}
}
Development mode. Set to true
if you need to debug.
Default
: false
The path to the folder where bundled scripts will be placed after the build.
Default
: ./dist
The path to the folder where asset files will be placed after the build.
Default
: ./dist/assets
The path to the folder that contains script files. It's required.
Passes this config to Babel Loader where it reads all js files under this folder.
'Voltran' converts your files to the appropriate format and optimizes them.
For now, only prometheus is supported.
monitoring: {
prometheus: false
}
or you can set your custom js file.
monitoring: {
prometheus: path.resolve(__dirname, './src/tools/prometheus.js')
}
Default
: 3578
If you want to change the port you may need to change the port in appConfigFiles
It is required.
There may be different components owned by different teams using voltrans on the same page. Voltran needs to use a prefix in order to avoid conflicts issues. This prefix is prepended to initial states and CSS class names.
We recommend that each team use their own acronyms/prefixes.
Default
: true
Voltran supports server side rendering.
Applications that need 'SEO' features needs to set this parameter to true
.
This field's value should be an array of strings. Array values should be the paths to the global CSS files.
styles: [
path.resolve(__dirname, './some-css-file.scss'),
path.resolve(__dirname, './node_modules/carousel/carousel.css')
]
output: {
client: {
path: path.resolve(__dirname, './build/public/project/assets'),
publicPath: path.resolve(__dirname, './src/assets'),
filename: '[name]-[contenthash].js',
chunkFilename: '[name]-[chunkhash].js'
},
server: {
path: path.resolve(__dirname, './build/server'),
filename: '[name].js'
},
},
You can pass static props to all components at the same time.
staticProps: [
{'key': value}
]
Voltran need two files to set routing.
routing: {
components: path.resolve(__dirname, './src/appRoute/components.js'),
dictionary: path.resolve(__dirname, './src/appRoute/dictionary.js')
}
Set to false
if don't need to critical styles.
Default
: true
You can add your webpack configuration. They will be merged with the voltran configs.
You can access the starter kit we created from the link.
You can add sass resources to this field as string array. sass-resource-loader gonna inject those files in every sass files so you won't need to import them.
You can check sass-resource-loader for usage.
Add newrelicEnabled: true
on your config.
If you throw an error like throw new Error({message: "Service error", code: 500})
from your fragments, Voltran detects the fields and sends each field to New Relic as a custom attribute. These fields appear with _a
prefix to place in the first of rows on your new relic.
Voltran uses a number of open source projects to work properly:
git checkout -b my-new-feature
git commit -m 'Add some feature'
git push origin my-new-feature
FAQs
Micro Frontends Framework
The npm package voltranjs receives a total of 83 weekly downloads. As such, voltranjs popularity was classified as not popular.
We found that voltranjs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.