Skip to content

Commit

Permalink
genArch
Browse files Browse the repository at this point in the history
  • Loading branch information
reddy-epk committed Mar 21, 2024
0 parents commit 3da3dbc
Show file tree
Hide file tree
Showing 26 changed files with 15,788 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
coverage
build
60 changes: 60 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"env": {
"browser": true,
"es2021": true
},
"parser": "babel-eslint",
"extends": ["react-app", "airbnb", "prettier"],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["prettier"],
"overrides": [
{
"files": ["styledComponents.js"],
"rules": {
"import/prefer-default-export": "off"
}
}
],
"rules": {
"prettier/prettier": "error",
"react/jsx-filename-extension": [1, {"extensions": [".js", ".jsx"]}],
"react/state-in-constructor": "off",
"react/react-in-jsx-scope": "off",
"react/jsx-uses-react": "off",
"no-console": "off",
"react/prop-types": "off",
"jsx-a11y/label-has-associated-control": [
2,
{
"labelAttributes": ["htmlFor"]
}
],
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-noninteractive-element-interactions": [
"off",
{
"handlers": ["onClick"]
}
],
"react/prefer-stateless-function": [
0,
{
"ignorePureComponents": true
}
],
"no-unused-vars": "warn",
"jsx-a11y/alt-text": 1,
"react/no-unused-state": "warn",
"react/button-has-type": "warn",
"react/no-unescaped-entities": "warn",
"react/jsx-props-no-spreading": "off",
"operator-assignment": ["warn", "always"],
"radix": "off"
}
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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*

.idea/
.eslintcache
.vscode/
.results
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
registry=https://registry.npmjs.org/
package-lock=true
save-exact=true
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
coverage
build
26 changes: 26 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"arrowParens": "avoid",
"bracketSpacing": false,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 80,
"overrides": [
{
"files": "*.md",
"options": {
"printWidth": 1000
}
}
],
"proseWrap": "always",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"useTabs": false
}
149 changes: 149 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
In this project, let's build an **App Store** by applying the concepts we have learned till now.

### Refer to the image below:

<br/>
<div style="text-align: center;">
<img src="https://assets.ccbp.in/frontend/content/react-js/app-store-output.gif" alt="app store output" style="max-width:90%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)">
</div>
<br/>

### Design Files

<details>
<summary>Click to view</summary>

