{"id":21684370,"url":"https://github.com/knovator/masters-admin","last_synced_at":"2025-08-20T16:14:05.094Z","repository":{"id":40692954,"uuid":"506974752","full_name":"knovator/masters-admin","owner":"knovator","description":"ReactJS package to integrate masters/submasters functionality to ReactJS/NextJS application.","archived":false,"fork":false,"pushed_at":"2025-03-10T08:54:15.000Z","size":970,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T11:50:10.796Z","etag":null,"topics":["knovator","masters","reactjs","submasters"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@knovator/masters-admin","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/knovator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-24T10:48:12.000Z","updated_at":"2025-03-10T08:54:20.000Z","dependencies_parsed_at":"2024-04-15T08:55:19.250Z","dependency_job_id":null,"html_url":"https://github.com/knovator/masters-admin","commit_stats":{"total_commits":77,"total_committers":4,"mean_commits":19.25,"dds":0.1428571428571429,"last_synced_commit":"f6fa1ac9f447e7595db3b4a86e54a70f55663de0"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knovator%2Fmasters-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knovator%2Fmasters-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knovator%2Fmasters-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/knovator%2Fmasters-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/knovator","download_url":"https://codeload.github.com/knovator/masters-admin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537009,"owners_count":21120690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["knovator","masters","reactjs","submasters"],"created_at":"2024-11-25T16:15:28.709Z","updated_at":"2025-04-12T07:51:46.100Z","avatar_url":"https://github.com/knovator.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- \u003ca href=\"https://github.com/knovator/masters-admin\"\u003e\n    \u003cimg src=\"images/logo.png\" alt=\"Logo\" width=\"80\" height=\"80\"\u003e\n  \u003c/a\u003e --\u003e\n\n\u003ch3 align=\"center\"\u003e@knovator/masters-admin\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    ReactJS package to integrate masters/submasters functionality to ReactJS/NextJS application.\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/knovator/masters-admin\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/knovator/masters-admin\"\u003eView Demo\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/knovator/masters-admin/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/knovator/masters-admin/issues\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\n\n\u003c!-- TABLE OF CONTENTS --\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eTable of Contents\u003c/summary\u003e\n  \u003col\u003e\n    \u003cli\u003e\n      \u003ca href=\"#about-the-project\"\u003eAbout The Project\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#built-with\"\u003eBuilt With\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#getting-started\"\u003eGetting Started\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#prerequisites\"\u003ePrerequisites\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\n      \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e\n      \u003cul\u003e\n        \u003cli\u003e\u003ca href=\"#provider\"\u003eProvider\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#master\"\u003eMaster\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#submaster\"\u003eSubMaster\u003c/a\u003e\u003c/li\u003e\n        \u003cli\u003e\u003ca href=\"#imageupload\"\u003eImageUpload\u003c/a\u003e\u003c/li\u003e\n      \u003c/ul\u003e\n    \u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#usecases\"\u003eUsecases\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"#contact\"\u003eContact\u003c/a\u003e\u003c/li\u003e\n  \u003c/ol\u003e\n\u003c/details\u003e\n\n\n\n\u003c!-- ABOUT THE PROJECT --\u003e\n## About The Project\n\n`@knovator/masters-admin` is built with intent to faster web app development cycle by providing plug \u0026 play facility for masters/submasters, that is used almost on every project.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Built With\n\n* [React.js](https://reactjs.org/)\n* [Rollup](https://rollupjs.org)\n* [classnames](https://www.npmjs.com/package/classnames)\n* [react-beautiful-dnd](https://www.npmjs.com/package/react-beautiful-dnd)\n* [react-dropzone](https://www.npmjs.com/package/react-dropzone)\n* [react-hook-form](https://www.npmjs.com/package/react-hook-form)\n* [react-table](https://www.npmjs.com/package/react-table)\n* [react-transition-group](https://www.npmjs.com/package/react-transition-group)\n* [typescript](https://www.typescriptlang.org)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n`@knovator/masters-admin` is designed to be used in ReactJS/NextJS project.\n\n### Prerequisites\n\nFollowing packages are required to exists/installed to use `@knovator/masters-admin` in the project.\n- [@knovator/api](https://www.npmjs.com/package/@knovator/api)\n- [react](https://www.npmjs.com/package/react)\n- [react-dom](https://www.npmjs.com/package/react-dom)\n- [react-hook-form](https://www.npmjs.com/package/react-hook-form)\n- [react-table](https://www.npmjs.com/package/react-table)\n\n### Installation\n\n   ```sh\n   npm install @knovator/masters-admin\n   # or\n   yarn add @knovator/masters-admin\n   ```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- USAGE EXAMPLES --\u003e\n## Usage\n\n### Provider\n`@knovator/masters-admin` uses **Context API**, to support communication between components. So, `Masters`/`Submaster` should be wraped by `Provider`.\n```js\nimport { Provider } from '@knovator/masters-admin`;\n\nfunction App() {\n    return (\n        \u003cProvider\n            ...\n        \u003e\n            ...\n        \u003c/Provider\u003e\n    )\n}\n```\n\n**Props**\n- `token`\n    - JWT token to be sent along the requests\n- `baseUrl`\n    - Base API url, without forward slash at end i.e. `https://api.xy000z.in`\n- `dataGetter` (*optional*)\n    - function to get docs from axios API response\n    ```js\n    // default\n    (response) =\u003e response.data.docs\n    ```\n- `paginationGetter` (*optional*)\n    - function to get pagination data from axios API response\n    ```js\n    // default\n    (response) =\u003e response.data\n    ```\n- `onError(callback_code, code, message)` (*optional*)\n    - callback to execute on error\n- `onSuccess(callback_code, code, message)` (*optional*)\n    - callback to execute on success\n- `onLogout` (*optional*)\n    - callback to execute on API request with `unauthorized` code in body\n\n### Master\nPlease check in [masters.md](masters.md)\n\n### SubMaster\nPlase check in [submasters.md](submasters.md)\n\n### ImageUpload\n- Provide `Image Upload` component to use in Forms\n\n**Props**\n- `className` (*optional*) =\u003e string\n- `text` =\u003e `string` | `JSX.Element` to show inside component\n- `maxSize` =\u003e `number` Max size for image to upload\n- `imgId` =\u003e `string` | `ImageObjectProps`\n  - Image Url or `ImageObjectProps` mentioned in [data-formats](data-formats.md)\n- `setImgId` =\u003e `(value?: string | null) =\u003e void`\n- `clearError` (*optional*) =\u003e `() =\u003e void`\n- `onError` =\u003e `(msg: string) =\u003e void`\n- `onImageUpload` =\u003e `(file: File) =\u003e Promise\u003c{ fileUrl: string; fileId: string } | void\u003e`\n  - Gets called when user uploads file, it should return `fileUrl` and `fileId`\n- `onImageRemove` (*optional*) =\u003e `(id: string) =\u003e Promise\u003cvoid\u003e`\n  - Gets called when user removes the image\n- `baseUrl` =\u003e string\n  - Gets used when showing image\n- `error` (*optional*) =\u003e string\n\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n## Usecases\n\n`@knovator/masters` is combination of two packages `@knovator/masters-admin` and `@knovator/masters-admin`. It is designed plug and play masters module in your project. It is useful in following cases:\n\n- Your app needs master, submaster facility to build things like `state` with `city`, `experiences` with `skills`, `categories` with `subcategories` etc.\n- You want to let admin manage masters and submasters data from admin panel.\n- You want to show masters and submasters data somewhere in your app.\n\nIf you have any other usecase, please open an issue with tag `usecase`. We will try to add it in our roadmap.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nKnovator Technologies\n- Twitter [@knovator](https://twitter.com/knovator)\n- Web [https://knovator.com/](https://knovator.com/)\n\nProject Link: [https://github.com/knovator/masters-admin](https://github.com/knovator/masters-admin)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknovator%2Fmasters-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknovator%2Fmasters-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknovator%2Fmasters-admin/lists"}