Giter Site home page Giter Site logo

react_drf_mysql_catbikes's Introduction

React_DRF_MySQL_CatBikes

Por Sergi Micó Ortiz y Juan Luis López del Barco

Table of Contents

  1. CatBikes
  2. Instalar
  3. Tecnologias

CatBikes! 😺 🚲

Bienvenidas y bienvenidos a CatBikes

  1. Home: Carousel, mapa indicando las estaciones e infiniteScroll

  2. Station: Obtención de todas las estaciones con su información y redirección a sus slots

  3. Station Details: Ver cada slot de una stación, se puede alquilar o devolver una bici además de poder crear una incidencia

  4. Profile: Listado de todas las incidencias creadas por un usuario

  5. Login: Register y Login de usuario.

  6. Dashboard: Solo tienen acceso los administradores, contiene todos los cruds: Stations, Bikes, Slots, Rens y Incidents

  7. Bell Admin Una campana con un contador que solo puede ver el administrador que te redirecciona al listado de las incidencias

  8. Bell Client Una campana con un contador de las notificaciones que tiene el cliente por ver

Instalar 💿


Requisitos

Es necesario crear el fichero .env en la carpeta backend y el secrets.js del frontend. El contenido puede ser el mismo que el de los ficheros de ejemplo.

Tener instalado las siguientes herramientas:

Puesta en marcha

Backend

cd backend
cp ./src/settings.example.py ./src/settings.py
pipenv install
pipenv run python ./manage.py migrate
pipenv run python ./filler.py  (Opcional, creación de dummys )
pipenv run python ./manage.py runserver 0.0.0.0:8000

Antes de realizar el runserver deberemos de acceder a la base de datos de mysql y crear el trigger de las notificaciónes, simplemente deberemos de copiar y pegar el contenido de backend/sql/ClientNotificationTrigger.sql

Frontend

cd frontend
cp ./src/secrets.example.js ./src/secrets.js  
npm install -D
npm run start

Tecnologías 👨‍💻


Lista de tecnologías utilizadas en este proyecto:

Backend 🏗️

  • DRF v3.14.0
    • Routes
    • Models
    • Controllers
    • DB validation
    • MySQL
      • Relationships
      • Schema
    • Middleware_auth
      • Header
      • Token JWT
      • Token Blacklist

Frontend 🏛️

  • React v18.2.0
    • Estructurado en componentes
    • Routes
    • Models
    • Components
    • Reactive Forms
      • Validation
    • Lazy load
    • Guards
    • Service with axios
    • Authentication JWT enviado por Headers
    • Refresh Token
    • Hooks y context
    • Librerias:
      • react-toastify
      • react-modal
      • react-map-gl
      • react-infinite-scroll-component
      • react-data-table-component

BBDD💾

react_drf_mysql_catbikes's People

Contributors

sergimicoortiz avatar juanluislopez-code avatar

Stargazers

Roman avatar

Watchers

yomogan avatar  avatar

react_drf_mysql_catbikes's Issues

Slots

  • CRUD frontend
  • Change bike(status) serializer

Incident

  • Incident Backend Admin
  • Incident Backend Client
  • Incident Frontend Admin
  • Incident Frontend Client
  • Incident Frontend Client list
  • Frontend/Backend change automatically status when send incident

Dummys

  • Bike Dummys
  • Stations/Slots dummys

Rent maintenance

  • Change rent/return backend maintenance
  • Change rent/return frontend maintenance

Bug header

The header is not reactive, add the navbar-toggler that is now comment and not working

Login Form React

  • Register page and form with validations
  • Login page and form with validations

Auto logout

  • Add autologout when the server return a forbidden code(403)

Limit refresh token

  • Limit refresh to 3 times
  • Put countToken to 0 when login and logout
  • Change api interceptor to get refresh error

Improve the css

  • Header
  • Footer
  • Form dashboards stations
  • Form dashboards bikes

Dummys V2

  • Add bikes to slots
  • Change useSlot Manteinance. Use findIndex instead of filter

Notification

  • Notification Backend
  • Notification Frontend
  • Trigger SQL create notification when create incident
  • Header count/redirect notifications

Refactor forms

  • Refactor login/register form in component
  • Refactor dashboard bike form in component

Guards

The guard is executed before the context have the user, so even if you are logged the guard redirects you to the home.

  • Add check admin backend in guards.

Update Bikes for Rent

When you add a bike to a slot in the dashboard, that station don't reflet the total bikes for rent.
Probably this will also happens if a user make a rent.

Login

  • Login backend
  • backend middleware
  • frontend login
  • frontend guards
  • frontend interceptor

Refactor serializers

  • Refactor stations serializer/view
  • Refactor bikes serializer/view
  • Refactor slots serializer/view

Blacklist

  • Blacklist token model
  • Add token when refresh and logout
  • Verify token in backends.py

Mapa

  • Add map
  • Update station model
  • Update station dummys
  • Put markers in map
  • Info in markers
  • Redirect markers
  • Update/Create dashboard stations

Rent

  • Rent backend
  • Return backend
  • Get rent user backend
  • Get all rent admin backend
  • Dashboard list and delete
  • Rent frontend
  • Return frontend

Backend admin verification

  • Only admin users can delete, create and modify stations, bikes and slots
  • Add token expiration time in the settings file

Dashboard bug & enhancement

  • Filter the slots when a station is deleted in the dashboard
  • Add input for the number of slots in the station dashboard creation page
  • UserContext false bad written

Datatable color

  • Color datatable dashboard bike
  • Color datatable dashboard slot
  • Color datatable dashboard station
  • Color datatable dashboard rent

Prepare rent

  • Create files
  • Prepare model
  • Prepare serializer
  • Prepare view

List stations

  • Page List stations
  • Page List slots about 1 station

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.