Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinjude committed Nov 28, 2021
0 parents commit a568095
Show file tree
Hide file tree
Showing 36 changed files with 7,891 additions and 0 deletions.
Binary file added .github/images/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cache
dist
node_modules
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cache
dist
node_modules
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions .sassrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"includePaths": ["node_modules"]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Jude Agboola

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.
107 changes: 107 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# BookClub

A minimal book store site built in Pure JS, HTML & CSS

<!-- Screenshot -->
![image](.github/images/screenshot.png)


## Demo

https://dbookclub.netlify.app/

## Installation

Start by installing the dependencies with yarn or npm

npm

```
$ npm install
```

yarn

```
$ yarn
```

## Run Application

This application uses parcel bundler, to test this app you can spin up a development server by running:

```
yarn dev
```

The app should be live on [http://localhost:1234](http://localhost:1234) 🎉

**Note**: Make sure you have gone through the installation process explained above 👆

## Assumtions

This is a book club app where users can search for books, see details about different book, see if a book is available for borrwowing or if it's borrowed out.

## Uncovered Requirments

NIL

## Build for Producion

You can build this app for production by running

```
yarn build
```

## Challenges Faced

NIL

## Ways to Improve this assesment

- The assesment looks pretty neat, however we can go a step further by asking candidates to implement some sort of micro intraction on the page, this may help test how creative they are when it comes to crafting solid user expereinces.

# Others Details

## Data separation over hardcoding

Ideally, applications usually have data layers - APIs, this application is modeled close to that. Only that the data in sitted in the application itself.

## Componentization

I'm a huge fan of components especially because they are easy to reason about when building apps. This application does some form of componentization.. Somtething like a React component. I wrote components like `Book`, `FeaturedBook` ...

Here's an example of one of them - `StarRating.js`

```
/**
* @param {number} rating - The star rating - e.g StarRating(4), StarRating(5)
* @returns {string} A template based on the number of rating passed
*/
function StarRating(rating) {
const getStar = (filled) => `
<svg width="13" height="11" viewBox="0 0 13 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.41391 0L8.28908 3.62102L12.4526 4.19917L9.43325 7.01383L10.1484 11L6.41391 9.12863L2.67947 11L3.39458 7.01383L0.375244 4.19917L4.55464 3.62102L6.41391 0Z" fill=${
filled ? "#EBA430" : "#DDDDDD"
}><path>
</svg>`;
let template = "";
//Add Filled stars
for (let i = 0; i < rating; i++) {
template = template + getStar(true);
}
//Add Unfilled stars
for (let i = 0; i < 5 - rating; i++) {
template = template + getStar(false);
}
return template;
}
export default StarRating;
```
Loading

0 comments on commit a568095

Please # to comment.