
Security News
New React Server Components Vulnerabilities: DoS and Source Code Exposure
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.
atp-authentication
Advanced tools
A shareable Material UI component library with a playground folder to live-test components as you are developing them.
npm run i-all to install the dependenciespackage.json and also replace the functional-components-boilerplate in the dependencies of the playground/package.json with your package namesrc/componentssrc/index.js fileplayground/src/App.js filenpm run dev to test the componentexport { default as CustLayout } from './components/layout'import React from 'react';
import Typography from '@material-ui/core/Typography';
import withStyleFix from '../stylefix';
import withTheme from '../themeProvider';
import { useTheme } from '@material-ui/core/styles';
import Container from '@material-ui/core/Container';
const HelloWorld=(props)=>{
const theme = useTheme();
const {name}=props;
return(
<Container disableGutters maxWidth="lg" style={{display:"grid",placeItems:"center",minHeight:"100vh"}}>
<Typography variant="h2" style={{color:theme?.palette?.primary?.main,textAlign:"center",fontWeight:500}}>Hello {name}</Typography>
</Container>
)
}
HelloWorld.defaultProps={
name:"React & Material UI NPM package boilerplate"
}
export default withStyleFix(withTheme(HelloWorld));
//withStyleFix - It can be used to avoid class name collisions when using multiple generators in the same document.
// withTheme - To Provide the theme object to the component as a property, which can be consumed by using useTheme() hook as shown above
{
"componentName": "CustLayout",
"componentId": "cmuc-comp-1",
"frameWork": "custom-material-ui-component",
"componentType": "Layout",
"isLayout": true,
"supported": [
"web"
],
"defaultProps": {
"childComponent": true
},
"props": {
"ProjectTitle": {
"componentToRender": "messageCatalog"
},
"VersionNo": {
"componentToRender": "text"
},
"Title": {
"componentToRender": "messageCatalog"
},
"SubTitle": {
"componentToRender": "text"
},
"ImageSrc": {
"componentToRender": "imageUpload"
},
"HeaderBackgroundColor": {
"componentToRender": "text"
},
"HeaderFontColor": {
"componentToRender": "text"
},
"Header": {
"componentToRender": "select",
"options": [
true,
false
]
},
"Transtale": {
"componentToRender": "select",
"options": [
true,
false
]
},
"Menu": {
"componentToRender": "select",
"options": [
true,
false
]
},
"Language": {
"componentToRender": "multiSelect",
"options": []
},
"childComponent": {
"componentToRender": "select",
"options": [
true,
false
]
},
"navBarType": {
"componentToRender": "select",
"options": [
"Normal",
"Nested"
]
},
"pages": {
"componentToRender": "pageSelect",
"value": [
{
"name": {
"componentToRender": "text"
},
"page": {
"componentToRender": "text"
},
"childPageSelect": {
"componentToRender": "childPageSelect"
}
}
]
}
},
"active": true
}
{
"componentName": "CustLayout", //component Name
"componentId": "cmuc-comp-1", // packagename(fullname or shortform in kebab case) + Unique Id (Serial No)
"frameWork": "functional-components-boilerplate", //Package Name
"componentType": "Layout", // Possible Values ["Lab","Layout","Data Display","Lab","Inputs","Surfaces"]. Refer UI Builder
"isLayout": false, // For custom components isLayout always will be false
"supported": [
"web"
], // Default web
"defaultProps": {
"childComponent": true
}, // Pass the default props of the component
"props": {
// Basic Structure
"key":{
"componentToRender":"text" // This is for the UI Builder. It will render the property with the componentToRender type like text ,select, etc.. in the properties panel
}
//Possible Values for componentToRender ["text","number", "messageCatalog","select","icons","imageUpload","component","pageSelect","NestedNav","arrayOfObject","freeMultiSelect","multiSelect"];
//For More details contact the UI Builder Team
//Examples
"ProjectTitle": {
"componentToRender": "messageCatalog"
},
"VersionNo": {
"componentToRender": "text"
},
"Title": {
"componentToRender": "messageCatalog"
},
"SubTitle": {
"componentToRender": "text"
},
"ImageSrc": {
"componentToRender": "imageUpload"
},
"HeaderBackgroundColor": {
"componentToRender": "text"
},
"HeaderFontColor": {
"componentToRender": "text"
},
"Header": {
"componentToRender": "select",
"options": [
true,
false
]
},
"Transtale": {
"componentToRender": "select",
"options": [
true,
false
]
},
"Menu": {
"componentToRender": "select",
"options": [
true,
false
]
},
"Language": {
"componentToRender": "multiSelect",
"options": []
},
"childComponent": {
"componentToRender": "select",
"options": [
true,
false
]
},
"navBarType": {
"componentToRender": "select",
"options": [
"Normal",
"Nested"
]
},
"pages": {
"componentToRender": "pageSelect",
"value": [
{
"name": {
"componentToRender": "text"
},
"page": {
"componentToRender": "text"
},
"childPageSelect": {
"componentToRender": "childPageSelect"
}
}
]
}
},
"active": true // When false the component will not be shown in the UI Builder
}
"build": "rollup -c", // To build the package
"start": "rollup -c -w", // To build & watch the package
"start-playground": "cd playground && npm run start", // To start the playground
"i-all": "npm i && cd playground && npm i", // To the install the dependencies after cloning this boilerplate
"dev": "npm-run-all --parallel start start-playground" // To run both the package & playground project
npm run dev to live-test the componentsTo bundle and test in local follow below steps. Make sure you have run the npm run build command or npm start before testing.
Run npm link. It will create a symlink in the global folder file.
Then go the project you want to use the package. And run the below command npm link packagename(functional-components-boilerplate).
The above command just include the functional-components-boilerplate in the node_modules (not add anything in package.json).
import React from 'react';
import { HelloWorld } from 'functional-components-boilerplate';
const App = () => {
return <HelloWorld />
}
export default App;
To publish the package to NPM follow the below setps
npm run build
git add .
git commit -m 'your commit message'npm version patch - For a bug fixnpm version minor - For a new component additionnpm version major - For a completed feature.npm login It asks the NPM credentialsnpm publish --access public to publishFor further more details refere the below link How to create,test and publish a NPM package in react.
README.md) added.npmignoreREADME.md fileatp-casbin package for the IDMatp-casbin package in the IDM.md fileFAQs
atp-authentication
The npm package atp-authentication receives a total of 1 weekly downloads. As such, atp-authentication popularity was classified as not popular.
We found that atp-authentication demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.