Skip to content

Commit

Permalink
release/v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
syuChen1 committed Apr 27, 2022
1 parent 2fc62f8 commit b699bfc
Show file tree
Hide file tree
Showing 35 changed files with 31,515 additions and 1,549 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Cloud-based programming interface

![Review](https://github.com/STEM-C/CaSMM/workflows/Review/badge.svg)
![Deploy Staging](https://github.com/STEM-C/CaSMM/workflows/Deploy%20Staging/badge.svg)
![Deploy Production](https://github.com/STEM-C/CaSMM/workflows/Deploy%20Production/badge.svg)

Expand All @@ -17,7 +16,7 @@ Cloud-based programming interface

### `server`

[server](/server#server) is the web server and application server. It is powered by [Node](https://nodejs.org/en/) and [Strapi](https://strapi.io/documentation/v3.x/getting-started/introduction.html).
[server](/server#server) is the web server and application server. It is powered by [Node](https://nodejs.org/en/) and [Strapi](https://docs-v3.strapi.io/developer-docs/latest/getting-started/introduction.html).

### `compile`

Expand Down Expand Up @@ -57,9 +56,7 @@ The development environment is composed of five servers. The first one is run wi

1. Install [docker](https://docs.docker.com/get-docker/)

> If you do not meet these [requirements](https://docs.docker.com/toolbox/toolbox_install_windows/) docker desktop will not initialize properly. There are some unofficial modifications, however, we recommend installing the docker [toolbox](https://docs.docker.com/toolbox/toolbox_install_windows/)
3. Run `docker-compose up` from `/`
2. Run `docker-compose up` from `/`

> Grant permission to the **scripts** and **server** directories if you are prompted
Expand Down Expand Up @@ -100,7 +97,7 @@ All three components of the application have their own dependencies managed in t

### Strapi

This is by far the largest and most important dependency we have. Staying up to date with its [releases](https://github.com/strapi/strapi/releases) is important for bug/security fixes and new features. When it comes to actually upgrading Strapi make sure to follow the [migration guides](https://strapi.io/documentation/developer-docs/latest/migration-guide/#instructions)!
This is by far the largest and most important dependency we have. Staying up to date with its [releases](https://github.com/strapi/strapi/releases) is important for bug/security fixes and new features. When it comes to actually upgrading Strapi make sure to follow the [migration guides](https://docs-v3.strapi.io/developer-docs/latest/update-migration-guides/migration-guides.html#v3-guides)!

<br/>

Expand Down
14 changes: 14 additions & 0 deletions scripts/development_db.dump
Original file line number Diff line number Diff line change
Expand Up @@ -4174,6 +4174,20 @@ SELECT pg_catalog.setval('public.teacher_workspaces__blocks_id_seq', 1, false);
SELECT pg_catalog.setval('public.teacher_workspaces_id_seq', 1, false);


--
-- Name: teacher_workspaces__blocks_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teacher_workspaces__blocks_id_seq', 1, false);


--
-- Name: teacher_workspaces_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teacher_workspaces_id_seq', 1, false);


--
-- Name: teachers_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--
Expand Down
41 changes: 16 additions & 25 deletions server/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Server

> Web server and application server that will serve static content and dynamic content over HTTP. It is powered by [Node](https://nodejs.org/en/), [Strapi](https://strapi.io/documentation/v3.x/getting-started/introduction.html), and [PostgreSQL](https://www.postgresql.org/). The file structure is defined by Strapi and is documented [here](https://strapi.io/documentation/3.0.0-beta.x/concepts/file-structure.html#files-structure).
> Web server and application server that will serve static content and dynamic content over HTTP. It is powered by [Node](https://nodejs.org/en/), [Strapi](https://strapi.io/documentation/v3.x/getting-started/introduction.html), and [PostgreSQL](https://www.postgresql.org/). The file structure is defined by Strapi and is documented [here](https://docs-v3.strapi.io/developer-docs/latest/setup-deployment-guides/file-structure.html).
<br/>

Expand All @@ -19,7 +19,7 @@

## Static Assets

All assets in the **public** directory will be served. The specifics are defined [here](https://strapi.io/documentation/v3.x/concepts/public-assets.html).
All assets in the **public** directory will be served. The specifics are defined [here](https://docs-v3.strapi.io/developer-docs/latest/setup-deployment-guides/configurations.html#public-assets).

### Client

Expand All @@ -35,39 +35,22 @@ The [proxy](/server/middlewares/proxy/index.js) middleware handles serving **cli
### Documentation

The latest API documentation is available on [Postman](https://documenter.getpostman.com/view/3570478/SztBboUJ). You can view example request/responses and even save the collection to your local Postman workspace.
The latest API documentation is available on [Strapi Documentation](http://localhost:1337/documentation/v1.0.0) after you started your local development. You can view example request/responses and test it with your jwt token.

### Authentication

Mentors use the `local` provider routes, `/auth/local` and `/auth/local/register`, to login and register. Students login by joining a session with the route `/sessions/join/:code`. In both cases, a JWT will be issued on a successful response. Subsequent requests will need to send this JWT as a `Bearer` token. Read more about that [here](https://strapi.io/documentation/v3.x/plugins/users-permissions.html#authentication).
Mentors use the `local` provider routes, `/auth/local` and `/auth/local/register`, to login and register. Students login by joining a session with the route `/sessions/join/:code`. In both cases, a JWT will be issued on a successful response. Subsequent requests will need to send this JWT as a `Bearer` token. Read more about that [here](https://docs-v3.strapi.io/developer-docs/latest/development/plugins/users-permissions.html#concept).

> The [permissions](/cms/extensions/users-permissions/config/policies/permissions.js) policy is run as a middleware on all requests. It will pull the user and their role, which will be executed against the respective policy. Custom logic has been added to handle student JWTs as student auth is not apart of the `/auth` controller group.
> The [permissions](./extensions/users-permissions/config/policies/permissions.js) policy is run as a middleware on all requests. It will pull the user and their role, which will be executed against the respective policy. Custom logic has been added to handle student JWTs as student auth is not apart of the `/auth` controller group.
### Entity Relationships

![ER Digram](er_diagram.png)
![ER Digram](er_diagram.PNG)

### Endpoints

Each endpoint corresponds to an entity from the ER digram, a content type in the admin panel, a folder in the `./api` directory, and a database table.

| Endpoint |
| ------------------- |
| activities |
| blocks |
| blocks-categories |
| classrooms |
| complexities |
| difficulties |
| learning-categories |
| mentors |
| models |
| schools |
| sessions |
| students |
| topics |
| types |

Each and every endpoint can be interacted with by using the following method and path combinations.

| Method | Path | Description |
Expand All @@ -79,7 +62,15 @@ Each and every endpoint can be interacted with by using the following method and
| DELETE | /{endpoint}/:id | Delete an entry |
| PUT | /{endpoint}/:id | Update an entry |

Read the full [documentation](https://strapi.io/documentation/3.0.0-beta.x/content-api/api-endpoints.html#api-endpoints) on the api endpoints.
Read the full [documentation](https://docs-v3.strapi.io/developer-docs/latest/development/backend-customization.html#routing) on the api endpoints.

<br/>

## Strapi Plugins

We intergrated the Stapi [Email](https://docs-v3.strapi.io/developer-docs/latest/development/plugins/email.html#programmatic-usage) Plugin with [SendInBlue](https://www.sendinblue.com/) to send Bug report and forgot password emails.

We also uses Strapi [Documentation](https://docs-v3.strapi.io/developer-docs/latest/development/plugins/documentation.html) Plugin to document our backend api end point as well as testing it on the fly.

<br/>

Expand All @@ -89,5 +80,5 @@ Built with [React](https://reactjs.org/) and served by [Node](https://nodejs.org

> In some cases /admin may be blank, in this case `yarn build` needs to be run from the docker container
Read the full [documentation](https://strapi.io/documentation/v3.x/admin-panel/customization.html) on the admin panel.
Read the full [documentation](https://docs-v3.strapi.io/developer-docs/latest/development/admin-customization.html) on the admin panel.

Loading

0 comments on commit b699bfc

Please sign in to comment.