Code Monkey home page Code Monkey logo

react-crm's Introduction

React Redux CRM

A reusable CRM project for real-world business based on React 16, React-Redux & Material-UI 4

This is the very first version, feel free to use for any app. Contributions are always welcome!

The goal of this starter project is to create reusable project for real-world business. To achieve this target, we need a solution which should include simple authentication process, restful API with token support and simple but elegant UI design.

Features

  • This project is built on the top of React/Redux.
  • The UI component are mainly built on Material-UI.
  • This project uses Redux-Thunk to support back-end API.
  • The backend API is just readonly dump service.
  • Use Formik to manage the form submission
  • Integrate with storybook for react.
  • The project is built on TypeScript 3.x
  • Use Formsy to manage form submission
  • To simulate real-world business, this starter project chooses Json-Server as fake Restful API. (You can simple replace it with your own API)

Live Demo

Demo The demo is just a proof of concept. It doesn't have back-end API and all features of master branch.

Screenshots

Screenshot1

Screenshot2

Screenshot3


Storybook

Screenshot4

Build Setup

# Clone project
git clone https://github.com/harryho/react-crm.git


# install the packages with npm
cd react-crm
npm install

# start the server with hot reload at localhost:4000
npm start
# or yarn
yarn start

# Storybook
## Start storybook
npm run storybook
## Build storybook
npm run build-storybook

## build for production
npm run build

Docker

## Run / Test release without building new image
npm run build

# Launch nginx image to test latest release
docker pull nginx:alpine
docker run -p 8080:80 -v \
    <your_aboslute_path>/dist:/usr/share/nginx/html nginx:alpine


# Build release image
docker build . -t  rc-prd:2.0

# Launch the development image in the backgroud
docker run -d --publish 8080:80  --name rc2 rc-prd:2.0

# Check the log
docker logs rc2  -f

Welcome to fork or clone

For detailed explanation on how things work, checkout following links please.

Alternatives

There are another two similar projects respectively built on the Vue.js and Angular. If you have interests in those technical stacks. You can find and clone those repositories below.

Change log

  • May 2020 - Merge the branch rctsx to master

    After the merge, the whole project moved to new techncial stack - TypeScript 3. Also, the Material-UI is upgraded to 4.x version.

  • Dec 2018 - Rebase demo branch to master

    New master doesn't rely on Json-Server as fake API. It will only have Readonly fake API. It means any new or updated data will be stored to any physical file. All test data will be rolled back after system restart.

  • May 2018 - Create an archived branch json-server

    This branch was the master which used Json-Server as fake API. Considering the hiccup of setting Json-Server up and maintenance, it will be replaced by fake service ( Readonly fake API). You still can find clone this branch by branch name json-server, but it will be no longer updated. It is an archived branch.

react-crm's People

Contributors

dependabot[bot] avatar harry-reetek avatar harryho avatar lraphael avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-crm's Issues

Unable to login

After a fresh install, I can see the login form but clicking login does nothing to the page and results in the following errors in the browser console:

auth.js?1ea2:62 GET http://localhost:5354/token 0 ()
auth.js?1ea2:80 Error:  TypeError: Failed to fetch

How to customize react-crm to call REST API

I have my REST APIs ready. These customized REST API services do the CRUD operations. I want to call these APIs from react-crm app.
So, my objective is react-crm app accesses customized REST API and show data accordingly in the UI.
Information or data should be populated/manipulated through custom REST API and react-crm app accesses those customized REST API to reflect in UI.
I have cloned master branch of react-crm from the GitHub.
Please suggest how can I customize react-crm to achieve the above needs.

Encountering the error when compile

The stack trace is like below:

.node-gyp/19.9.0/include/node/common.gypi", line 1
npm ERR! nerate ',
npm ERR! ^
npm ERR! SyntaxError: EOL while scanning string literal

I suspect it's to do with the node version.

This is what has installed on my device:

node: v19.9.0
nom: 9.6.3

Any suggestions?

Thanks.

On windows it does not install correctly and does not run

--this is for the install
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which succeeded python C:\ProgramData\Anaconda3\python.EXE
gyp ERR! configure error
gyp ERR! stack Error: Command failed: C:\ProgramData\Anaconda3\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:303:12)
gyp ERR! stack at ChildProcess.emit (events.js:311:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
gyp ERR! System Windows_NT 10.0.17763
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\react-crm-master\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Program Files\nodejs\react-crm-master\node_modules\node-sass
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN [email protected] requires a peer of material-ui@^0.17.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of webpack@^2.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\fma\AppData\Roaming\npm-cache_logs\2020-04-01T15_15_41_385Z-debug.log

----this is for the run
ERROR in Cannot find module 'node-sass'
Require stack:

  • C:\Program Files\nodejs\react-crm-master\node_modules\sass-loader\lib\loader.js
  • C:\Program Files\nodejs\react-crm-master\node_modules\webpack-core\lib\NormalModuleMixin.js
  • C:\Program Files\nodejs\react-crm-master\node_modules\webpack\lib\NormalModule.js
  • C:\Program Files\nodejs\react-crm-master\node_modules\webpack\lib\NormalModuleFactory.js
  • C:\Program Files\nodejs\react-crm-master\node_modules\webpack\lib\Compiler.js
  • C:\Program Files\nodejs\react-crm-master\node_modules\webpack\lib\webpack.js
  • C:\Program Files\nodejs\react-crm-master\tools\srcServer.js
    @ ./~/flexboxgrid/css/flexboxgrid.css 4:14-152 13:2-17:4 14:20-158

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.