Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
91a5d7d
item card and style sheet
afreensafdar Sep 15, 2021
1f9f76f
Temporary Card Format
RSalcido2019 Sep 15, 2021
be2c7ab
Merge pull request #1 from afreensafdar/cards
jjliem Sep 15, 2021
70020ab
add navbar, footer, cards, resize
jjliem Sep 15, 2021
18b8271
Merge pull request #2 from afreensafdar/judith
jjliem Sep 16, 2021
de61715
Update .gitignore
jjliem Sep 16, 2021
124971c
Delete package-lock.json
jjliem Sep 16, 2021
42a04b3
add cart component
jjliem Sep 16, 2021
51769b0
Merge pull request #3 from afreensafdar/judith
jjliem Sep 16, 2021
1be008b
Coffee branch pushing
mushfikaraisa Sep 17, 2021
ebd6e95
coffee models
afreensafdar Sep 17, 2021
37da89f
Merge pull request #4 from afreensafdar/Coffee
jjliem Sep 17, 2021
277b769
item coffee
afreensafdar Sep 17, 2021
939d433
Update plant.json
mushfikaraisa Sep 17, 2021
a077a81
app.js coffee
afreensafdar Sep 17, 2021
f05c67a
Merge branch 'main' into Viewplant
afreensafdar Sep 17, 2021
e10a302
set plants and coffees
afreensafdar Sep 17, 2021
a71fad9
Merge pull request #5 from afreensafdar/Viewplant
afreensafdar Sep 17, 2021
5379de4
Incomplete routes
RSalcido2019 Sep 17, 2021
d17948d
Merge pull request #6 from afreensafdar/routes
jjliem Sep 17, 2021
b429270
React Routes
RSalcido2019 Sep 20, 2021
81fe34f
Merge pull request #7 from afreensafdar/routes
jjliem Sep 20, 2021
c2828ac
component create
afreensafdar Sep 20, 2021
e2c3902
hover
RSalcido2019 Sep 20, 2021
f30af85
Merge pull request #8 from afreensafdar/hover
jjliem Sep 20, 2021
3ed34c7
add icon hover
jjliem Sep 20, 2021
e4e90fa
Merge pull request #9 from afreensafdar/icons
jjliem Sep 20, 2021
81a8544
Merge branch 'main' into singleitemview
afreensafdar Sep 20, 2021
5fe416c
single plant view
afreensafdar Sep 20, 2021
f6f12eb
Merge pull request #10 from afreensafdar/singleitemview
afreensafdar Sep 20, 2021
b5cf7d6
add 3 hover icons
jjliem Sep 21, 2021
482d553
Merge pull request #11 from afreensafdar/icons
jjliem Sep 21, 2021
bdc1c00
single plant css and lighthouse
afreensafdar Sep 21, 2021
ad50abb
accessible edits
afreensafdar Sep 21, 2021
8bd3105
add alt and aria labels in Item.js
jjliem Sep 21, 2021
d14bef1
add aria labels to Cart.js and Navbar.js
jjliem Sep 21, 2021
784be1e
Accessbility changes
RSalcido2019 Sep 21, 2021
8e42d61
Merge pull request #12 from afreensafdar/Accessbility
jjliem Sep 21, 2021
b7e932a
merge conflict resolved
afreensafdar Sep 21, 2021
d4387ad
item display and css
afreensafdar Sep 21, 2021
804abc3
button works
afreensafdar Sep 21, 2021
26f29ec
add CartSideBar.js
jjliem Sep 21, 2021
b4aed5d
Merge pull request #13 from afreensafdar/singledisplay
jjliem Sep 21, 2021
81e2046
rating and icons add
afreensafdar Sep 21, 2021
c985a8f
homepage template
RSalcido2019 Sep 22, 2021
80e43c2
add ItemContainer and SingleItemContainer tests
jjliem Sep 22, 2021
b50262a
Merge pull request #14 from afreensafdar/testing
jjliem Sep 22, 2021
695330d
Merge branch 'main' into cartsidebar
jjliem Sep 22, 2021
512c1d5
merge conflict
RSalcido2019 Sep 22, 2021
9d00954
Merge branch 'main' into coffeesingleview
afreensafdar Sep 22, 2021
7a41a21
add cart badge counter and css
jjliem Sep 22, 2021
7e31b6f
Merge pull request #15 from afreensafdar/cartsidebar
jjliem Sep 22, 2021
603f7a3
Homepage
RSalcido2019 Sep 22, 2021
52e61a3
image size edit
afreensafdar Sep 22, 2021
40f83db
Merge branch 'main' into coffeesingleview
afreensafdar Sep 22, 2021
7699f82
merge
RSalcido2019 Sep 22, 2021
6d193f9
coffee and plant single display
afreensafdar Sep 22, 2021
efd06cc
Merge pull request #16 from afreensafdar/coffeesingleview
afreensafdar Sep 22, 2021
97f30fd
homepage changes
RSalcido2019 Sep 22, 2021
e99ba13
Merge pull request #17 from afreensafdar/homepage
jjliem Sep 22, 2021
bb88814
payment form add
afreensafdar Sep 23, 2021
edd9352
Merge pull request #18 from afreensafdar/Form
afreensafdar Sep 23, 2021
561d612
coffee image edit
afreensafdar Sep 23, 2021
ff40c62
Merge pull request #19 from afreensafdar/productjason
afreensafdar Sep 23, 2021
057a8d7
change checkout btn, add product banner
jjliem Sep 23, 2021
b98919f
Merge branch 'main' into minor
jjliem Sep 23, 2021
da8b5ba
remove horiz scroll
jjliem Sep 23, 2021
2f599ad
homepage css
RSalcido2019 Sep 23, 2021
837239c
change prices
jjliem Sep 23, 2021
e7d0ef0
Merge pull request #20 from afreensafdar/minor
jjliem Sep 23, 2021
6e142ab
css
afreensafdar Sep 23, 2021
9727065
merge conflicts
RSalcido2019 Sep 23, 2021
71e9282
Final push for homepagecss
RSalcido2019 Sep 23, 2021
9b8bc00
Merge pull request #21 from afreensafdar/homepagecss
jjliem Sep 23, 2021
096e32f
add object-fit: cover to slide-image css
jjliem Sep 23, 2021
1a924ac
edit css form
afreensafdar Sep 23, 2021
f8cf4ae
Merge branch 'main' into cssform
afreensafdar Sep 23, 2021
95663a1
form submit
afreensafdar Sep 24, 2021
8a2e3f6
form edit
afreensafdar Sep 24, 2021
868c421
form centered
afreensafdar Sep 24, 2021
bbb6ca8
Merge pull request #22 from afreensafdar/cssform
afreensafdar Sep 24, 2021
1b3b12b
Update README.md
afreensafdar Sep 24, 2021
c12ac2f
redo snapshot test
jjliem Sep 24, 2021
22ae855
Merge branch 'main' of https://github.com/afreensafdar/swe-mod1-app-s…
jjliem Sep 24, 2021
5ed6617
add clear cart functionality
jjliem Sep 24, 2021
2c7a05a
adds favorite tab and functionality
jjliem Jan 20, 2022
1f00003
Merge pull request #23 from jjliem/favorites
jjliem Jan 20, 2022
aae3149
Update README.md
afreensafdar May 4, 2022
e883a8f
Add files via upload
afreensafdar May 4, 2022
47e524d
Update README.md
afreensafdar May 4, 2022
e759003
Update README.md
afreensafdar May 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ dist
.tern-port