- [Extra Small (Size < 576px) and Small (Size >= 576px)](https://assets.ccbp.in/frontend/content/react-js/app-store-sm-output-v2.png)
- [Medium (Size >= 768px), Large (Size >= 992px) and Extra Large (Size >= 1200px)](https://assets.ccbp.in/frontend/content/react-js/app-store-lg-output-v2.png)

</details>

### Set Up Instructions

<details>
<summary>Click to view</summary>

- Download dependencies by running `npm install`
- Start up the app using `npm start`
</details>

### Completion Instructions

<details>
<summary>Functionality to be added</summary>
<br/>

The app must have the following functionalities

- Initially, the **Social** tab should be active and the apps with **Social** as their category should be displayed
- When a value is provided in the search input
- The apps in the active category, that include search input value in their name should be displayed
- When another tab is clicked, the apps in the corresponding category, that include search input value in their name should be displayed
- The search should be case insensitive
- When the search input is empty,
- All the apps in the active category should be displayed
- When another tab is clicked, the apps in the corresponding category should be displayed
- The `AppStore` component is provided with `tabsList`. It consists of a list of tabItem objects with the following properties in each tabItem object

| Key | Data Type |
| :---------: | :-------: |
| tabId | String |
| displayText | String |

- The `AppStore` component is provided with `appsList`. It consists of a list of app objects with the following properties in each app object

| Key | Data Type |
| :------: | :-------: |
| appId | Number |
| appName | String |
| imageUrl | String |
| category | String |

</details>

<details>
<summary>Components Structure</summary>

<br/>
<div style="text-align: center;">
<img src="https://assets.ccbp.in/frontend/content/react-js/app-store-component-structure-breakdown.png" alt="app store component structure breakdown" style="max-width:100%;box-shadow:0 2.8px 2.2px rgba(0, 0, 0, 0.12)">
</div>
<br/>

</details>

<details>
<summary>Implementation Files</summary>
<br/>

Use these files to complete the implementation:

- `src/components/AppStore/index.js`
- `src/components/AppStore/index.css`
- `src/components/TabItem/index.js`
- `src/components/TabItem/index.css`
- `src/components/AppItem/index.js`
- `src/components/AppItem/index.css`

</details>

### Quick Tips

<details>
<summary>Click to view</summary>
<br>

- You can use the `cursor` CSS property to specify the mouse cursor to be displayed when pointing over an element

```
cursor: pointer;
```

<br/>
<img src="https://assets.ccbp.in/frontend/content/react-js/cursor-pointer-img.png" alt="cursor pointer" style="width:100px" />

- You can use the below `outline` CSS property for buttons and input elements to remove the highlighting when the elements are clicked

```
outline: none;
```

</details>

### Resources

<details>
<summary>Image URLs</summary>

- [https://assets.ccbp.in/frontend/react-js/app-store/app-store-search-img.png](https://assets.ccbp.in/frontend/react-js/app-store/app-store-search-img.png) alt should be **search icon**

</details>

<details>
<summary>Colors</summary>

<br/>

<div style="background-color: #fff1eb; width: 150px; padding: 10px; color: black">Hex: #fff1eb</div>
<div style="background-color: #ace0f9; width: 150px; padding: 10px; color: black">Hex: #ace0f9</div>
<div style="background-color: #1e293b; width: 150px; padding: 10px; color: white">Hex: #1e293b</div>
<div style="background-color: #7b8794; width: 150px; padding: 10px; color: white">Hex: #7b8794</div>
<div style="background-color: #dfe2e5; width: 150px; padding: 10px; color: black">Hex: #dfe2e5</div>
<div style="background-color: #2563eb; width: 150px; padding: 10px; color: white">Hex: #2563eb</div>
<div style="background-color: #ffffff; width: 150px; padding: 10px; color: black">Hex: #ffffff</div>

</details>

<details>
<summary>Font-families</summary>

- Bree Serif

</details>

> ### _Things to Keep in Mind_
>
> - All components you implement should go in the `src/components` directory.
> - Don't change the component folder names as those are the files being imported into the tests.
> - **Do not remove the pre-filled code**
> - Want to quickly review some of the concepts you’ve been learning? Take a look at the Cheat Sheets.
67 changes: 67 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "app-store",
"private": true,
"version": "1.0.0",
"engines": {
"node": "^10.13 || 12 || 14 || 15",
"npm": ">=6"
},
"dependencies": {
"@testing-library/jest-dom": "5.11.9",
"@testing-library/react": "11.2.5",
"@testing-library/user-event": "12.6.2",
"chalk": "4.1.0",
"react": "17.0.1",
"react-dom": "17.0.1"
},
"devDependencies": {
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-prettier": "3.3.1",
"husky": "4.3.8",
"lint-staged": "10.5.4",
"npm-run-all": "4.1.5",
"prettier": "2.2.1",
"react-scripts": "4.0.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"lint": "eslint .",
"lint:fix": "eslint --fix src/",
"format": "prettier --write \"./src\"",
"run-all": "npm-run-all --parallel test lint:fix"
},
"lint-staged": {
"*.js": [
"npm run lint:fix"
],
"*.{js, jsx, json, html, css}": [
"npm run format"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"jest": {
"collectCoverageFrom": [
"src/**/*.js"
]
},
"browserslist": {
"development": [
"last 2 chrome versions",
"last 2 firefox versions",
"last 2 edge versions"
],
"production": [
">1%",
"last 4 versions",
"Firefox ESR",
"not ie < 11"
]
}
}
Loading

0 comments on commit 3da3dbc

Please sign in to comment.