{"id":19513443,"url":"https://github.com/escolalms/sdk","last_synced_at":"2025-04-26T04:31:45.929Z","repository":{"id":37462466,"uuid":"406729667","full_name":"EscolaLMS/sdk","owner":"EscolaLMS","description":"Frontend API Connector. Definition of reusable components and frontend services. ","archived":false,"fork":false,"pushed_at":"2025-01-16T11:56:30.000Z","size":24657,"stargazers_count":2,"open_issues_count":30,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T17:03:36.642Z","etag":null,"topics":["lms","react","sdk","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EscolaLMS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-09-15T11:12:05.000Z","updated_at":"2024-11-15T14:28:45.000Z","dependencies_parsed_at":"2023-07-17T06:28:30.683Z","dependency_job_id":"7516eb68-4bc3-437e-9537-f1925a26bafa","html_url":"https://github.com/EscolaLMS/sdk","commit_stats":{"total_commits":511,"total_committers":17,"mean_commits":"30.058823529411764","dds":0.7397260273972603,"last_synced_commit":"27b29e21084caadd55e523b8cae567b5eb3d6751"},"previous_names":["escolalms/api-connector"],"tags_count":246,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EscolaLMS%2Fsdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EscolaLMS%2Fsdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EscolaLMS%2Fsdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EscolaLMS%2Fsdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EscolaLMS","download_url":"https://codeload.github.com/EscolaLMS/sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250931041,"owners_count":21509807,"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":["lms","react","sdk","typescript"],"created_at":"2024-11-10T23:30:01.057Z","updated_at":"2025-04-26T04:31:45.046Z","avatar_url":"https://github.com/EscolaLMS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EscolaLMS Software Development Kit\n\n[![codecov](https://codecov.io/gh/EscolaLMS/sdk/branch/main/graph/badge.svg?token=qkNOJG7bLh)](https://codecov.io/gh/EscolaLMS/sdk)\n[![Maintainability](https://api.codeclimate.com/v1/badges/55841ab42538f51a42d2/maintainability)](https://codeclimate.com/github/EscolaLMS/sdk/maintainability)\n![npm](https://img.shields.io/npm/v/@escolalms/sdk)\n![npm](https://img.shields.io/npm/dm/@escolalms/sdk)\n\nThe following project contains:\n\n## API Documentation\n\n- Most of what you're looking for is covered by [TypeDoc documentations](https://escolalms.github.io/sdk/).\n\n## Types\n\n- [Types of all API Responses](https://github.com/EscolaLMS/sdk/blob/main/src/types/api.ts)\n\n- [ts-models](https://github.com/EscolaLMS/ts-models) those types are automatically generated\n\n## React\n\nFor rapid React application development here is list of\n\n- [React Context](https://github.com/EscolaLMS/sdk/blob/main/src/react/context/index.tsx)\n- [React hooks](https://github.com/EscolaLMS/sdk/tree/main/src/react/hooks)\n- [React Components](https://github.com/EscolaLMS/sdk/tree/main/src/react/components)\n\n### Context\n\nSimplest React appliaction consuming Wellms Context API would look like\n\n```tsx\nimport React, { useContext } from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport { EscolaLMSContextProvider } from \"@escolalms/sdk/lib/react/context\";\n\ndeclare global {\n  interface Window {\n    REACT_APP_API_URL: string;\n  }\n}\n\nconst App = () =\u003e {\n  const { user, courses, fetchCourses } = useContext(EscolaLMSContext);\n\n  useEffect(() =\u003e fetchCourses(), []);\n\n  console.log(\"current user data\", user);\n\n  return (\n    \u003cReact.Fragment\u003e\n      \u003cul\u003e\n        {courses.list.map((course) =\u003e (\n          \u003cli key={course.id}\u003e{course.title}\u003c/li\u003e\n        ))}\n      \u003c/ul\u003e\n    \u003c/React.Fragment\u003e\n  );\n};\n\nconst API_URL =\n  window.REACT_APP_API_URL ||\n  (process \u0026\u0026 process.env \u0026\u0026 process.env.REACT_APP_PUBLIC_API_URL);\n\nReactDOM.createRoot(document.getElementById(\"root\") as Element).render(\n  \u003cEscolaLMSContextProvider apiUrl={API_URL}\u003e\n    \u003cApp /\u003e\n  \u003c/EscolaLMSContextProvider\u003e\n);\n```\n\n## API endpoint calls\n\nList of [umi-request](https://github.com/umijs/umi-request) based\n\n- [Frontend App](https://github.com/EscolaLMS/sdk/tree/main/src/services) endpoints\n- [Admin](https://github.com/EscolaLMS/sdk/tree/main/src/types) endpoints\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescolalms%2Fsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescolalms%2Fsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescolalms%2Fsdk/lists"}