Skip to content

Find the best location to eat around campus depending on users' needs and budget.

License

Notifications You must be signed in to change notification settings

javier-arango/u-food

Repository files navigation

Storybook

Find the best location to eat around campus


Build Status on CircleCI SonarCloud Vulnerabilities SonarCloud report for Lines of Code SonarCloud report for Bugs SonarCloud report for Maintainability Rating

For students at the University of Florida who need to find food services close to them, the UFood is a website that shows students food options in their budget as well as their proximity. Unlike other sites, our product is catered toward UF students and will have a pleasant user experience free for all.

Table of contents

Tech Stack:

  • Frontend: Javascript, HTML, CSS, React JS
  • Backend: Java, SpringBoot, Yelp API, REST API
  • Database: MySQL
  • Version Control: Git, Github
  • CI/CD: CircleCI

App Type

We are going to develop a CRUD Application:

Learn more here

CRUD OPERATION HTTP REQUEST METHOD
Create POST
Read GET
Update PUT or PATCH
Delete DELETE

System Architecture

UFood Architecture Design

Project Structure

Project created using Javascript, Java, SpringBoot, and create-react-app. This application is structured in the following way:

  • u-food: contains all the code for the project (includes server and client side)
    • client: contains frontend code

      • public: contain all the statics files such as the website favicon and the main html file of the website
      • src: contains all the frontend code
        • components: contains all the components of the app. The components will be organized as follow.
          • component-folder: contains all the files that are uniquely used by the component including other components. Components will be nested if they are only used by one component.
        • assets: contains all the assets of the project
      • __tests__: contains all the test for each component and functions
    • src: contains all the backend code

      • main: contains all the logic and server code (we using the MVC pattern)
        • java/com/api/developer/ufood: contains the main code
          • controller: controller acts on both model and view. It controls the data flow into model object and updates the view whenever data changes. It keeps view and model separate.
          • model: dodel represents an object or JAVA POJO carrying data. It can also have logic to update controller if its data changes.
          • view: view represents the visualization of the data that model contains.
          • UFoodApplication: is the main file that will run the server. (Don't touch)
      • test: contains all the test files
        • java/com/api/developer/ufood: contains the main code for testing (Please call a test file like this NameHere.Test.java

API Documentation

Run the backend server in go to http://localhost:8080/api/v1/swagger-ui/index.html

Getting Started

To run this project you will need Java, Gradle, and npm install in your system:

  • Java: Java 17
  • Gradle: Latest version should be fine
  • npm: I think you can use a ^16.0.0 version

How to run the frontend

Clone the repo to a folder of you're liking using the command prompt git clone. Recommended code editor for frontend is Visual Studio Code

First you need to navigate to the client folder. Example for Mac cd client

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

How to run the backend

Clone the repo to a folder of you're liking using the command prompt git clone. Recommended IDE for backend is IntelliJ

First you need to setup your IDE, so it can start running the server

  1. Check that you are running Java 17 in your IDE
  • Go to file on the top left
    • Go to Project Structure
      • Go to Project and make sure that SDK is set to Java 17. If you don't have Java 17 you will need to install it
      • After setting Java 17, click Apply and OK

project-structure

  1. After you are running Java 17 in the IDE, you need to set the run file
  2. First you need to build the project by either clicking on the build button or by going on the terminal and running gradle build
  3. After build is BUILD SUCCESSFUL you do this to run the App:
  4. Method 1
    • Go to the UFoodApplication file inside main/java/com/api/developer/ufood and run by clicking on the Play green button next to the class name

run-method-1

  1. Method 2
  • Set up the Run on the IDE

    1. Step 1 - Click on Edit Configuration and it would open a menu

    step-1

    1. Step 2 - Add a new configuration on the top left of the menu (Add SpringBoot)

    step-2

    1. Step 3 - Add everything like the one on the picture below

    step-3

    1. Step 4 - Click Apply and then OK
    2. Final step - Just run the app by clicking on the Play green button on top

About

Find the best location to eat around campus depending on users' needs and budget.

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •