diff --git a/DOCUMENT.md b/DOCUMENT.md new file mode 100644 index 0000000..258e87d --- /dev/null +++ b/DOCUMENT.md @@ -0,0 +1,37 @@ +# XP-System Documentation +Before learning how to use this software. Be sure to set up the site by reading `README.md`. +Once you have completed the setup and are ready to use the software follow theses steps: + +1. [Making a site Admin](#Setting-up-site-Admin). +2. [Registering a Teacher](#Register-a-Teacher) + +### Register a Teacher +The site needs a Teacher for managing classes/assignments within those classes. +To create a Teacher: + +1. Have your site Admin login +2. To the right of the page is the main panel. Click the `Create Teacher` button. +![create teacher button](/DocsPrieview/teacher-create.png) + +### Setting up site Admin +There is no default site admin so you will need to set one up. +To set up a site Admin: + +1. You'll need to create the site admin in the database in a collection called users, +and insert a document via MongoDB Compass. Format the document as shown: +`{ + "role": "Admin", + "name": your name, + "email": your email, + "password": your encrypted password + }` + +2. Replace `your name` with the name you specify, `your email` with the email you would like to use to login, and replace `your encrypted password` with your [Encrypted Password](#Encrypting-Your-Password) + +The ID for your admin document should be auto generated by MongoDB Compass when you `insert` the document. + +It's that easy! Now that the site Admin has been created the software is ready to use. + +### Encrypting Your Password +1. To encrypt your password while creating the admin account. Go into the `config` folder, +1. follow the instructions in encrypt.js and run encrypt.js via node `node encrypt.js` diff --git a/DocsPreview/teacher-create.png b/DocsPreview/teacher-create.png new file mode 100644 index 0000000..03c2732 Binary files /dev/null and b/DocsPreview/teacher-create.png differ