Git Product home page Git Product logo

abitia's People

Contributors

kbkk 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

abitia's Issues

Drop Nest.js

Cancelled: Even if Nest.js isn't perfect maintaing a set of abstractions over a more flexible framework like Fastify brings a lot of maintainability burden regarding DX, possible bugs, etc. I will pursue building on top of Nest.js and provide a set of good practices (to be established).

Original post:
So far Nest.js stands in the way of achieving a modular monolith application:

  1. Relying on a hack to correctly register HTTP endpoints is not something I'd like to rely on in a production system. This can potentially break with a Nest.js update.
    // Todo: this may break.
  2. Nest's module system allows for easy inverse of control in code but not in the modules themselves. This is solved by async providers which are a nightmare to maintain and leads to bad DX.
    public static registerAsync(options: AccountAuthModuleAsyncOptions): DynamicModule {
  3. (Personal) Not convinced of Nest as a whole.
    • The "go-to" DTO tools are class-validator and class-transformer which are type unsafe by design, not maintained very well. Since I've had real nightmare stories with those, this project has replaced them with a custom solution built on top of zod.

Suggested solution:
None yet, needs research. Most probably a DI container like tsyringe and build around a simple http framework.
Implement a service template using fastify and inversify.

Related PRs:

  • Implement DI + Fastify #37
  • #40
  • Implement an OpenAPI specification generator

Implement OpenTracing

Needs design, top of the head action items:

  • Request-scoped contextId/spanId with async local storage
  • Instrumentation
    • Database calls
    • HTTP calls
    • Events sent

Turns out these can he handled out of the box with OpenTelemetry. #26

Can we have deps bump?

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR!   @nestjs/common@"^10.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/common@"8.x" from @abitia/[email protected]
npm ERR! node_modules/@abitia/zod-dto
npm ERR!   @abitia/zod-dto@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /home/apu/.npm/_logs/2023-07-08T06_49_17_010Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/apu/.npm/_logs/2023-07-08T06_49_17_010Z-debug-0.log

Split Swagger and ZodToDto into two separate packages?

Hey, my team is currently using class-validator which I'm not a fan of it at all :) With Nest.js which means we're pretty locked on classes being available in the runtime for Nest to be happy.
I try to find a way to migrate towards zod for validation as much as I can, but the Swagger part is pretty useless for us as we're using GraphQL, so having Swagger imported even if we're not using it, is a bit wasteful.
To guarantee that Swagger stuff will never get into the runtime/compile-time no matter the setup, having it as a separate module will be nice.
Since you have rush.js setup, I guess, it should be pretty straightforward to achieve :)

Afterthoughts, I guess, with GraphQL we will have to stick to class-validator as, well, all GraphQL stuff is done using decorators, so we won't be going away from classes for DTOs/InputTypes/Models, but, anyway, having it separated is just a good thing anyway.

Create documentation

Main README:

  • Rush.js setup instructions / quick guide
  • Tree list with packages / services & links to their readme
  • Roadmap (libraries to be written, decomposing to microservices)

Monolith README:

  • Why start with a monolith?
  • Architecture description / drawings
  • Describe components under monolith's Core/ dir

General guides:

  • Building a CI/CD workflow
  • Cloud deployment considerations

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.