GithubHelp home page GithubHelp logo

bimble's Introduction

bimble

This repo is archived. Please visit https://github.com/OrdinaryTechFolks/bimble to see the latest commit

you know, for dating. Try it at https://bimble-backend-http.ordinarytechfolks.com (self-hosted, sometimes down)

Information

A. Folder Structure

  • Structure according to Golang Clean Architecture https://github.com/bxcodec/go-clean-arch
  • Find code in ./internal folder, there will be 3 layer. These are repo, usecase and handler (from bottom to top). Top layer can reuse bottom, bottom can't call top layer
  • All interface and struct definition in ./internal/domain folder
  • API Definition is on ./api folder
  • Config is on ./config folder

B. Test and others

Please see documentation.pdf for the integration test criteria and result (the last section in the bottom).

Due to time constraint the following is not implemented:

C. How to Run

1. Running dev env with docker

  1. Download docker-desktop with docker-compose cli https://www.docker.com/products/docker-desktop/
  2. Run docker-compose up -d

Alternatively we can use services in the k8s directly using these steps (requires kubectl access):

  1. Run these commands on a new terminal
kubectl port-forward services/yb-tservers -n bimble 5433:5433 & \
kubectl port-forward services/redis-standalone -n bimble 6379:6379 & \
kubectl port-forward services/otel-collector-collector -n bimble 4317:4317
  1. Keep it running

2. Migrate DB with Goose

  1. Set these env
GOOSE_DRIVER=postgres
GOOSE_DBSTRING="postgres://postgres:postgres@localhost:5432/postgres"
  1. Run goose -dir migrations up

3. Running go service

  1. Install make cli https://formulae.brew.sh/formula/make
  2. Run make setup
  3. Run make start-local

4. Modifying HTTP Server Endpoint

  1. Stop the go service
  2. Modify protos in ./api/v1 folder
  3. Run make api, this will generate stub that you can use. It also generate openapi.yaml spec in ./
  4. Start the go service

5. Modifying secret

  1. Install modify-secret https://github.com/rajatjindal/kubectl-modify-secret
  2. Run kubectl modify-secret bimble-backend -n bimble
  3. Edit and save to apply changes
  4. Run kubectl rollout restart deployment bimble-backend-depl -n bimble to reload the deployment

bimble's People

Contributors

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