Skip to content

Commit

Permalink
First commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
kastorcode committed Sep 4, 2021
0 parents commit 7b2c387
Show file tree
Hide file tree
Showing 35 changed files with 11,569 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
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
38 changes: 38 additions & 0 deletions .eslintrc.js
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'
}
};
23 changes: 23 additions & 0 deletions .gitignore
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*
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
78 changes: 78 additions & 0 deletions README.md
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
Binary file added assets/gostack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions json-server/index.json
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"
}
]
}
55 changes: 55 additions & 0 deletions package.json
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"
}
}
13 changes: 13 additions & 0 deletions public/index.html
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>
Binary file added screenshots/1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions src/App.js
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;
11 changes: 11 additions & 0 deletions src/assets/images/background.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions src/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/components/Header/index.js
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>
);
}
Loading

0 comments on commit 7b2c387

Please sign in to comment.