
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
A CLI tool for generating feature-based folder structures in React and Next.js projects.
You can use FeatSlice in two ways:
npx featslice auth login,register
npm install -g featslice
featslice auth login,register
featslice auth login,register,reset-password
Just run:
featslice
The CLI will guide you through:
To preview the files and directories that will be created without actually modifying your filesystem, use the --dry-run or -d flag:
featslice auth login,register --dry-run
If you already have a feature generated (e.g., auth) and want to add a new slice to it (e.g., logout), simply run the command again with the existing feature name and the new slice:
featslice auth logout
FeatSlice will intelligently add only the new slice without overwriting your existing files or shared directories.
FeatSlice automatically detects whether you're in a Next.js or React project by checking your package.json. You don't need to specify this manually.
Here's what gets generated for a feature named "auth" with slices "login" and "register":
auth/
├── components/ # Shared components
│ └── index.ts
├── hooks/ # Custom hooks
│ └── index.ts # Contains useAuth hook
├── types/ # TypeScript types
│ └── index.ts # Contains IAuthProps, IAuthState, TAuthResponse
├── utils/ # Utility functions
│ └── index.ts # Contains authUtils
├── api/
│ └── services/ # API services
│ ├── index.ts
│ └── auth.service.ts # CRUD operations
├── constants/ # Constants and configs
│ └── index.ts # Contains AUTH_ROUTES, AUTH_CONFIG
├── login/ # Login slice
│ ├── components/ # Login-specific components
│ │ └── index.ts
│ └── page.tsx # Main login page
├── register/ # Register slice
│ ├── components/ # Register-specific components
│ │ └── index.ts
│ └── page.tsx # Main register page
└── layout.tsx # Feature layout
Same structure but with index.tsx instead of page.tsx in slice folders.
import type {
TAuthResponse,
IAuthProps
} from '../../types';
export const authService = {
fetchAuth: async (): Promise<TAuthResponse> => {
try {
// Implement your service method
throw new Error('Not implemented');
} catch (error) {
console.error('Error in fetchAuth:', error);
throw error;
}
},
createAuth: async (data: IAuthProps): Promise<TAuthResponse> => {
// ... CRUD operations
},
// ... more methods
};
export interface IAuthProps {
// Add your props here
}
export interface IAuthState {
// Add your state here
}
export type TAuthResponse = {
// Add your response type here
};
export default function LoginPage() {
return (
<div className="container mx-auto p-4">
<h1 className="text-2xl font-bold mb-4">Login</h1>
</div>
);
}
import React from 'react';
function LoginPage() {
return (
<div className="container mx-auto p-4">
<h1 className="text-2xl font-bold mb-4">Login</h1>
</div>
);
}
export default LoginPage;
Feature Naming
auth, user-profile, order-managementSlice Naming
login, reset-password, user-settingsFile Organization
featslice auth login,register,reset-password,verify-email
featslice user-profile personal-info,security,preferences,billing
featslice order-management order-list,order-details,create-order
A: Run it in your project's src directory, typically in src/features or src/modules.
A: Simply run the command again with the same feature name and the new slice name. FeatSlice will add the new slice to your existing feature structure without overwriting existing files!
A: The templates are currently fixed, but future versions will support custom templates.
Feel free to submit issues and PRs for:
MIT
FAQs
Feature folder structure generator for React/Next.js projects
We found that featslice demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.