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.
To get a local copy up and running follow these steps.
- JDK 17 https://jdk.java.net/java-se-ri/17
- Gradle https://gradle.org/install/
- MySQL https://dev.mysql.com/downloads/installer/
- IntelliJ Community https://www.jetbrains.com/idea/download/
- Postman https://www.postman.com/downloads/
- Clone the repository
- Change directory
cd restaurant_powerup
- Create a new database in MySQL called restaurant_powerup
- Update the database connection settings
# src/main/resources/application-dev.yml spring: datasource: url: jdbc:mysql://localhost/restaurant_powerup username: root password: <your-password>
- After the tables are created execute src/main/resources/data.sql content to populate the database
- Open Swagger UI and try
- Right-click the class PowerUpApplication and choose Run
- Open http://localhost:9090/swagger-ui/index.html in your web browser
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 |
- Right-click the test folder and choose Run tests with coverage