-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7b2c387
Showing
35 changed files
with
11,569 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es6: true, | ||
}, | ||
extends: ['airbnb', 'prettier', 'prettier/react'], | ||
globals: { | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly', | ||
}, | ||
parser: 'babel-eslint', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: 2018, | ||
sourceType: 'module', | ||
}, | ||
plugins: [ | ||
'react', | ||
'prettier', | ||
'react-hooks' | ||
], | ||
rules: { | ||
'prettier/prettier': 'error', | ||
'react/jsx-filename-extension': [ | ||
'warn', | ||
{ | ||
extensions: ['.jsx', '.js'], | ||
}, | ||
], | ||
'import/prefer-default-export': 'off', | ||
'no-param-reassign': 'off', | ||
'no-console': ["error", { allow: ["tron"] }], | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
## GoStack Bootcamp Module 7 | ||
|
||
> 🚀 Practical project of the [Rocketseat](https://rocketseat.com.br) GoStack Bootcamp. | ||
👷 Developed by Matheus Ramalho de Oliveira. | ||
🔨 Systems Analyst, Full-Stack Developer. | ||
🏡 Goiânia, Goiás, Brasil. | ||
✉️ [email protected] | ||
👍 [instagram.com/kastorcode](https://www.instagram.com/kastorcode) | ||
|
||
--- | ||
|
||
<p align="center"> | ||
<img src="assets/gostack.png" /> | ||
</p> | ||
|
||
<p align="center"> | ||
Module 7: Flux Architecture | ||
</p> | ||
|
||
--- | ||
|
||
### Screenshots | ||
|
||
<p align="center"> | ||
<img src="screenshots/1.png" /> | ||
</p> | ||
|
||
<p align="center"> | ||
<img src="screenshots/2.png" /> | ||
</p> | ||
|
||
<p align="center"> | ||
<img src="screenshots/3.png" /> | ||
</p> | ||
|
||
--- | ||
|
||
### 🚀 Installation and execution | ||
|
||
1. Make a clone of this repository; | ||
2. Enter the folder running `cd gostack-module-07`; | ||
3. Run `yarn` to install dependencies; | ||
4. Start the json server running `yarn server`; | ||
5. Run `yarn start` in another terminal to start the development server. | ||
|
||
--- | ||
|
||
### 🗓 ️Roadmap | ||
|
||
- Introduction to Node.js | ||
- Creating Node.js project | ||
- Continuing Node.js project | ||
- CSS Flexbox | ||
- UI Design | ||
- Introduction to React | ||
- First project with ReactJS | ||
- First project with React Native | ||
- Front-end documentation | ||
- Flux architecture | ||
- Using React Hooks | ||
- Server-side rendering(SSR) with ReactJS | ||
- GraphQL | ||
- Expo | ||
- Creating ReactJS project | ||
- Creating React Native project | ||
- Animations with React Native | ||
- Full-stack app development | ||
- Node.js tests | ||
- Node.js deploy | ||
- ReactJS tests | ||
- React Native tests | ||
- ReactJS deploy | ||
- React Native publication | ||
- WebSocket with Express | ||
- Advanced patterns at Node.js | ||
- OmniStack SaaS(software as a service) and AdonisJS | ||
- Final challenge | ||
- Monorepo |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"stock": [ | ||
{ | ||
"id": 1, | ||
"amount": 3 | ||
}, | ||
{ | ||
"id": 2, | ||
"amount": 5 | ||
}, | ||
{ | ||
"id": 3, | ||
"amount": 2 | ||
}, | ||
{ | ||
"id": 4, | ||
"amount": 1 | ||
}, | ||
{ | ||
"id": 5, | ||
"amount": 5 | ||
}, | ||
{ | ||
"id": 6, | ||
"amount": 10 | ||
} | ||
], | ||
"products": [ | ||
{ | ||
"id": 1, | ||
"title": "Tênis de Caminhada Leve Confortável", | ||
"price": 179.9, | ||
"image": "https://rocketseat-cdn.s3-sa-east-1.amazonaws.com/modulo-redux/tenis1.jpg" | ||
}, | ||
{ | ||
"id": 2, | ||
"title": "Tênis VR Caminhada Confortável Detalhes Couro Masculino", | ||
"price": 139.9, | ||
"image": "https://rocketseat-cdn.s3-sa-east-1.amazonaws.com/modulo-redux/tenis2.jpg" | ||
}, | ||
{ | ||
"id": 3, | ||
"title": "Tênis Adidas Duramo Lite 2.0", | ||
"price": 219.9, | ||
"image": "https://rocketseat-cdn.s3-sa-east-1.amazonaws.com/modulo-redux/tenis3.jpg" | ||
}, | ||
{ | ||
"id": 5, | ||
"title": "Tênis VR Caminhada Confortável Detalhes Couro Masculino", | ||
"price": 139.9, | ||
"image": "https://rocketseat-cdn.s3-sa-east-1.amazonaws.com/modulo-redux/tenis2.jpg" | ||
}, | ||
{ | ||
"id": 6, | ||
"title": "Tênis Adidas Duramo Lite 2.0", | ||
"price": 219.9, | ||
"image": "https://rocketseat-cdn.s3-sa-east-1.amazonaws.com/modulo-redux/tenis3.jpg" | ||
}, | ||
{ | ||
"id": 4, | ||
"title": "Tênis de Caminhada Leve Confortável", | ||
"price": 179.9, | ||
"image": "https://rocketseat-cdn.s3-sa-east-1.amazonaws.com/modulo-redux/tenis1.jpg" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"name": "modulo07", | ||
"version": "0.1.0", | ||
"private": true, | ||
"dependencies": { | ||
"axios": "^0.19.0", | ||
"history": "^4.9.0", | ||
"immer": "^3.1.3", | ||
"polished": "^3.4.1", | ||
"react": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"react-icons": "^3.7.0", | ||
"react-redux": "^7.1.0", | ||
"react-router-dom": "^5.0.1", | ||
"react-scripts": "3.0.1", | ||
"react-toastify": "^5.3.1", | ||
"reactotron-react-js": "^3.3.2", | ||
"reactotron-redux": "^3.1.1", | ||
"reactotron-redux-saga": "^4.2.2", | ||
"redux": "^4.0.1", | ||
"redux-saga": "^1.0.5", | ||
"styled-components": "^4.3.2" | ||
}, | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject", | ||
"server": "json-server json-server/index.json -p 3333 -d 1000" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.2%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 1 chrome version", | ||
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "10.0.1", | ||
"eslint": "^5.16.0", | ||
"eslint-config-airbnb": "^17.1.0", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-plugin-import": "^2.18.0", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.14.2", | ||
"eslint-plugin-react-hooks": "^1.6.1", | ||
"prettier": "^1.18.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
||
<title>Rocketshoes</title> | ||
</head> | ||
<body> | ||
<noscript>You need to enable JavaScript to run this app.</noscript> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
import { Router } from 'react-router-dom'; | ||
import { Provider } from 'react-redux'; | ||
import { ToastContainer } from 'react-toastify'; | ||
|
||
import './config/ReactotronConfig'; | ||
|
||
import GlobalStyle from './styles/global'; | ||
import Header from './components/Header'; | ||
import Routes from './routes'; | ||
|
||
import history from './services/history'; | ||
import store from './store'; | ||
|
||
function App() { | ||
return ( | ||
<Provider store={store}> | ||
<Router history={history}> | ||
<Header /> | ||
<Routes /> | ||
<GlobalStyle /> | ||
<ToastContainer autoClose={3000} /> | ||
</Router> | ||
</Provider> | ||
); | ||
} | ||
|
||
export default App; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
import { useSelector } from 'react-redux'; | ||
|
||
import { MdShoppingBasket } from 'react-icons/md'; | ||
|
||
import { Container, Cart } from './styles'; | ||
|
||
import logo from '../../assets/images/logo.svg'; | ||
|
||
export default function Header() { | ||
const cartSize = useSelector(state => state.cart.length); | ||
|
||
return ( | ||
<Container> | ||
<Link to="/"> | ||
<img src={logo} alt="Rocketshoes" /> | ||
</Link> | ||
|
||
<Cart to="/cart"> | ||
<div> | ||
<strong>Meu carrinho</strong> | ||
<span>{cartSize} itens</span> | ||
</div> | ||
<MdShoppingBasket size={36} color="#FFF" /> | ||
</Cart> | ||
</Container> | ||
); | ||
} |
Oops, something went wrong.