Skip to content

Rotary club of Kelowna Firewood sales website

Notifications You must be signed in to change notification settings

amurph24/Group-C---Camp-OAC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Group-C---Camp-OAC

COSC 499 Capstone Project a MobileFriendly website to automate the process of obtaining campfire wood
This automation process looks like:
(1) user views advertisement on Facebook or any other site;
(2) clicks link/hotspot and is directed to our wood sales web site (to be created as part of this project);
(3) chooses their general location ie. West Kelowna, Mission, Rutland etc... and number of bags of firewood desired;
(4) purchaser receives an invoice that is produced based on pricing and quantity desired,
(5) Payment is processed Receipt is generated automatically.
(6) instructs purchaser on address where firewood is available for pickup;

Group Members:

Zach Prenovost
Aidan Murphy
Cam Wilson
Karlen Speiser

Task Prioritization List

Check out our Gantt chart here

Tech Stack Installation:

Node.js:

Download Node.js from here

In your Node server file(backend), create new package.json file with:

npm init -y

Use npm to install the following dependencies:

npm install express cors mongoose dotenv axios jsonwebtoken joi joi-password-complexity bcrypt 

Express: middleware for MERN stack, provides robust functions for Node.js
Cors: permits AJAX requests from the remote host
Mongoose: helps node server interact with MongoDB
Dotenv: help loading environment variables

Install nodemon, which auto restarts node app during development:

npm install -g nodemon

See MERN Scripts/backend for use of the libraries

React:

In your main project folder(MERN Scripts), create React.js application:

npx create-react-app mern-emsystem

Navigate to mern-emsystem directory, start the web server:

npm start

MongoDB:

To link the database to your Node.js server, create a .env in the Node server file
Use the connection string with the appropriate username and password to connect

Square Payments

To handle credit and debit purchases, the following must be installed:

npm install react-square-web-payments-sdk
npm install square

Node Mailer

click here for node mailer documentation

In the backend folder, install nodemailer

npm install nodemailer
npm install express-pino-logger
npm install twilio --save-dev
npm install --save @sendgrid/mail
npm install promise

You will need to add necessary token to .env file

Jest:

click here for info from developers

npm install --save-dev jest

create test files using naming convention:

name.test.js

format package.json file appropriately

{
  "scripts": {
    "test": "jest"
  }
}

run

npm test

in code directory

Optional features:

Concurrent execution of node server and react project:

navigate to the root directory of your project ('MERN Scripts'), which should contain the 'Backend' and 'mern-emsystem' folders, and start another node project:

npm init

install the package: Concurrently When prompted, otherwise press return for all other prompts.

Run the react project and launches the node server with one command:

npm run dev

API set-up

Links to create developer accounts for each API:

  1. Square: https://squareup.com/signup?v=developers&country_code=ca&lang_code=en-CA
  2. Twilio: https://www.twilio.com/try-twilio
  3. SendGrid: https://signup.sendgrid.com/

Populating MongoDB employees collection

The following document contains BSON which will be used to create a new document in the Employees collection inside of the MongoDB database.

super-admin-login.txt

About

Rotary club of Kelowna Firewood sales website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.9%
  • CSS 16.2%
  • HTML 0.9%