Code Monkey home page Code Monkey logo

catalyst's People

Contributors

kosatnkn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

catalyst's Issues

Add New[Name]* Functions

Some structs have .NEW() functions instead of .New[Name] function for initialization. Although this works well it is better to move to the latter convention.

Transaction Wrapper

Add a transaction wrapper in usecase level so that queries run from Repositories can be grouped in to database transactions.

This should allow nested transactions so we don't need to worry about transaction management when calling a usecase level function from another usecase level function

Remove Adapters From Domain

Move adapters from externals to somewhere else in the project since adapters do not directly belong in the domain

`channels` to `mediums`

Using channels package to to encapsulate all communication channels might confuse the user. Can we change channels to mediums so that the usage interface is cleaner.

Write Wiki

Write the wiki for the project covering all technical decisions and sample implementations.

Validator Setup Issue

Need to double check on the validator initialization process.

	validate = validator.New()

	en := localsEn.New()
	uni = ut.New(en, en)

	// this is usually know or extracted from http 'Accept-Language' header
	// also see uni.FindTranslator(...)
	trans, _ := uni.GetTranslator("en")

	validate = validator.New()
	enTranslations.RegisterDefaultTranslations(validate, trans)

API Mock

Research on a new mock server

Add Go mod

Remove Glide and add go mod as the dependency manager

Show API Info in Base Route

Add an Information controller to provide details of the API. This would be helpful in environments where many micro-services are running. A summary such as name, version and purpose of the API can be obtained by calling the root path <base_url>/ of the API.

Update Error Handler

The error handler is currently showing this signature.

response.Error(ctx, w, err, ctl.container.Adapters.Log)

Need to update it to present this signature

response.Error(ctx, w, err)

Rename `channels` dir to `transport`

The name channels used for the directory that holds sub packages for different communication mechanisms causes confusion. It is better that we rename this to something that gives more meaning to the functionality. Something like transport

Move Validator Back Into app

The reason that we implemented the validator as an adapter rather than a package in app is to remove the creation of a validator object for each and every request. But it seems the previous implementation will make much sense if we consider localization of validation errors.

Adapters Repository

Adapters need to be decoupled from Catalyst itself so that they can be more maintainable.

Add UnpackerError

Create a new error type UnpackerError to better present unpacking error messages.

{
    "errors": {
        "type": "Validation Errors",
        "trace": "Require following format: {\n\t\t\"street\": <string>,\n\t\t\"city\": <string>,\n\t\t\"planet\": <string>,\n\t\t\"phone\": <string>\n\t}"
    }
}

Project Generator to Create New Project From Catalyst

Need a way to create a new project using Catalyst as the template. The project generator needs to do the following

  • Interactive CLI to input project name, Catalyst version and other information to be used by the generator
  • Ability to use an openapi.yaml document to generate the endpoints, unpackers and transformers and maybe stubs for handler methods
  • Do a git init on the generated project

Add a Sample Set

Add a Sample set to showcase all functionality Catalyst is capable of and remove the Test set so that it will not interfere with unit test naming conventions.

What to add

  • sample/ route set for CRUD operations
  • A SampleController
  • sample usecase package to handle CRUD operations
  • A SampleRepository
  • Add a Postman collection to CRUD operations

Remove Data and Error Wrappers

It is said that enveloping data is no longer needed. Research on this and remove data and error wrappers if not necessary.

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.