#sqlite
*.sqlite
*.sqlite

#other
package-lock.json
178 changes: 169 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,169 @@
# swe-inventory-app-starter
React Boilerplate code for SWE Mod-1 Project

## How to use
1. Fork this repo
2. `npm install`
3. `npm start`
4. In a seperate terminal, `npm run start-dev`
5. Find your bliss!
# PLANTSHED

A React Project built for Mod 1 covering React forms, react-router, and responsive CSS. This project was also expanded in Mod 3 to practice CI/CD using Docker and AWS.

---

## Table of contents

- [Introduction](#introduction)
- [Competencies](#competencies)
- [Demo](#demo)
- [Technologies](#technologies)
- [Setup](#setup)
- [Features](#features)
- [Documentation](#documentation)
- [Contact](#contact)

---

## Introduction

PlantShed is one of the most popular plantstores in NYC. Not only do they sell a wide variety of houseplants and flowers, they have a local coffeeshop where customers can enjoy a fresh brew before shopping. PlantShed expands into the e-commerce space, where customers can view the inventory of plants, flowers, and coffeebeans and shop from home.

---

## Competencies

#JF 1.5
- Knows how teams work effectively to produce software and how
to contribute appropriately

#JF 3.3
- Understands how to develop effective user interfaces

#JF 5.1
- Knows relevant and up-to-date software testing frameworks and
methodologies

#JF 6.2
- Understands how to follow company, team or client approaches to
continuous integration, version and source control

---

## Demo

<h1 align="center">
Plantshed |E-commerce Application.
</h1>

<div align="center">

![Plant shed](./demo.gif)

An app made with the help of React.js.

</div>



---

## Screenshots

* Plant Product Page:

![5.png](pic10.jpg)

* Description Page:

![1.png](pic4.png)

* Favorite Page:

![2.png](pic3.png)

* Coffee Product Page:

![4.png](pic7.png)

* Login Page:

![3.png](pic2.png)


* Shopping Cart Page:

![4.png](pic5.png)


* Payment Form Page:

![3.png](pic6.png)



---


## Technologies

- React - version 17.0.2
- Node.js - version 14.15.4
- Express.js - version 4.17.1
- Docker
- AWS Amazon S3

---

## Setup

To run this project, install it locally using npm:

```
cd plantshed
$ npm install
$ npm start
```
Then in a parallel terminal:
```
$ npm run start-dev
```

---

## Features

Users should be able to:
- sign up and sign in with the login form
- view plant and coffee inventory
- add and remove products from a shopping cart
- view more information about a product on a single view page
- favorite plants and coffee and view them in a favorites tab
- enter credit card and shipping information with the checkout form

Stretch Goals:

- Deploy the app on Heroku
- Add unit tests in Jest
- Add email notifications when items are left in shopping cart
- Add out of stock alert when items go out of stock
- Add Stripe payment

---

# Documentation

CI/CD Docker/AWS: [Documentation](https://docs.google.com/document/d/1slL3HBzbyACMiKK8fbBxgoZxzzHoYpz4Q1bb61ARbpo/edit?usp=sharing)

How to create branch and pull request:

- `git checkout -b newbranchname` (create a new branch for each issue)
- `git branch` (To confirm which branch you are on)
- `git add .` (To add all the changed files)
- `git status` (To check the status of the files)
- `git commit -m "message"`
- `git push -upstream newbranchname` (To push code)
- Create Pull request
- `git branch -D newbranchname` (To delete branch)
- `git branch -d newbranchname`
- `git merge main` (when in new branch)

---

## Contact

- [Judith Liem](https://github.com/jjliem)
- [Afreen S Mohammed](https://github.com/afreensafdar)
- [Ricardo Salcido](https://github.com/RSalcido2019)
17 changes: 10 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const express = require('express');

const {sequelize} = require('./db');
const {Sauce} = require('./models');
const {Product} = require('./models/index');



const seed = require('./seed')

Expand All @@ -23,16 +25,17 @@ app.use(express.static('public'));

seed();

app.get('/sauces', async (req, res) => {
const sauces= await Sauce.findAll()
res.json(sauces)
app.get('/products', async (req, res) => {
const products= await Product.findAll()
res.json(products)
})

app.get('/sauces/:id', async (req, res) => {
const sauce = await Sauce.findByPk(req.params.id)
res.json({sauce})
app.get('/products/:id', async (req, res) => {
const product = await Product.findByPk(req.params.id)
res.json({product})
})


app.listen(PORT, () => {
sequelize.sync({force: true});
console.log(`Your server is running on http://localhost:${PORT}`);
Expand Down
Binary file added demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 13 additions & 7 deletions models/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
const {Sequelize, DataTypes, Model} = require('sequelize')
const {sequelize} = require('../db')
const { Sequelize, DataTypes, Model } = require("sequelize");
const { sequelize } = require("../db");

class Product extends Model {}

class Sauce extends Model {}
Product.init(

Sauce.init({
{
name: DataTypes.STRING,
image: DataTypes.STRING,
}, {
price: DataTypes.DECIMAL,
type: DataTypes.STRING,
description: DataTypes.STRING,
},
{
sequelize,
timestamps: false,
});
}
);

module.exports = {Sauce};
module.exports = { Product };
Loading