PRAGMA POWER-UP

In this challenge I am going to design the backend of a system that centralizes the services and orders of a restaurant chain that has different branches in the city.

Built With

  • Java
  • Spring
  • Gradle
  • MySQL

Getting Started

To get a local copy up and running follow these steps.

Prerequisites

Recommended Tools

Installation

  1. Clone the repository
  2. Change directory
    cd restaurant_powerup
  3. Create a new database in MySQL called restaurant_powerup
  4. Update the database connection settings
    # src/main/resources/application-dev.yml
    spring:
       datasource:
           url: jdbc:mysql://localhost/restaurant_powerup
           username: root
           password: <your-password>
  5. After the tables are created execute src/main/resources/data.sql content to populate the database
  6. Open Swagger UI and try

Usage

  1. Right-click the class PowerUpApplication and choose Run
  2. Open http://localhost:9090/swagger-ui/index.html in your web browser

Validations

Field Requirement Example
Phone Number The phone number should be in Colombian format, with the respective prefix.
The "+" sign at the beginning of the number is optional.
+573001234567
573001234567
NIT The NIT field should contain only numeric characters. 1234567890
Restaurant Name The restaurant name can contain numbers, but names consisting solely of numbers are not allowed. Restaurant 123

Tests

  • Right-click the test folder and choose Run tests with coverage