Git Product home page Git Product logo

autobahn's Introduction

AutoBahn

This repository is a simple form to manage 3 fields (input-text, select, checkbox) with validations and fills the data from DB. The design was made using material design. It was created to manage a user session without login, and it uses uuid library to generate a random identification.

The BE manages all the validations, and reports by console and JSON all the status codes available.
Additionally, a CORS control was added because it is required by the hosting server for this app.

Automated tests are covering all modules.

Technical details

The Front-End was developed using REACTJS, JEST and SASS. The Back-End was made on NodeJS using the ExpressJS framework and MySQL.

The Back-End and Front-End have their own dependencies package and runners under NPM.

Views

npm run +

start: Run this script to execute the development server available for your React application.
test:  To run the testing mode, using react-scripts: 5.0.1 and jest-dom 5.16.5
build: This sets and creates a build directory with a production build of your app

Browser views

Front-End [http://localhost:3000]

Back-End API [http://localhost:3001]

API Endpoints

Server URL : [http://localhost:3001]

POST /session

Parameters

  • session: number

Responses

  • Status Code: 200
  • Media type: application/json
  • Schema :
{
   userId: string,
   fieldId: array,
   session: number
}

**** FAILED ****

  • Status Code: 500
  • Media type: application/json.
  • JSON Response: Internal server error, the request return + error message.
  • Console Message: Problems getting the session user data + error message.

POST /register

Parameters

  • Request body
  • Media type: application/json.
  • Schema :
{
   userId: string,
   fieldId: array,
   session: number
}

Responses

  • Status Code: 201
  • Media type: application/json.
  • JSON Response: The register was successfully saved

**** If session exists ****

  • JSON Response: The register was successfully updated

**** FAILED ****

If some fields are empties or undefined

  • JSON Response: Partial Content, json with some fields emptied.
  • Console Response: Partial Content, json with some fields emptied.

If some fields have different types

  • JSON Response: Bad Request.
  • Console Response: Bad Request.

If it has a DB error with the session data

  • JSON Response: Problems consulting the registered users

GET /sectors

Parameters

  • No parameters are required

Responses

  • Status Code: 200
  • Media type: application/json.
  • Schema :
{
   userId: string,
   fieldId: array,
   session: number
}

**** FAILED ****

  • Status Code: 500
  • JSON Response: Internal server error, the request return + error message.
  • Console Response: Failed getting the registered user list + error message.

GET /register

Parameters

  • No parameters are required

Responses

  • Status Code: 200
  • Media type: application/json.
  • Schema :
{
   userId: string,
   fieldId: array,
   session: number
}

**** FAILED ****

  • Status Code: 500
  • JSON Response: Internal server error, the request return + error message.
  • Console Response: Failed getting the registered user list + error message.

Out-of-scope

  • Create conceptual and communication diagrams to understand the application flow visually.

autobahn's People

Contributors

rbeaujon avatar

Watchers

Kostas Georgiou 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.