Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@pankod/refine
Advanced tools
refine offers lots of out-of-the box functionality for rapid development, without compromising extreme customizability. Use-cases include, but are not limited to admin panels, B2B applications and dashboards.
For more detailed information and usage, refer to the refine documentation.
⚙️ Zero-configuration: One-line setup with superplate. It takes less than a minute to start a project.
📦 Out-of-the-box : Routing, networking, authentication, state management, i18n and UI.
🔌 Backend Agnostic : Connects to any custom backend. Built-in support for REST API, GraphQL, NestJs CRUD, Airtable, Strapi, Strapi GraphQL, Supabase and Altogic.
📝 Native Typescript Core : You can always opt out for plain Javascript.
🔘 Decoupled UI : UI components are exposed directly without encapsulation. You have full control on UI elements.
🐜 Powerful Default UI : Works seamlessly with integrated Ant Design System. (Support for multiple UI frameworks is on the Roadmap)
📝 Boilerplate-free Code : Keeps your codebase clean and readable.
Higher-level frontend frameworks can save you a lot time, but they typically offer you a trade-off between speed and flexibility.
After many years of experience in developing B2B frontend applications and working with popular frameworks, we came up with a new approach to tackle this dilemma. This is how refine is born.
refine is a collection of helper hooks
, components
and providers
. They are all decoupled from your UI components and business logic, so they never keep you from customizing your UI or coding your own flow.
As refine is totally unopinionated about UI and logic, it's strongly opinionated about three parts of your application:
We believe, these are the most important components of a data-intensive frontend application and should be handled in a robust way by leveraging industry best practices.
refine guarantees you a perfect implementation of these building blocks in your project, so you can focus on your development.
refine makes extensive use of hooks as a default way for interacting with your components. Under the hood, refine relies heavily to React Query for data handling, caching and state management. Access to external sources and API's happen via providers which are basically plug-in type components for extendibility.
After releasing the first internal versions, we had the chance to migrate some of our React projects to refine. In addition to shorter development times and overall performance gains, we've measured significant reduction in project size.
refine makes your codebase significantly smaller, by eliminating redundant code such as reducers, actions and unit tests. Below is a size comparison for an example project:
Run the superplate tool with the following command:
npx superplate-cli tutorial
Follow the CLI wizard to select options and start creating your project.
After setup is complete, navigate to the project folder and start your project with:
npm run dev
Your refine application will be accessible at http://localhost:3000.
Replace the contents of App.tsx
with the following code:
import React from "react";
import {
Refine,
Resource,
useTable,
List,
Table,
useMany,
DateField,
} from "@pankod/refine";
import routerProvider from "@pankod/refine-react-router";
import dataProvider from "@pankod/refine-simple-rest";
import "@pankod/refine/dist/styles.min.css";
const App: React.FC = () => {
return (
<Refine
routerProvider={routerProvider}
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
resources={[
{
name: "posts",
list: PostList,
},
]}
/>
);
};
export const PostList: React.FC = () => {
const { tableProps } = useTable<IPost>();
const categoryIds =
tableProps?.dataSource?.map((item) => item.category.id) ?? [];
const { data, isLoading } = useMany<ICategory>({
resource: "categories",
ids: categoryIds,
queryOptions: {
enabled: categoryIds.length > 0,
},
});
return (
<List>
<Table<IPost> {...tableProps} rowKey="id">
<Table.Column dataIndex="title" title="title" />
<Table.Column
dataIndex={["category", "id"]}
title="category"
render={(value: string) => {
if (isLoading) {
return "loading...";
}
return data?.data.find(
(item: ICategory) => item.id === value,
)?.title;
}}
/>
<Table.Column
dataIndex="createdAt"
title="createdAt"
render={(value) => <DateField format="LLL" value={value} />}
/>
</Table>
</List>
);
};
export default App;
interface IPost {
title: string;
createdAt: string;
category: ICategory;
}
interface ICategory {
id: string;
title: string;
}
☑️ NextJS & SSR support
☑️ Support for more data & auth providers
☑️ Support for more UI frameworks (MaterialUI, Chakra, Spectrum etc.)
If you have a bug to report, do not hesitate to file an issue.
If you are willing to fix an issue or propose a feature; all PRs with clear explanations are welcome and encouraged.
Licensed under the MIT License, Copyright © 2021-present Pankod
React Admin has been a great source of ideas and inspiration for refine. Big thanks to friends at Marmelab for the amazing work they are doing.
FAQs
refine is a React-based framework for building data-intensive applications in no time. It ships with Ant Design System, an enterprise-level UI toolkit.
The npm package @pankod/refine receives a total of 1,851 weekly downloads. As such, @pankod/refine popularity was classified as popular.
We found that @pankod/refine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.