# safeducate

> *Other Language: [简体中文](README.zh.md)*

Latest version **2.0.0** (published 2020-02-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install safeducate
pnpm add safeducate
yarn add safeducate
bun add safeducate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-02-18 |
| First published | 2020-02-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 25 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Author | agora |
| Maintainers | vs230135 |

## Links

- npm: https://www.npmjs.com/package/safeducate
- Homepage: http://localhost:3000/
- npm.io page: https://npm.io/package/safeducate

## Dependencies (25)

- [rxjs](https://npm.io/package/rxjs.md) ^6.5.3
- [uuid](https://npm.io/package/uuid.md) ^3.3.3
- [react](https://npm.io/package/react.md) ^16.10.2
- [darwin](https://npm.io/package/darwin.md) 0.0.5
- [js-md5](https://npm.io/package/js-md5.md) ^0.7.3
- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [moment](https://npm.io/package/moment.md) ^2.24.0
- [ali-oss](https://npm.io/package/ali-oss.md) ^6.3.1
- [cross-env](https://npm.io/package/cross-env.md) ^6.0.3
- [immutable](https://npm.io/package/immutable.md) ^4.0.0-rc.12
- [node-sass](https://npm.io/package/node-sass.md) ^4.12.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.10.2
- [typescript](https://npm.io/package/typescript.md) ^3.6.4
- [react-color](https://npm.io/package/react-color.md) 2.17.3
- [concurrently](https://npm.io/package/concurrently.md) ^5.0.0
- [agora-rtc-sdk](https://npm.io/package/agora-rtc-sdk.md) 3.0.0
- [agora-rtm-sdk](https://npm.io/package/agora-rtm-sdk.md) ^1.2.0
- [react-scripts](https://npm.io/package/react-scripts.md) 3.2.0
- [white-web-sdk](https://npm.io/package/white-web-sdk.md) ^2.5.10
- [react-draggable](https://npm.io/package/react-draggable.md) ^4.2.0
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^5.1.2
- [@material-ui/core](https://npm.io/package/@material-ui/core.md) ^4.5.1
- [@material-ui/icons](https://npm.io/package/@material-ui/icons.md) ^4.5.1
- [agora-electron-sdk](https://npm.io/package/agora-electron-sdk.md) 2.9.1-beta.4
- [@netless/react-seek-slider](https://npm.io/package/@netless/react-seek-slider.md) ^1.0.4

## Recent versions

- 2.0.0 (latest) — 2020-02-18
- 1.0.0 — 2020-02-18

## README

# Agora Education Web & Electron demo  
*Other Language: [简体中文](README.zh.md)*

### Preview
  [web demo](https://solutions.agora.io/education/web/)

### Description
  Agora Education solution is based on Agora RTM/Media sdk & netless whiteboard sdk.  
  For developer guideline:

  |Feature|code entry|description|  
  | ---- | ----- | ----- |
  | 1v1 | [one-to-one.tsx](./src/pages/classroom/one-to-one.tsx) | One teacher co-video with one student |
  | 1v16: small-class scenario| [small-class.tsx](./src/pages/classroom/small-class.tsx) | One teacher co-video with 16 students |
  | 1vN：big-class scenario | [big-class.tsx](./src/pages/classroom/big-class.tsx) | One teacher co-video with one student, student can join class with audience role, only send co-video with teacher, teacher permit co-video will become host and co-video. |

### Core SDKs
  * agora-rtc-sdk (agora web sdk)
  * agora-rtm-sdk (agora web sdk)
  * agora-electron-sdk  (official agora electron sdk)
  * white-web-sdk (netless web sdk)
  * ali-oss (can be replaced with your own cloud oss sdk)
  * agora cloud recording (we recommend to integrate in server side)

### Frontend Tech Utilities
  * typescript ^3.6.4
  * react & react hooks & rxjs
  * electron 5.0.8 & electron-builder
  * material-ui


### Development Environment
  * mac or windows
  * nodejs LTS
  * electron 5.0.8

### For Windows Electron Developer
  * npm install electron@5.0.8 arch=ia32 manually  
  ```
  npm install electron@5.0.8 --arch=ia32 --save-dev
  ```  
  * find the `agora_electron` from package.json, replace it with below code snippet  
  ```
    "agora_electron": {
      "electron_version": "5.0.8",
      "prebuilt": true,
      "platform": "win32"
    },
  ```

### Setup

# Notice 
#### If you are already enabled app certificate for security, please find below comment and integrate with your obtain token code snippet here.
```
WARN: IF YOU ENABLED APP CERTIFICATE, PLEASE SIGN YOUR TOKEN IN YOUR SERVER SIDE AND OBTAIN IT FROM YOUR OWN TRUSTED SERVER API
```

# obtain agora appid 和 netless sdktoken
  rename .env.example to .env.local
```bash
# agora APPID obtain from dashboard.agora.io
REACT_APP_AGORA_APP_ID=Agora APPID
# true is indicate the agora sdk will enable log
REACT_APP_AGORA_LOG=true
# obtain netless whiteboard sdk from herewhite official website
REACT_APP_NETLESS_APP_TOKEN=SDKTOKEN
# whiteboard api create room entry and join room end-points
REACT_APP_NETLESS_APP_API_ENTRY=https://cloudcapiv4.herewhite.com/room?token=
REACT_APP_NETLESS_APP_JOIN_API=https://cloudcapiv4.herewhite.com/room/join?token=
# agora recording service end-point
REACT_APP_AGORA_RECORDING_SERVICE_URL=https://api.agora.io/v1/apps/%s/cloud_recording/
# oss for cloud recording storage
REACT_APP_AGORA_RECORDING_OSS_URL=云录制OSS地址
# oss parameters for whiteboard courseware
REACT_APP_AGORA_OSS_BUCKET_NAME=your_oss_bucket_name
REACT_APP_AGORA_OSS_BUCKET_FOLDER=your_oss_folder
REACT_APP_AGORA_OSS_BUCKET_REGION=your_oss_region
REACT_APP_AGORA_OSS_BUCKET_KEY=your_oss_bucket_ak
REACT_APP_AGORA_OSS_BUCKET_SECRET=your_oss_bucket_sk
```

# Build Web 

#### Development build
  `npm run dev`

#### Production build
  `npm run build`

### Please double check your package.json，then `npm run build`
  "homepage": "Your domain/website path"

# Build Electron

#### Development build
  * `npm run electron`  
  * `Please take care, because this project using process manager to bootstrap electron main process, and render process start with create-react-app。`  

#### Package Electron for Mac  
  npm run pack:mac  

#### Package Electron for Win32  
  * npm i electron@5.0.8 --arch=ia32  
  * find and replace `agora_electron`:  
  ```
    "agora_electron": {
      "electron_version": "5.0.8",
      "prebuilt": true,
      "platform": "win32"
    },
  ```    
  * If you already did npm install, please clean node_modules & reinstall  
  * final step: npm run pack:win   

#### FAQ
  * [ISSUES](https://github.com/AgoraIO-Usecase/eEducation/issues/new)  
  * If you find your localhost:3000 port already exists or refused, please modify `ELECTRON_START_URL` from package.json, change to available port then run it again.

---
_Source: https://npm.io/package/safeducate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
