|
1 | | -# react-berry-dashboard |
| 1 | +# [React Berry Dashboard](https://appseed.us/product/berry-dashboard/api-server-nodejs/react/) |
| 2 | + |
| 3 | +**Berry** is a creative **[React Dashboard](https://appseed.us/product/berry-dashboard/api-server-nodejs/react/)** built using the `Material-UI`. It is meant to be the best User Experience with highly customizable feature-riched pages. It is a complete game-changer **React Dashboard** with an easy and intuitive responsive design as on retina screens or laptops. The product comes with a simple JWT authentication flow: `login`/`register`/`logout` powered by an open-source **Node JS API** Backend via `Passport` Library. |
| 4 | + |
| 5 | +- 👉 [React Node JS Berry](https://appseed.us/product/berry-dashboard/api-server-nodejs/react/) - product page |
| 6 | +- 👉 [React Node JS Berry](https://react-node-js-berry-dashboard.appseed-srv1.com/) - LIVE Demo |
| 7 | + |
| 8 | +<br /> |
| 9 | + |
| 10 | +> 🚀 Built with **[React App Generator](https://appseed.us/generator/react/)** |
| 11 | +
|
| 12 | +- ✅ Modern aesthetics UI design - Designed by *CodedThemes* |
| 13 | +- ✅ React, Redux, Redux-persist |
| 14 | +- ✅ Authentication: JWT Login/Register/Logout |
| 15 | +- ✅ **Full-stack Ready** using a **Node JS API Server** (open-source project) - Server Features |
| 16 | + - `Typescript` / SQLite Persistence / TypeORM / Joy (validation) |
| 17 | + - Passport library - `passport-jwt` strategy. |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | +<br /> |
| 22 | + |
| 23 | +## Tests |
| 24 | + |
| 25 | +> `Compatibility matrix` tested with [Render API Wrapper](https://github.com/app-generator/deploy-automation-render). |
| 26 | +
|
| 27 | +| NodeJS | NPM | YARN | |
| 28 | +| --- | --- | --- | |
| 29 | +| `v14.0.0` | ✅ | ✅ | |
| 30 | +| `v16.0.0` | ✅ | ✅ | |
| 31 | +| `v18.0.0` | ❌ | ❌ | |
| 32 | + |
| 33 | +<br /> |
| 34 | + |
| 35 | +## Quick Start in [Docker](https://www.docker.com/) |
| 36 | + |
| 37 | +> Get the code |
| 38 | +
|
| 39 | +```bash |
| 40 | +$ git clone https://github.com/app-generator/react-berry-dashboard.git |
| 41 | +$ cd react-berry-dashboard |
| 42 | +``` |
| 43 | + |
| 44 | +> Start the app in Docker |
| 45 | +
|
| 46 | +```bash |
| 47 | +$ docker-compose pull # download dependencies |
| 48 | +$ docker-compose build # local set up |
| 49 | +$ docker-compose up # start the app |
| 50 | +``` |
| 51 | + |
| 52 | +The React UI starts on port `3000` and expects an API server on port `5000` (saved in configuration). |
| 53 | + |
| 54 | +<br /> |
| 55 | + |
| 56 | +> **Note**: This product can be used with other API Servers for a complete full-stack experience. **ALL API servers use a unified interface** |
| 57 | +
|
| 58 | +- [Django API Server](https://github.com/app-generator/api-server-django) - open-source product |
| 59 | +- [Flask API Server](https://github.com/app-generator/api-server-flask) - open-source product |
| 60 | +- [Node JS API Server](https://github.com/app-generator/api-server-nodejs) - open-source product / Typescript / SQLite / TypeORM / Joy for validation |
| 61 | +- [Node JS API Server PRO](https://github.com/app-generator/api-server-nodejs-pro) - **commercial product** |
| 62 | + - Typescript / SQLite / TypeORM / Joy Validation / Docker |
| 63 | + - Typescript / MongoDB / Mongoose / Joy Validation / Docker (separate branch, same project) |
| 64 | + |
| 65 | +<br /> |
| 66 | + |
| 67 | +## How to use it |
| 68 | + |
| 69 | +To use the product Node JS (>= 12.x) is required and GIT to clone/download the project from the public repository. |
| 70 | + |
| 71 | +**Step 1** - Clone the project |
| 72 | + |
| 73 | +```bash |
| 74 | +$ git clone https://github.com/app-generator/react-berry-dashboard.git |
| 75 | +$ cd react-berry-dashboard |
| 76 | +``` |
| 77 | + |
| 78 | +<br > |
| 79 | + |
| 80 | +**Step 2** - Install dependencies via NPM or yarn |
| 81 | + |
| 82 | +```bash |
| 83 | +$ npm i |
| 84 | +// OR |
| 85 | +$ yarn |
| 86 | +``` |
| 87 | + |
| 88 | +<br /> |
| 89 | + |
| 90 | +**Step 3** - Start in development mode |
| 91 | + |
| 92 | +```bash |
| 93 | +$ npm run start |
| 94 | +// OR |
| 95 | +$ yarn start |
| 96 | +``` |
| 97 | + |
| 98 | +<br /> |
| 99 | + |
| 100 | +## Configure the backend server |
| 101 | + |
| 102 | +The product comes with a usable JWT Authentication flow that provides only the basic requests: login/logout/register. |
| 103 | + |
| 104 | +**API Server URL** - `src/config/constant.js` |
| 105 | + |
| 106 | +```javascript |
| 107 | +const config = { |
| 108 | + ... |
| 109 | + API_SERVER: 'http://localhost:5000/api/' // <-- The magic line |
| 110 | +}; |
| 111 | +``` |
| 112 | + |
| 113 | +<br /> |
| 114 | + |
| 115 | +**API Server Descriptor** - POSTMAN Collection |
| 116 | + |
| 117 | +The API Server signature is provided by the [Unified API Definition](https://docs.appseed.us/boilerplate-code/api-unified-definition) |
| 118 | + |
| 119 | +- [API POSTMAN Collection](https://github.com/app-generator/api-server-unified/blob/main/api.postman_collection.json) - can be used to mock (simulate) the backend server or code a new one in your preferred framework. |
| 120 | + |
| 121 | +<br /> |
| 122 | + |
| 123 | +## Node JS API Server |
| 124 | + |
| 125 | +The product is also open-source and is already configured to work with Berry Dashboard Template - product features: |
| 126 | + |
| 127 | +- Typescript / `NodeJS` / `Express` Server |
| 128 | +- JWT authentication (`passport-jwt` strategy) |
| 129 | +- Persistence: `SQLite` / `TypeORM` |
| 130 | + |
| 131 | +> Links |
| 132 | +
|
| 133 | +- [Node JS API](https://github.com/app-generator/api-server-nodejs) - source code |
| 134 | +- [Node JS API](https://appseed.us/boilerplate-code/nodejs-starter) - product page |
| 135 | + |
| 136 | +<br /> |
| 137 | + |
| 138 | + |
| 139 | + |
| 140 | +<br /> |
| 141 | + |
| 142 | +### Compile the API Server |
| 143 | + |
| 144 | +**Step 1** - Clone the project |
| 145 | + |
| 146 | +```bash |
| 147 | +$ git clone https://github.com/app-generator/api-server-nodejs.git |
| 148 | +$ cd api-server-nodejs |
| 149 | +``` |
| 150 | + |
| 151 | +**Step #2** - Install dependencies via NPM or Yarn |
| 152 | + |
| 153 | +```bash |
| 154 | +$ npm i |
| 155 | +// OR |
| 156 | +$ yarn |
| 157 | +``` |
| 158 | + |
| 159 | +**Step 3** - Run the SQLite migration via TypeORM |
| 160 | + |
| 161 | +``` |
| 162 | +$ npm run typeorm migration:run |
| 163 | +// OR |
| 164 | +$ yarn typeorm migration:run |
| 165 | +``` |
| 166 | + |
| 167 | +**Step 4** - Start the API server (development mode) |
| 168 | + |
| 169 | +```bash |
| 170 | +$ npm run dev |
| 171 | +// OR |
| 172 | +$ yarn dev |
| 173 | +``` |
| 174 | + |
| 175 | +The API server will start using the `PORT` specified in `.env` file (default 5000). |
| 176 | + |
| 177 | +<br /> |
| 178 | + |
| 179 | +--- |
| 180 | +[React Berry Dashboard](https://appseed.us/product/berry-dashboard/api-server-nodejs/react/) - Provided by [CodedThemes](https://codedthemes.com/) and **AppSeed [App Generator](https://appseed.us/generator)**. |
0 commit comments