Giter Club home page Giter Club logo

django-react-soft-dashboard's Introduction

Start your Development with an Innovative Admin Template for Material-UI and React. Soft UI Dashboard React is built with over 70 frontend individual elements, like buttons, inputs, navbars, nav tabs, cards, or alerts, giving you the freedom of choosing and combining. The product comes with a simple JWT authentication flow: login/register/logout.


Features

  • โœ… Innovative Material-UI Design - Creafted by Creative-Tim
  • โœ… React, Redux, Redux-persist
  • โœ… Authentication: JWT Login/Register/Logout
  • โœ… Full-stack Ready using a Django API Server (open-source project) - Server Features
    • Django / DRF / SQLite3 - a simple, easy to use backend
    • Authentication with JWT (login, logout, register)
    • Docker, Unitary tests

React Soft Dashboard - Open-source full-stack product


React UI Tests:

NodeJS NPM YARN Status
v16.13.0 v8.1.0 v1.22.5 โœ”๏ธ
v14.15.0 v6.14.8 v1.22.5 โœ”๏ธ
v12.22.0 v6.14.11 v1.22.5 โœ”๏ธ

โœจ Quick-start

๐Ÿ‘‰ Start the Django API using Docker

$ cd django-api
$ docker-compose up --build  

At this point, the API should be up & running at http://localhost:5000, and we can test the interface using POSTMAN or curl.


๐Ÿ‘‰ Start the React UI (using another terminal)

$ cd react-ui
$ yarn         # install dependencies
$ yarn start   # start the app 

Once all the above commands are executed, the React UI should be visible in the browser. By default, the app redirects the guest users to authenticate. After we register a new user and Sign IN, all the private pages become accessible.


React Soft Dashboard - Open-source full-stack product with Django API Backend.


โœจ General Information

The product is built using a two-tier pattern where the React frontend is decoupled logically and physically from the API backend. How to use the product:

  • Compile and start the Django API Backend
    • by default the server starts on port 5000
  • Compile and start the React UI
    • UI will start on port 3000 and expects a running backend on port 5000
  • Configuration (Optional)
    • Change the API port
    • Configure the API port used by the React UI to communicate with the backend

โœจ Manual build

Start the Django API

Simple starter built with Python / DRF Library / Sqlite3 and JWT Auth. The authentication flow is based on json web tokens.


๐Ÿ‘‰ Step #1 - Change the directory to django-api

$ cd django-api

๐Ÿ‘‰ Step #2 - Create a virtual environment

$ # Virtualenv modules installation (Unix based systems)
$ virtualenv env
$ source env/bin/activate
$
$ # Virtualenv modules installation (Windows based systems)
$ # virtualenv env
$ # .\env\Scripts\activate

๐Ÿ‘‰ Step #3 - Install dependencies using PIP

$ pip install -r requirements.txt

๐Ÿ‘‰ Step #4 - Create a new .env file using sample env.sample

The meaning of each variable can be found below:

  • DEBUG: if True the app runs in develoment mode
    • For production value False should be used
  • SECRET_KEY: used in assets management

๐Ÿ‘‰ Step #5 - Start the API server

$ python manage.py migrate
$ python manage.py runserver 5000

The API server will start using the explicit port 5000.


Compile & start the React UI

$ cd react-ui
$
$ # Install Modules
$ yarn
$
$ # Start for development (LIVE Reload)
$ yarn start 

Configuration (Optional)

Change the port exposed by the Djago API

$ python manage.py runserver 5000

Now, the API will start on port 5000.


Update the API port used by the React Frontend

API Server URL - src/config/constant.js

    API_SERVER: 'http://localhost:5001/api/'  // <-- The magic line

The value can be updated during the build using the environment

$ export REACT_APP_BACKEND_SERVER='http://localhost:5001/api/' # Unix/MacOS
$ set REACT_APP_BACKEND_SERVER='http://localhost:5001/api/'    # Windows CMD
$ $env:REACT_APP_BACKEND_SERVER='http://localhost:5001/api/'   # Windows PowerShell

โœจ API

For a fast set up, use this POSTMAN file: api_sample

๐Ÿ‘‰ Register - api/users/register (POST request)

POST api/users/register
Content-Type: application/json

{
    "username":"test",
    "password":"pass", 
    "email":"[email protected]"
}

๐Ÿ‘‰ Login - api/users/login (POST request)

POST /api/users/login
Content-Type: application/json

{
    "password":"pass", 
    "email":"[email protected]"
}

๐Ÿ‘‰ Logout - api/users/logout (POST request)

POST api/users/logout
Content-Type: application/json
authorization: JWT_TOKEN (returned by Login request)

{
    "token":"JWT_TOKEN"
}

โœจ Product UI

Django React Soft UI Dashboard - Login

Django React Soft UI Dashboard - Login.


Django React Soft UI Dashboard - User Profile

Django React Soft UI Dashboard - User Profile


Django React Soft UI Dashboard - Billing Page

Django React Soft UI Dashboard - Billing Page.


Links & Resources



Django React Soft Dashboard - Provided by App Generator.

django-react-soft-dashboard's People

Contributors

app-generator 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

django-react-soft-dashboard's Issues

Backend

Hi,

cool project!

I'm struggling a bit by setting up the backend.

I'm using windows and followed the instructions, but when I start the backend I got the following error message:

"The requested resource was not found on this server. "

Checked it via http://localhost:5000/api/

What is about the API do I need to add this somewhere or is this already considered for the fast setup.

I have used the manual setup:
I have just followed instructions 1 to 5.

Thanks

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.