GithubHelp home page GithubHelp logo

branchtalk-io / backend Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 4.0 1.29 MB

Reddit-clone demonstrating how larger, DDD-based, event sourced, purely FP application could be implemented in Scala (if requirements would justify certain costs!).

License: GNU Affero General Public License v3.0

Makefile 0.34% Scala 99.21% Shell 0.07% PLpgSQL 0.38%
cqrs-es ddd example-project functional-programming scala

backend's People

Contributors

mateuszkubuszok avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

backend's Issues

Email confirmation and lifecycle

  • make User.Email an ADT - New, Confirmed, Updated
  • create reads/writes to enable email update and confirmation
  • expose this functionality via endpoints
  • it-test it

Avoid reprocessing of what was intended to be the same request

  • require request ID in request which modify state
  • store IDs of received requests in some cache for some time
  • return calculated value instead of processing request again
  • apply this only to commands - queries should be not be cached
  • apply this logic after authentication to make all changes in permissions reflected

Improce event handling to make projections idempotent

  • store IDs of events that were processed successfully
  • filter out events which have IDs on processed events list
  • use this logic to make sure that events are idempotent even if offset is commited every once in a while
  • separate Command -> F[Event] translation from Event -> F[Unit] projection, to make events replayable

Controversial posts

  • design how controversial topics could be recognized
  • implement domain logic
  • expose it via API
  • test it

Polish HTTP4s setup

  • add CORS handling (there is a HTTP4s middleware for it) in AppServer
  • add Prometheus instrumentation (there is a HTTP4s middleware for it) in AppServer
  • create special HTTP thread pool Resource for BlazeServer in Program

Add NEL and NEC Jsoniter codecs

Implement Jsoniter codecs for: NonEmptyList, NonEmptyChain and other used structures that aren't supported out of the box - right now they are handled as ADTs which is wrong.

Implement it in io.branchtalk.api.

Configure monitoring example

  • implement logging JSONs to e.g. elasticsearch
  • expose methics e.g. by prometheus
  • add elasticsearch and kibana and graphana to docker-compose

Notifications domain

  • subscribe to events
  • send notifications to a websocket in real time
  • store notifications until marked as read by user

Documentation

  • better readme
  • design decisions
  • how to build, run, use

Hot posts

  • design how hot topics could be recognized
  • implement domain logic
  • expose it via API
  • test it

Add upvotes and downvotes to Discussions

  • create a new table to track who voted and who didn't - consider looking at other databases as well if that would make it easier and faster
  • create reads, writes and events
  • it-test side-effects

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.