/DeLorean-Rental-Frontend

This is the frontend of the previous DeLorean rental backend created. This project is to understand how work JS in it's base level and how makes the communication with the DOM

Primary LanguageJavaScriptMIT LicenseMIT

DeLorean-Rental-Frontend

Frontend of the previous project DeLorean Rental backend created. The goal of the project is to understand how work JS in its base level and how it communicates with the DOM through the DOM api. This project has been the deep introduction that all of us need if we want to understand how the DOM works and JS fundamental concepts.

This project complement really well the last one, to be honest I think that both of them should be developed, of course if you like more the backend than the frontend or other way round you'll choose one over the other. But to start to masterize yourself in Web Software Development, I think you must know what happens on the backend and the frontend.

I'll advise these two projects to anyone that feel brave enough to try them. If you don't feel brave enough to start with the Backend don't worry, you could clone them and use it as it is already.

Good luck !

status application webpack version node version npm version version application

animated

Table of Contents

  1. Webpack
  2. Motivation
  3. Project Goals
  4. Dependencies to install with webpack
  5. Compile your code with webpack
  6. Create a server with Webpack and run compiled code
  7. Technologies Implemented
  8. Instalaltion
  9. Links to Project Documentation
  10. Acknowledgment
  11. License

Webpack

To install Webpack do it as a development dependency because it is just required to compile the code you're going to send to the server but once is compiled you won't need webpack any more. And WebpackPlugin, is a plugin of webpack to be able to compile as well the HTML code, otherwise we will be just getting the JavaScript code compiled.


⬆ back to top

Motivation

I should start telling you that I have not had as much time as I would like, or better I should say that I had more than enough time, but I've been through one of the hardest stages of my life and I couldn't find the right moment to sit down myself and start to code. When I did it, I tried to develop all the project with the minimum dependencies required and this in my head was something like "I'm going to do this just with HTML, CSS, JS vanilla and node" and of course I've been through lot of troubles until one night of desperation and doing tech spiked I've found Webpack and I have to say that saved this project because what was exactly what I was looking for, but I didn't even thought about it. Then finally when I had a consistent idea about how I wanted to do it I start to develop all of this in just three days, because the fourth restarted the nightmare I was just living and I came back to find some time to sit down to code, I just don't want to force it because I really fucking enjoyed this last three days and I don't want to change this really nice vibe I get when I code. But the main motivation of this project was tried to do the same kind of web frontEnd development I do at my job with React just with JS Vanilla and I had to say that it was incredibly satisfying.


⬆ back to top

Project Goals

[x] Usage of DOM API

[x] Dynamically add class, styles, html...

[x] NodeElements and NodeLists

[x] Dialog windows

[x] LocalStorage, SessionStorage or cookies

[x] Fetch GET, POST, DELETE and PUT

[x] Async/await and Promises

[x] Form data handling


⬆ back to top

Dependencies to install with webpack:

These dependencies are to compile the code for the server

$ npm i webpack -D

$ npm i html-webpack-plugin -D

These dependencies are to be able to run a server just with Webpack

$ npm i webpack-dev-server -D

These dependencies are to be able to load the stylesheets

$ npm i css-loader -D

$ npm i style-loader -D

This dependecy allows you to have multiple CSS files

$ npm install --save-dev mini-css-extract-plugin

These dependencies are to be able to load the HTML

$ npm i html-loader -D

This dependency allows us to see images

$ npm install file-loader --save-dev

The -D indicates is going to be installed as a development dependency


⬆ back to top

Compile your code with webpack

To compile the code, run the following command from your terminal after you've installed webpack:

$ npx webpack

Or if u want this compiled code turn into a readable human format run instead:

$ npx webpack -d


⬆ back to top

Create a server with Webpack and run compiled code

To create a server where you can run your compiled code, run the following command on your terminal:

$ npx webpack-dev-server


⬆ back to top

Technologies Implemented

  • HTML5
  • CSS3
  • JS Vanilla
  • Webpack
  • Node
  • NPM

⬆ back to top

Instalaltion

To be able to run this project you just will have to create an account into MongoDB, clone this project and run the command $ npm i to install all the required dependencies. Finally, create a .env file in the root directory of your project and fill the credentials specified in the .env template that you'll find below. Enjoy !


⬆ back to top

Links to Project Documentation

Bibliography

Bibliography


env. Template

.env Template


⬆ back to top

Acknowledgment

I would like to acknowledge the help and support of:

dfleta


⬆ back to top

License

MIT License

Copyright (c) 2020 AntoniPizarro and Pau Llinàs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


⬆ back to top