diff --git a/docs/Deploy.md b/docs/Deploy.md index e7af19ea..16d52ee1 100644 --- a/docs/Deploy.md +++ b/docs/Deploy.md @@ -54,7 +54,7 @@ You can find documentationa about each docker image on [docker hub](https://hub. ## Deploy on heroku -As the CMS is released in two different containers, you need to deploy two different application +As the CMS is released in two different containers, you need to deploy two different applications ### Deploy UI on Heroku 1. Create an app, ie. your-demo-ui @@ -100,7 +100,7 @@ heroku container:release web -a your-demo-api A simple configuration for Kubernetes can be made using following yaml files ### UI -save this file as ui.yml +Save this file as ui.yml ```yaml apiVersion: v1 kind: Service @@ -148,7 +148,7 @@ spec: ## API -save this snippet as api.yml +Save this snippet as api.yml ```yaml apiVersion: v1 kind: Service @@ -193,7 +193,7 @@ spec: ``` ### Ingress -save this snippet as ingress.yml +Save this snippet as ingress.yml ```yaml apiVersion: extensions/v1beta1 kind: Ingress @@ -232,7 +232,7 @@ You can create a kubernetes cluster from scratch using Microsoft Azure using [th ## Manual deployment -If you want you can use the zip packages and deploy them directly. This practice is niether recommended nor supported. -The two applications can be deployed as following: -- **UI** is a static html web site, can be serverd by nginx or all other web server. All the url must point to index.html with a rewrite rule. You can use the nginx condiguration of our [nginx container as refernence ](https://github.com/arduosoft/RawCMS/blob/master/docker/config/ui/nginx.conf) -- **API** is a regular aspnet core application, and can be run using command 'dotnet RawCMS.dll'. IIS should work as well. It is tested on frmework 2.2 and 2.1 +If you want you can use the zip packages and deploy them directly. This practice is neither recommended nor supported. +The two applications can be deployed as follows: +- **UI** is a static html web site, can be served by nginx or any other web server. All the urls must point to index.html with a rewrite rule. You can use the nginx configuration of our [nginx container as refernence ](https://github.com/arduosoft/RawCMS/blob/master/docker/config/ui/nginx.conf) +- **API** is a regular ASP.NET core application, and can be run using command "dotnet RawCMS.dll". IIS should work as well. It is tested on .NET CORE 2.2 and 2.1 diff --git a/docs/Setup-Dev.md b/docs/Setup-Dev.md index bb2853af..9ea33df3 100644 --- a/docs/Setup-Dev.md +++ b/docs/Setup-Dev.md @@ -1,10 +1,11 @@ -# Software to install +# Required Software/Tools - [Visual Studio](https://visualstudio.microsoft.com/it/thank-you-downloading-visual-studio/?sku=Community&rel=16) - [Visual Studio Code](https://code.visualstudio.com/) - Client Git([Fork](https://git-fork.com/) or [GitExtensions](http://gitextensions.github.io/)) - [NodeJS last LTS](https://nodejs.org/it/download/) - [MongoDB Server](https://www.mongodb.com/) +- [Docker](https://docs.docker.com/get-docker/) (optional but recommended) - [MongoDB Compass](https://www.mongodb.com/) (optional but recommended) - [Postman](https://www.getpostman.com/downloads/) (optional but recommended) @@ -12,30 +13,33 @@ ## Initial Local Setup For contributors -Open the terminal, move to the docker folder of rawCms project, then digit **docker-compose up**. -Open the project on Visual Studio and start it. This will activate a mongodb installation, with a preconfigured database. -Please doublecheck the port number of appsettings.json file and the one exposed by docker compose. Must be the same. -**Non docker user** for user that do not have docker, you can install mongodb locally and change the port number according. +Open the terminal, move to the docker folder of rawCms project, then run the command **docker-compose up**. +Open the project on Visual Studio and start it. This will activate a mongodb installation with a preconfigured database. +Please double-check the port number on the appsettings.json file and the one exposed by docker compose. These must be the same. + +**Non docker users** - For users that do not have docker, you can install mongodb locally and change the port number accordingly. [![Docker RawCMS setup](http://img.youtube.com/vi/vFgC9N6bb3Q/0.jpg)](http://www.youtube.com/watch?v=vFgC9N6bb3Q) ## Setup postman -On Postman import the collection file rawCMS/docs/RawCMS.postman_collection.json. -After that, open any collection and copy the port number from the link (should be 28436). -Open rawCMS on Visual Studio, on the right in the _solution explorer_, right click on rawCMS, then property. -On the opened window, _debug_, search _URL of the app_, then delete the port number and past the Postman port. + - On Postman import the collection file rawCMS/docs/RawCMS.postman_collection.json. + - Open any collection and copy the port number from the link (should be 28436). + - Open rawCMS on Visual Studio, on the right in the _solution explorer_, right click on rawCMS, then property. + - On the opened window, _debug_, search _URL of the app_, then delete the port number and paste the Postman port. ## Setup mongoDB -Launch rawCMS on VisualStudio, open MongoDB Compass and press _connect_. -Click on rawCMS->\_configuration, then edit the plugin ending with _AuthPlugin_. -At the entry _adminApiKey_, change the type from null to string and set it to _apikeyadmin_. +- Launch rawCMS on VisualStudio, open MongoDB Compass and press _connect_. +- Click on rawCMS->\_configuration, then edit the plugin ending with _AuthPlugin_. +- At the entry _adminApiKey_, change the type from null to string and set it to _apikeyadmin_. Do the same for _apiKey_ and set it to _apikey_, then _Update_. -Restart the app on Visual Studio. -On Postman click on the collection _create user_, on headers at the entry _Authorization_ delete {{token}} and set it to _Apikey apikeyadmin_. -On the body, change _name_ (example: "alice"), _newPassword_ (example: "alice") and set roles to _"Admin"_, then _send_. +- Restart the app on Visual Studio. +- On Postman click on the collection _create user_, on headers at the entry _Authorization_ delete {{token}} and set it to _Apikey apikeyadmin_. +- On the body, change _name_ (example: "alice"), _newPassword_ (example: "alice") and set roles to _"Admin"_, then _send_. -## start front-end application +## Start front-end application -Open raw-cms-app under project root directory inside VSCode, open an inline terminal and run npm i (this should be done only once). When finished, run npm run serve to start the FE app. +- Open raw-cms-app under project root directory inside VSCode. +- Open an inline terminal and run `npm i` (this should be done only once). +- Run `npm run server` to start the FE app. diff --git a/docs/Tutorial.md b/docs/Tutorial.md index 0ac59d8c..ce9a62ee 100644 --- a/docs/Tutorial.md +++ b/docs/Tutorial.md @@ -1,11 +1,11 @@ # Tutorial -After have been followed the [installation procedure](Deploy) (docker, docker-compose, Heroku or Kubernetes) RawCms is ready to use. +Having followed the [installation procedure](Deploy) (docker, docker-compose, Heroku or Kubernetes) RawCms is ready to use. ## How to create an user Open raw-cms-app under project root directory inside VSCode, open an inline terminal and run npm run serve to start the FE app. Login with the default credentials (admin: "bob", password: "XYZ"), then open the left menu and click on Users. -Press on plus-button and in the opened editor create an user, for example: +Press on plus-button and in the opened editor create a user, for example: ``` { "UserName": "joe", @@ -14,16 +14,16 @@ Press on plus-button and in the opened editor create an user, for example: "Roles": ["Admin"] } ``` -NewPassword field is write-only and set the new password. +NewPassword field is editable and sets the new password. -[![Picture of a comptuer screen showing a graph](http://img.youtube.com/vi/FuLP8WdUbew/0.jpg)](http://www.youtube.com/watch?v=FuLP8WdUbew) +[![Picture of a computer screen showing a graph](http://img.youtube.com/vi/FuLP8WdUbew/0.jpg)](http://www.youtube.com/watch?v=FuLP8WdUbew) ## How to edit an entity -Open the left menu and click on Entities, press on the plus-button and give a name to the collection. -For add a field click on **Add new field**, choose a name, a type and characterisitcs. -When all the field have been created, save and click on Collection on left menu. -Choose the corresponding collection, click on the plus-button and populate the collection. +Open the left menu and click on Entities, click on the plus-button(+) and give a name to the collection. +For add a field click on **Add new field**, choose a name, a type and characteristics. +When all the fields have been created, save and click on Collection on left menu. +Choose the corresponding collection, click on the plus-button(+) and populate the collection. [![Blank form fields displayed on a computer screen](http://img.youtube.com/vi/omCS6M-WD80/0.jpg)](http://www.youtube.com/watch?v=omCS6M-WD80) @@ -36,8 +36,8 @@ Check the documentation of GraphQL (https://rawcms.readthedocs.io/en/latest/Grap ## Swagger Edit -Click on **Auth-Get Token**, on Body change username and password according with your settings, then send request. +Click on **Auth-Get Token**, on Body change username and password according to your settings, then send request. Copy the value of **"access_token**, then click on CRUD-GET. -Change the path of the url (example: http://localhost:28436/api/CRUD/Test), on Authorization change the type in **Bearer Token** and paste on Token the value copied first, now send. +Change the path of the url (example: http://localhost:28436/api/CRUD/Test), on Authorization change the type in **Bearer Token** and paste on Token the value copied first, the click send. [![Postman, a program that tests APIs](http://img.youtube.com/vi/vXEMtzfSk0U/0.jpg)](http://www.youtube.com/watch?v=vXEMtzfSk0U)