React Node JS Berry

Open-source Full Stack seed project built in React and Node JS on top of Berry Dashboard

Open-source full-stack seed project coded in React and Node JS on top of a modern Material UI design from CodedThemes. The React / NodeJS codebase is already configured with a SQLite database, API, JWT authentication flow powered by Passport library.

Features

  • Modern aesthetics UI design - Designed by CodedThemes

  • React, Redux, Redux-persist

  • Authentication: JWT Login/Register/Logout

  • Full-stack ready using a Node JS API Server (open-source project) - Server Features

    • Typescript / SQLite Persistence / TypeORM / Joy (validation)

    • Passport library - passport-jwt strategy.

Links

How to use the App

The product expects a running API backend that exposes an interface for login/logout and register actions. By default, the guest users are redirected to the login page. Once the user is authenticated all private pages are accessible. Here are the steps to compile the product.

Dependencies

To use the product, a decent version of Node JS (>= 12.x) is required, and GIT command-line tool to clone/download the project from the public repository.

Step #1 - Clone the project

$ git clone https://github.com/app-generator/react-berry-dashboard.git
$ cd react-berry-dashboard

Step #2 - Install dependencies via NPM or yarn

$ npm i
// OR
$ yarn 

Step #3 - Start in development mode

$ npm run start 
// OR
$ yarn start 

Step #4 - Configure the backend - src/config.js

const config = {
    ...
    API_SERVER: 'http://localhost:5000/api/'  // <-- The magic line
}; 

API Server

To use the product and see all features in action, an API server should be up and running. This can be done in two ways:

Here, we will use the first version and build a real API server coded in Node JS/Express and SQLite persistence.

API Server Description

Express / Nodejs Starter with JWT authentication, MongoDB where authentication is based on json web tokens. passport-jwt strategy is used to handle the Email/Password authentication. After a successful login, the generated token is sent to the requester.

Dependencies

  • Node.js >= 12.x

  • GIT: command-line utility

Step #1 - Clone the API Server from Github

$ git clone https://github.com/app-generator/api-server-nodejs.git
$ cd api-server-nodejs 

Step #2 - Install dependencies via NPM or yarn

$ npm i
// OR
$ yarn 

Step #3 - Run the SQLite migration via TypeORM

$ yarn typeorm migration:run 

Step #3 - Start in development mode

$ npm dev
// OR
$ yarn dev 

The API server will start using the PORT specified in .env file, default value 5000, same as the one expected by the front end.

From this point, the React Product should be able to authenticate and register new users.

Resources

Last updated