Skip to content

faliqadlan/backend-airbnb

 
 

Repository files navigation

AIRBNB BE-6

AIRBNB

Find vacation rentals, cabins, beach houses, unique homes and experiences around the world - all made possible by hosts on Airbnb

AIRBNB DEVELOPMENT

· ERD · Open API


Table of Contents

  1. About the Project
  2. High Level Architecture
  3. Tech Stack
  4. Code Structure
  5. How to Contrib
  6. Contact

About The Project

  • Find vacation rentals, cabins, beach houses, unique homes and experiences around the world - all made possible by hosts on Airbnb.
  • Guests can find the perfect place to stay for their vacation and explore new experiences while traveling, or online. Hosts can advertise their place, get tips and hosting support, and earn income while creating memorable moments for guests.
  • Build with Golang, Echo Framework, MySQL adn GORM for manage repository, midtrans API for Payment Gateway, Deploy the project on aws.

(back to top)

High Level Architecture

HLA design for this project shown in the picture below


(back to top)

Tech Stack

RESTful-API

Deployment

Collaboration

(back to top)

Code Structure

This project use Layered Architure to organized each components into spesific function

Structuring

  AIRBNB-App-Project2
  ├── configs                        
  │     └──config.go                # Contains list of configuration of the project
  ├── constants                     
  │     └──constants.go             # Contains list constant variable
  ├── delivery                      
  │     ├──templates                # Contains list of http request format based on the result from controller 
  │     │   └── httpRes.go          # Contains list of http request format
  │     ├──controllers              # Contains list of component that receive the request and return a response
  │     │   └── user
  │     │     │   ├── formatter.go  # Contains list of request format for each function on the controller
  │     │     │   ├── user_test.go  # Contains list of function for test each function on the controller
  │     │     │   └── users.go      # Contains list of controller for each entity
  │     ├──middlewares              # Contains list of all middleware 
  │     │   ├── JwtAuth.go          # Contains list of function to config middleware basic auth
  │     │   ├── JwtMiddleware.go    # Contains list of function to config middleware token
  │     │   └── formatter_res.go    # Contains list of response format for each function on the controller
  │     └──routes  
  │         └── routes.go           # Contains list of route to access each function on controller  
  ├── entities                      # Contains model all entity
  │     └── user.go                 # Contains model for spesific entity
  ├── node-output                   # Contains list of documentation
  │     └── open-api-swagger.yaml  
  ├── repository                    # Contains list of functions that process the request and stores it in database
  │     ├── database   
  │           ├── user_test.go      # Contains list of function for test each function on the repository
  │           └── user.go           # Contains list of repository for each entity
  │    └── erd   
  │         └── altaProject.drawio  # Contains list of relations database
  ├── utils                         
  │     ├── mysqldriver.go          # Contains list of function to config MySQL type database
  │     ├── aws.go                  # Contains list of function to config aws s3
  │     ├── midtrans.go             # Contains list of function to config payment getaway
  │     └── hashPassword.go         # Contains list of function to generate password
  ├── .env                          # Contains list of environment variable to run the project 
  ├── .gitignore                    # Contains list of directory/file name that will igonored when push project
  ├── go.mod                  
  ├── go.sum 
  ├── docker-compose.yaml 
  ├── dockerfile 
  ├── main.go                       # Contains list of component that need to be executed first to run the app
  └── README.md    

Unit Test

Coverage result on all functions is 71% which the most functions have reached 100% coverage. Coverage result for each function shown in the picture below

(back to top)

Contact

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%