Portal that connects teacher peer to peer, and facilitates a letter exchange program between school classes
To get a copy of the project up and running, clone the repo. See deployment for notes on how to deploy the project on a live system.
This project requires that you have the following utilities available globally in your execution environment:
Node
Nodemon
Postgres / psql
When connecting to postgres, you will need to create a db with the name wmp
. You can use the following command to initiate a psql session:
psql
...if this command fails for the following reason psql: FATAL: database "<username>" does not exist
, then you can connect to any existing db and go from there. To get the list of available databases, you can type psql -l
. You should see some output with the list of available dbs. Assuming you have one with the name postgres
, you could run the following command to connect to psql:
psql -d postgres
From there, you should be able to run the following command to create the wmp db:
CREATE DATABASE wmp;
You will also need to create a .env file in the root of the repository. This should be based on the .env.example file that is also located in the root of the repository. You will need to either get accurate values from an Admin of the repo, or create some of your own in order for the app to function as expected.
Run the following commands in order to install the npm dependencies and start the app up locally. This will start a local server, that will connect to your locally running postgres db, and also start up a client and automatically open the client in your browser.
npm install
npm run start:dev
To see the seed data in the database after the startup, connect to the wmp db and go from there, e.g.:
psql -d wmp
select * from [tablename];
BDD Testing
npm run test
Token based login. Email is username and password needed.
Link with token gets sent to email (if email exist in database), and user can reset password by clicking link as long as token remains valid. Sends email notification if password is changed for security measure.
Only emails that have not been registered before. Validates passwords (Minimum 8 characters).
Teacher details: First name, last name, email, phone number
Change password: Requires current password, and sends email notification if password is changed for security measure.
Delete account: GDPR compliant. User can delete all information. Deleting teacher profile will also delete all classes registered by teacher, and set the status of any current exchanges (that are not completed) to ‘cancelled’, and notify the teachers of the exchanging classes via email.
Teacher can register as many classes as they wish, and teacher can manage their enrolled classes in the same teacher profile. Class details: Class name, size, age group (8-9 or 10-11), term School details: School name, address, zip, city, country
The teacher can initiate an exchange for a registered class. This is done on the Overview page. The app will look for a matching class based on the age group and the term. A class will not be matched with a class from the same country. If there are more than one matching class, the app will find the class furthest that has been matched.
When a class is initiates an exchange, there are two possible scenarios:
-
Match is made: If there is a class match, the exchange status will be set to ‘PENDING’, and the two teachers of the exchanging classes will be emailed and given one week to confirm the participation. This can be done on the Overview page by clicking a button that says ‘Confirm Participation’. Once both teachers confirm, the exchange status will be set to ‘CONFIRMED’ and the teachers will be granted access to the materials. The materials will then be available under the main menu. In the case that one of the teachers of a match does not confirm the participation, that class will be removed from that exchange, and the exchange status will be set to ‘INITIATED’ so that the class that did confirm will keep the opportunity to be matched with a different class.
-
A match is not made: If there is not a matching class registered already, the initiating class will be associated with a new exchange and the status will be set to ‘INITIATED’. This means that if another class signs up that matches the criteria, they will be matched with this class.
If a class is enrolled in a confirmed exchange, the teacher will have access to the materials needed. The instructions for each letter as well as a downloadable template can be found on the Materials page.
Basic Q&A. Has a support messaging feature.
AWS EC2 instance, RDS/PostgreSQL database, S3 data storage
- Express - The web framework used
- JavaScript - Programming language
- React - JavaScript Library used
- Redux - State container management
- PostgreSQL - Relational database
- Sequelize - Object relational mapping system
- Semantic UI - Frontend development framework
- Sass - CSS extension language
- Webpack - Module bundler
We welcome any feedback, on product or code or both! Please email exhange@wemakepeace.org
- Kris Alnes - Initial work - kjalnes
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details