Skip to content

Commit

Permalink
chore: styling and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
w-arantes committed Mar 27, 2020
1 parent ca722b0 commit 7d223d2
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/node_modules
/.pnp
.pnp.js
.vscode
/vscode

# testing
/coverage
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -m 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`

**After your pull request is merged**, you can safely delete your branch.
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@


Copyright 2020 - Wellington Arantes

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<h1 align="center">
<br>
<img src="src/assets/images/logo-purple.svg" alt="GoBarber" width="90">
<br>
<br>
GoBarber
</h1>

<p align="center">GoBarber - WebApp</p>
<p align="center">Project based on a scheduling service for barbers promoting control, organization and convenience to their customers.</p>

![App Screenshot](https://res.cloudinary.com/w-arantes/image/upload/v1585270969/login_page_zv5euf.png)

![App Screenshot](https://res.cloudinary.com/w-arantes/image/upload/v1585270961/dashboard_aodv9j.png)

![App Screenshot](https://res.cloudinary.com/w-arantes/image/upload/v1585270956/profile_gskf59.png)

<p align="center">
<a href="http://makeapullrequest.com">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs Welcome">
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="License MIT">
</a>
</p>

<hr />

## **Software Architecture**

This app features all the latest tools and good practices in web development.

-**React** — A library to build user interfaces
-**Redux with Redux Saga** — State management with middleware
- 💅 **CSS** — styled-components
- 🌸 **Reactotron** - Helps debugging process
- 💖 **Lint** — ESlint/Prettier/Editor Config

## **Libraries**

Libraries featured in this project.

- [**Express**](https://expressjs.com/pt-br/) — Micro framework (HTTP/REST) for NodeJS.
- [**Bcryptjs**](https://www.npmjs.com/package/bcryptjs) — Security passwords salty encode.
- [**Bee-queue**](https://github.com/bee-queue/bee-queue) — Job/task queue for NodeJS.
- [**Sequelize**](https://sequelize.org/) — SQL Dialect/ORM for NodeJS.
- [**Nodemailer**](https://nodemailer.com/about/) — Library to send e-mails with NodeJS.
- [**Yup**](https://github.com/jquense/yup) — Object schema validator.
- [**Sentry**](https://sentry.io/) — Cross-platform application monitoring.
- [**Date-fns**](https://date-fns.org/) — Library to easily manipulate date's with NodeJS.
- [**Dotenv**](https://www.npmjs.com/package/dotenv) — Library to manipulate variables about the application.
- [**Jsonwebtoken**](https://www.npmjs.com/package/jsonwebtoken) — Security authentication using JWT
- [**Mongoose**](https://www.npmjs.com/package/mongoose) — NoSQL Dialect/ODM(MongoDB) for NodeJS
- [**Multer**](https://www.npmjs.com/package/multer) — Middleware library to multipart/form-data
- [**Youch**](https://www.npmjs.com/package/youch) — A strucuture HTML/JSON for errors
- [**Cors**](https://github.com/expressjs/cors) — Package for providing a Connect/Express middleware

## **Getting Started**

_Before you run this application you need to make sure the [server](https://github.com/w-arantes/gobarber-backend) is running!_.

1. Clone this repo using `https://github.com/w-arantes/gobarber-web.git`
2. Move to the appropriate directory: `cd gobarber`.<br />
3. Run `yarn` to install dependencies.<br />
4. Run `yarn start` to see the example app at `http://localhost:3000`.

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.
5 changes: 2 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="~/assets/logo.svg" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#7159c1" />

<title>Gobarber - Web</title>
<title>GoBarber Web</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function Header() {
<Content>
<nav>
<img src={logo} alt="GoBarber" />
<Link to="/dashboard">DASHBOARD</Link>
<Link to="/dashboard">DASHBOARD | AGENDAMENTOS</Link>
</nav>

<aside>
Expand Down
6 changes: 5 additions & 1 deletion src/pages/Dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
setHours,
setMinutes,
setSeconds,
setMilliseconds,
isBefore,
isEqual,
parseISO,
Expand Down Expand Up @@ -36,7 +37,10 @@ export default function Dashboard() {
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;

const data = range.map(hour => {
const checkDate = setSeconds(setMinutes(setHours(date, hour), 0), 0);
const checkDate = setMilliseconds(
setSeconds(setMinutes(setHours(date, hour), 0), 0),
0
);
const compareDate = utcToZonedTime(checkDate, timezone);

return {
Expand Down
92 changes: 0 additions & 92 deletions src/pages/Dashboard/indexbc

This file was deleted.

12 changes: 2 additions & 10 deletions src/pages/Dashboard/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,22 @@ import styled from 'styled-components';
export const Container = styled.div`
max-width: 600px;
margin: 50px auto;
display: flex;
flex-direction: column;
header {
display: flex;
align-self: center;
align-items: center;
button {
border: 0;
background: none;
}
strong {
color: #fff;
font-size: 24px;
margin: 0 15px;
}
}
ul {
display: grid;
grid-template-columns: repeat(2, 1fr);
Expand All @@ -36,19 +31,16 @@ export const Time = styled.li`
padding: 20px;
border-radius: 4px;
background: #fff;
opacity: ${props => (props.past ? 0.6 : 1)};
strong {
display: block;
color: ${props => (props.available ? '#999' : '#7159c1')};
font-size: 20px;
font-weight: normal;
font-weight: bold;
}
span {
display: block;
margin-top: 3px;
color: ${props => (props.available ? '#666' : '#7159c1')};
color: ${props => (props.available ? '#999' : '#666')};
}
`;
25 changes: 11 additions & 14 deletions src/styles/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,35 @@ import 'react-toastify/dist/ReactToastify.css';
import 'react-perfect-scrollbar/dist/css/styles.css';

export default createGlobalStyle`
@import url('https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lato:400,700&display=swap');
* {
margin: 0;
padding: 0;
outline: none;
outline: 0;
border: 0;
box-sizing: border-box;
}
*:focus {
outline: none;
outline: 0;
}
body, html {
height: auto;
html,body, #root {
height: 100%;
}
body {
-webkit-font-smoothing: antialiased;
}
body, input, button {
font: 14px 'Roboto', sans-serif;
font: 14px 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a {
text-decoration: none;
}
ul {
list-style: none;
}
button {
cursor: pointer;
font-size: 16px;
}
hr {
border: 0;
height: 1px;
background: rgba(255, 255, 255, 0.2);
margin: 10px 0 20px;
ul {
list-style: none;
}
`;

0 comments on commit 7d223d2

Please sign in to comment.