Giter VIP home page Giter VIP logo

faisalnazik / django-react-redux-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
116.0 3.0 34.0 36.11 MB

This is a setup of Authentication and Registration Integrated with React.js, Using Material UI Minimal Kit.

License: MIT License

Python 3.25% JavaScript 96.40% HTML 0.28% Procfile 0.01% CSS 0.07%
django django-react-integration django-react-boilerplate django-react-redux django-rest-framework-jwt jwt-authentication material-ui react

django-react-redux-boilerplate's Introduction

DRF React & Redux Boilerplate

License: MIT PRs Welcome CircleCI Maintainability

1671452013971

Frontend ⭐

  • Minimal Template with neccessary components✔
  • Configured Redux Store✔
  • Auto formatted with Prettier ✔
  • React with functional components and hooks ✔
  • Forms Validation with Formik ✔
  • Login , example to understand the JWT auth ✔
  • Server Errors Handling✔

Backend🛠

1671452027931

  • Django REST framework for a powerful API ✔
  • Django ORM for interacting with the database✔
  • Authentication With JWT (Register, Sign In) ✔
  • Throttle setup ✔
  • Testing with Pytest ✔
  • Extra password hashers like Argon2PasswordHasher Recommend by official django docs. ✔

Motivation 🎯

  • A quickstart django react boilerplate with updated dependecies to start with react project.
  • Material UI usage⭐

How to Run locally 🚀

Backend

  • Install requirements after creating and activating virtual environement

    $ pip install -r requirements/local.txt

  • Currently SQLite is configured, you can change it with any other as well. Then run

    $ python manage.py makemigrations $ python3 manage.py migrate

    To run tests: $ pytest

    API Documentation will be available at http://localhost:8000/api/v1/schema/redoc/

    Admin available athttp://localhost:8000/admin/

Frontend

- Install dependencies in frontend app using following commands in separate terminal
- First make sure you have installed Node.js, v18.12.1. while upgrading this setup.

For More info https://nodejs.org/en/

- Then run following commands in frontend dir

$ yarn install
$ yarn start

-  React app available at`http://localhost:3000/`

👉 Github Pages

⭐️ Support

Give a ⭐️ if this project helped you!

License ©

The MIT License

django-react-redux-boilerplate's People

Contributors

abelladona78 avatar dependabot[bot] avatar faisalnazik avatar iyadfa 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

django-react-redux-boilerplate's Issues

Running Tests with Pytest

Describe the bug
Django errors out with django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before access ing settings. when running pytest.

To Reproduce
Steps to reproduce the behavior:

  1. install project
  2. navigate to {PROJECT_DIRECTORY}/backend
  3. run python -m pytest

Expected behavior
Pytest to pass out of the box

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: N/A
  • Version: Latest

Suggested Fix

import os
import django

if not settings.configured:
    os.environ['DJANGO_SETTINGS_MODULE'] = 'config.settings'
    django.setup()

could be added to backend/accounts/tests.py

Error material icons

Describe the bug
The following error is obtained regarding the following library:
error An unexpected error occurred: "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.10.6.tgz: ESOCKETTIMEDOUT".

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'cd frontend'
  2. write 'yarn install'

Expected behavior
Libraries must be installed correctly

Screenshots
image
The following error is obtained regarding the following library:
error An unexpected error occurred: "https://registry.yarnpkg.com/@mui/icons-material/-/icons-material-5.10.6.tgz: ESOCKETTIMEDOUT".

Desktop (please complete the following information):

  • OS: Windows

inssue while installing the backend pycog2 needs to updated to pycog2 binary

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to ''backend folder and then create a virtual env
  2. run pip install'
  3. it gives error packages not able to installed
  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.

Refresh or 404 page logs out

Describe the bug
When I log in to the system - I can use protected Pages but when I refresh the page from browser or when I get to 404/500 page and clicks on "Go to Home" then I am being logged out of the system

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
For refresh or 404 pages it should stay logged-in.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] MacOs
  • Browser [e.g. chrome, safari] Chrome
  • 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.

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.