Code Monkey home page Code Monkey logo

droplets's Introduction

WIP

droplets

GoDoc Go Report Card FOSSA Status

A platform for Gophers similar to the awesome Golang News.

Why?

Droplets is built to showcase:

  1. Application of CodeReviewComments and EffectiveGo
  2. Usage of Clean Architecture
  3. Testing practices such as Table-driven tests

Building

Droplets uses go mod (available from go 1.11) for dependency management.

To test and build, run make all.

Organization

Directory Structure

Directory structure is based on Clean Architecture.

1. domain/

  • represents the entities layer from the Clean Architecture
  • contains different core entity definitions and core validation logic
  • this package strictly cannot have direct dependency on external packages

2. usecases/

  • represents the usecases layer from the Clean Architecture
  • Usecases layer builds different business oriented usecases using the entities provided by entities layer
  • Any real use case would also need external entities such as persistence, external service integration etc. But this layer also strictly cannot have direct dependency on external packages. This crossing of boundaries is done through interfaces.

3. interfaces/

  • represents the interface-adapter layer from the Clean Architecture
  • This is the layer that cares about the external world (i.e, external dependencies).
  • Interfacing includes:
    • Exposing usecases as API (e.g., RPC, GraphQL, REST etc.)
    • Presenting usecases to end-user (e.g., GUI, WebApp etc.)
    • Persistence logic (e.g., cache, datastores etc.)
    • Integrating an external service required by usecases
  • Packages inside this are organized in 2 ways:
    1. Based on the medium they use (e.g., rest, web etc.)
    2. Based on the external dependency they use (e.g., mongo, redis etc.)

4. pkg/

  • contains re-usable packages that is safe to be imported in other projects
  • this package should not import anything from domain, interfaces, usecases or their sub-packages

5. web/

  • web/ is NOT a Go package
  • contains web assets such as css, images, templates etc.

License

FOSSA Status

droplets's People

Contributors

spy16 avatar skorotkiewicz avatar fossabot avatar

Watchers

James Cloos 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.