Coder Social home page Coder Social logo

dealls's Introduction

Dealls Job Interview

Backend system for a simple dating app. The system is built using Golang and PostgreSQL. in this project I use multiple protocols, GRPC and RestFull API. This project represents speed in feature development

Prerequisites

  • Golang version 1.21 or higher
  • PostgreSQL
  • Docker
  • Docker Compose
  • Makefile
  • Golang Migrate
  • Golang Mockery
  • Buf Protoc
  • Golang Google Wire

Tech Stack

  • Connect RPC

    Connect RPC is a library for building RPC servers and clients in Go. It's built on the gRPC framework, and it's designed to be easy to use and highly performant.

    Connect RPC support multiple protocols, such as HTTP/1.1, HTTP/2, and gRPC.

  • Gin Gonic

    Gin is a web framework written in Go, Gin support RESTful API and http2 it's easy to use.

  • Gorm

    Gorm is a library for building ORM in Go, it's easy to use and support multiple databases. Using gorm we can build a database model easily and fast, then focus for the business logic.

  • Go Cron

    Go Cron is a library for building cron jobs in Go, it's easy to use and support multiple time format. I use this library to build a cron job for deleting the table interest that has been show for yesterday.

How to Run

  • Clone this repository
  • Create a new file .env in the root directory
  • Copy the content of .env.example to .env
  • Fill the .env file with your configuration
  • Run the mode development following command
    make gow
  • Run in docker compose
    docker-compose up
  • Connect your database and Run the migration
    make migration-up version=1

How to Run Test

Run the test following command

make test

ERD Diagram

alt

Structure Project

  • assets contains the assets for the project
  • config contains the configuration for the project
  • constant contains the constant for the project
  • crons contains the cron job for the project
  • domain contains the contract interface for the project
  • dto contains the data transfer object for the project
  • gen contains the generated file from the protobuf
  • injector contains the dependency injection for the project
  • middleware contains the middleware for the project
  • migration contains the database migration for the project
  • model contains the database model for the project
  • pkg contains the package or utils for the project
  • proto contains the protobuf file for the project
  • repository contains the repository to access the database
  • routers contains the router handler for the project
  • service contains the service to handle business logic for the project
  • .env contains the environment configuration for the project
  • .env.example contains the example of the environment configuration for the project
  • .gitignore contains the git ignore for the project
  • go.mod contains the go module for the project
  • go.sum contains the go sum for the project
  • main.go contains the main file for the project
  • Makefile contains the makefile for the project
  • buf.gen.yaml contains the buf configuration for generate proto the project
  • buf.yaml contains the buf configuration for the project
  • Dockerfile contains the docker file for the project
  • docker-compose.yaml contains the docker compose file for the project
  • README.md contains the readme and documentation for the project

dealls's People

Contributors

triadmoko 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.