Coder Social home page Coder Social logo

safelabs-front's Introduction

SafeLabs-playlist-front

How to run

First of all, we need to set the environment variables.

You can either create a .env file based on the .env.example file or you can set the environment variables directly in your terminal (great for CI/CD).

Then you can execute the following command to run the application:

docker-compose -f .\docker-compose.yml up -d -V --remove-orphans --build

And now you can visit the application on the 80 port (or the 443 port, but missing certificate, could use a proxy pass).


Report

This application was created because i thought a FullStack challenge without a front-end was a bit strange...

It's not complicated, using React with react-router-dom for routing and bootstrap for the styling (with custom css too).

A template was created to prevents code repetition and to make the application more readable.

I didn't created a components folder because everything was so unique (because of the simplicity of the app) that it was not necessary (which is really sad because i really like props and state management =/).

The /home page is the main page of the application, where you can select what type of information do you want to use on the search.

Every input is validated before submit (which is just changing the page to the next one).

On the /results page, you can see the results from the back-end API.

The query params is used to keep the search on the URL, so the user can save or share without problems (and it's removed when it's back on home, keeping it nice and clean).

The page is responsive and adapts for mobile, so you can use it on a smartphone.

This project uses a .env for back-end URL's, making it and easier to deploy to different environments (an staging environment and a production environment for example).

When there's an error on the back-end for some reason, there's a popup with the error message, and when pressing OK it will bring the user to the home (a great way to test it is trying a nonexistent city).

safelabs-front's People

Contributors

raiomarco avatar

Watchers

James Cloos 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.