Coder Social home page Coder Social logo

desafio_onesight_backend's Introduction

Desafio_Onesight_Backend

Onesight Challenge (Backend), using technologies such as PHP/Symphony and MySQL (MariaDB).

Project Structure

The project was built using PHP, Symfony, MySQL (MariaDB), Docker.

Project Installation and Startup

Initially, some prerequisites are needed to install the project:

  • PHP
  • Composer
  • Docker
  • Git
  • Symfony CLI

After confirming that you have the prerequisites or have installed them, we now need to follow the installation steps:

Successfully finishing these 2 commands the project will be installed correctly, now we need to run the project. Even before running the project, we need to configure the environment variables, so we need to run the composer dump-env dev command, so we will create a local file with the environment variables. In the generated file it will be necessary to change two variables:

  • 'PASSWORD_DATABASE' => 'root' (database root user password, sample 'root')
  • 'DATABASE_URL' => 'mysql://root:[email protected]:3306/events_app?serverVersion=8.0.30&charset=utf8mb4' (example string to connect to the database)

Now we can finally run our docker server and container:

  • 1º docker compose up (if it fails check if the service is up or installed correctly)
  • 2º Symfony serve:start (use this command after the entire container installation process is finished)

After that, just go to the url (http://127.0.0.1:8000) where the server is active and see the project running.

Page Structure and Features

The project has basically 3 pages, index, create and update.

  • Index: the admin can visualize all the events created, having the option to update the events or delete them.
  • Create: It is possible to create events through a form and thus save the information in the database, to be visualized in the index.
  • Delete: It is possible to update events through a form and thus approve the event and update the information in the database, to be visualized in the index.

Tests

There is a simple unit test to verify the connectivity and insertion of data in the database. Use the following command to use test:

  • symfony php bin/phpunit tests/EventsTest.php

desafio_onesight_backend's People

Contributors

uriel-david avatar

Watchers

 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.