Giter VIP home page Giter VIP logo

django-react-redux-base's Introduction

Django React/Redux Base Project

This repository includes a boilerplate project used for all Seedstars Labs applications. It uses Django as backend and React as frontend.

We build on the solders of giants with the following technologies:

Frontend

Backend

  • Django
  • Django REST framework Django REST framework is a powerful and flexible toolkit for building Web APIs
  • Django REST Knox Token based authentication for API endpoints
  • WhiteNoise to serve files efficiently from Django
  • Prospector a complete Python static analysis tool
  • Bandit a security linter from OpenStack Security
  • pytest a mature full-featured Python testing tool
  • Mock mocking and testing Library
  • Responses a utility for mocking out the Python Requests library

Readme Notes

  • Command line starts with $, the command should run with user privileges
  • Command line starts with #, the command should run with root privileges

Retrieve code

  • $ git clone https://github.com/Seedstars/django-react-redux-jwt-base.git
  • $ cd django-react-redux-jwt-base
  • $ git submodule init
  • $ git submodule update
  • $ ./scripts/get_static_validation.sh

Remember that when you copy this repository for a new project you need to add the scripts external module using:

  • $ git submodule add https://github.com/Seedstars/culture-scripts scripts

Installation

django-rest-knox dependencies

  • # apt-get install -y build-essential libssl-dev libffi-dev libpq-dev python3-dev python-dev

NodeJS

  • # wget -qO- https://deb.nodesource.com/setup_4.x | sudo bash -
  • # apt-get install --yes nodejs

Make sure npm version is 3.x

  • $ npm -v
  • $ npm install -g npm@next # only if version is lower than 3.x

Main Project

  • $ npm install

  • $ npm run dev # will run webpack with watch and compile code as it changes

  • $ virtualenv -p /usr/bin/python3 virtualenv

  • $ source virtualenv/bin/activate

  • $ pip install -r py-requirements/dev.txt

  • $ cd src

  • $ python manage.py migrate

  • $ python manage.py loaddata fixtures.json

  • $ python manage.py runserver

Running

Run webpack in development mode

  • $ npm run dev

Run Django development http server

  • $ cd src
  • $ python manage.py runserver

Testing

Frontend (javascript tests)

  • $ ./scripts/test_local_frontend.sh

Backend (django/python tests)

  • $ ./scripts/test_local_backend.sh

Static analysis

To make sure the code respects all coding guidelines you should run the statics analysis script before pushing any code.

Frontend (javascript static analysis)

  • $ ./scripts/static_validate_frontend.sh

Backend (django/python static analysis)

  • $ ./scripts/static_validate_backend.sh

Screenshots

Here are some screenshots of the boilerplate project.

Screenshot01

Screenshot02

django-react-redux-base's People

Contributors

abossard avatar almeidarruben avatar andrealmar avatar briancappello avatar dopeboy avatar fgarci03 avatar jenkins-aspenabs avatar lfrodrigues avatar pconerly avatar pedrorodriguesgomes avatar

Watchers

 avatar  avatar  avatar

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.