-
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 516e120
Showing
359 changed files
with
59,819 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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Desktop (please complete the following information):** | ||
- OS: [e.g. iOS] | ||
- Browser [e.g. chrome, safari] | ||
- Version [e.g. 22] | ||
|
||
**Smartphone (please complete the following information):** | ||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser [e.g. stock browser, safari] | ||
- Version [e.g. 22] | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,18 @@ | ||
# dependencies | ||
node_modules | ||
|
||
# production | ||
build | ||
dist | ||
|
||
# misc | ||
package.json.bak | ||
.DS_Store | ||
|
||
# config file | ||
.env | ||
|
||
# debug | ||
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 @@ | ||
README.md |
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,10 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"prettier.singleQuote": true, | ||
"prettier.arrowParens": "avoid", | ||
"prettier.jsxSingleQuote": true, | ||
"prettier.trailingComma": "none", | ||
"jumpToAliasFile.alias": { | ||
"app": "client/app" | ||
} | ||
} |
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,2 @@ | ||
# Mern-Ecom | ||
MERN e-commerce: Node backend, Express for routing, Mongoose schemas. React/Redux for UI/state. 3 flows: Buyers browse, Sellers manage brands, Admins control store. Third-party APIs integrated. Async actions handled with Redux Thunk. |
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,7 @@ | ||
# Security Policy | ||
|
||
## Reporting a Vulnerability | ||
|
||
Please submit a pull request to report security bugs. | ||
|
||
I will confirm the problem, audit code to find potential similar problems and coordinate the fix. |
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 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-react"], | ||
"plugins": ["@babel/plugin-proposal-class-properties"] | ||
} |
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 @@ | ||
API_URL=http://localhost:3000/api |
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,64 @@ | ||
/** | ||
* | ||
* actions.js | ||
* actions configuration | ||
*/ | ||
|
||
import { bindActionCreators } from 'redux'; | ||
|
||
import * as application from './containers/Application/actions'; | ||
import * as authentication from './containers/Authentication/actions'; | ||
import * as homepage from './containers/Homepage/actions'; | ||
import * as # from './containers/#/actions'; | ||
import * as login from './containers/#/actions'; | ||
import * as forgotPassword from './containers/ForgotPassword/actions'; | ||
import * as navigation from './containers/Navigation/actions'; | ||
import * as cart from './containers/Cart/actions'; | ||
import * as newsletter from './containers/Newsletter/actions'; | ||
import * as dashboard from './containers/Dashboard/actions'; | ||
import * as account from './containers/Account/actions'; | ||
import * as address from './containers/Address/actions'; | ||
import * as resetPassword from './containers/ResetPassword/actions'; | ||
import * as users from './containers/Users/actions'; | ||
import * as product from './containers/Product/actions'; | ||
import * as category from './containers/Category/actions'; | ||
import * as brand from './containers/Brand/actions'; | ||
import * as menu from './containers/NavigationMenu/actions'; | ||
import * as shop from './containers/Shop/actions'; | ||
import * as merchant from './containers/Merchant/actions'; | ||
import * as contact from './containers/Contact/actions'; | ||
import * as order from './containers/Order/actions'; | ||
import * as review from './containers/Review/actions'; | ||
import * as wishlist from './containers/WishList/actions'; | ||
|
||
export default function mapDispatchToProps(dispatch) { | ||
return bindActionCreators( | ||
{ | ||
...application, | ||
...authentication, | ||
...homepage, | ||
...#, | ||
...login, | ||
...forgotPassword, | ||
...navigation, | ||
...cart, | ||
...newsletter, | ||
...dashboard, | ||
...account, | ||
...address, | ||
...resetPassword, | ||
...users, | ||
...product, | ||
...category, | ||
...brand, | ||
...menu, | ||
...shop, | ||
...merchant, | ||
...contact, | ||
...order, | ||
...review, | ||
...wishlist | ||
}, | ||
dispatch | ||
); | ||
} |
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,56 @@ | ||
/** | ||
* | ||
* app.js | ||
* | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Provider } from 'react-redux'; | ||
import { ConnectedRouter } from 'connected-react-router'; | ||
|
||
import store, { history } from './store'; | ||
import { SocketProvider } from './contexts/Socket'; | ||
import { SET_AUTH } from './containers/Authentication/constants'; | ||
import Application from './containers/Application'; | ||
import ScrollToTop from './scrollToTop'; | ||
import setToken from './utils/token'; | ||
|
||
// Import application sass styles | ||
import './styles/style.scss'; | ||
|
||
// Import Font Awesome Icons Set | ||
import 'font-awesome/css/font-awesome.min.css'; | ||
|
||
// Import Simple Line Icons Set | ||
import 'simple-line-icons/css/simple-line-icons.css'; | ||
|
||
// react-bootstrap-table2 styles | ||
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'; | ||
|
||
// rc-slider style | ||
import 'rc-slider/assets/index.css'; | ||
|
||
// Authentication | ||
const token = localStorage.getItem('token'); | ||
|
||
if (token) { | ||
// authenticate api authorization | ||
setToken(token); | ||
|
||
// authenticate routes | ||
store.dispatch({ type: SET_AUTH }); | ||
} | ||
|
||
const app = () => ( | ||
<Provider store={store}> | ||
<ConnectedRouter history={history}> | ||
<SocketProvider> | ||
<ScrollToTop> | ||
<Application /> | ||
</ScrollToTop> | ||
</SocketProvider> | ||
</ConnectedRouter> | ||
</Provider> | ||
); | ||
|
||
export default app; |
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,48 @@ | ||
/** | ||
* | ||
* Badge | ||
* | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
const variants = { | ||
primary: 'custom-badge-primary', | ||
secondary: 'custom-badge-secondary', | ||
danger: 'custom-badge-danger', | ||
dark: 'custom-badge-dark', | ||
none: 'custom-badge-none', | ||
empty: '' | ||
}; | ||
|
||
const Badge = props => { | ||
const { variant, className, borderless, round, children } = props; | ||
|
||
const v = variant ? variants[variant] : ''; | ||
|
||
const badgeVariant = v; | ||
|
||
const classNames = `custom-badge${`${className && ` ${className}`}`}${ | ||
badgeVariant && ` ${badgeVariant}` | ||
}`; | ||
|
||
return ( | ||
<span | ||
className={classNames} | ||
style={{ | ||
borderRadius: borderless ? 0 : round | ||
}} | ||
> | ||
{children} | ||
</span> | ||
); | ||
}; | ||
|
||
Badge.defaultProps = { | ||
variant: 'secondary', | ||
className: '', | ||
borderless: false, | ||
round: 3 | ||
}; | ||
|
||
export default Badge; |
Oops, something went wrong.