Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tech-debt: Make framework more "composable" #36

Open
brent-hoover opened this issue Jul 6, 2024 · 0 comments
Open

tech-debt: Make framework more "composable" #36

brent-hoover opened this issue Jul 6, 2024 · 0 comments
Labels
tech-debt Just my catch-all term for work that makes the app better but doesn't add a user feature

Comments

@brent-hoover
Copy link
Contributor

One of the goals of the framework is to be "batteries included" but I think you should be able to have more flexibility in what you want so you want so you are not carrying around a lot of extra dependencies for features you don't want or use. Obviously plugins would be the way you should be able to add those in. Features that should probably be plugins are:

  • The event system
  • The RBAC

That said I don't have any plans on supporting other dbs besides Mongo, at least not for a while. I think one of the reasons you would come to this framework is that you want Mongo to be a first-class citizen

We have a fair amount of dependencies already and I think we should try to keep this list very small and internal

For example when you bootstrap an Adonis project this is your package.json:

"dependencies": {
    "@adonisjs/auth": "^9.2.3",
    "@adonisjs/core": "^6.12.1",
    "@adonisjs/cors": "^2.2.1",
    "@adonisjs/lucid": "^21.1.0",
    "@vinejs/vine": "^2.1.0",
    "better-sqlite3": "^11.1.2",
    "luxon": "^3.4.4",
    "reflect-metadata": "^0.2.2"

You are just getting their own core packages plus database support

Ours looks like:

  "dependencies": {
    "@typegoose/typegoose": "^12.5.0",
    "apollo-server-express": "^3.13.0",
    "bcrypt": "^5.1.1",
    "bullmq": "^5.8.2",
    "casbin": "^5.30.0",
    "casbin-mongoose-adapter": "^5.3.1",
    "dotenv": "^16.4.5",
    "envalid": "^8.0.0",
    "express": "^4.19.2",
    "graphql": "^16.8.1",
    "jsonwebtoken": "^9.0.2",
    "kafkajs": "^2.2.4",
    "mongoose": "^8.4.1",
    "reflect-metadata": "^0.2.2",
    "type-graphql": "^2.0.0-rc.1",
    "typedi": "^0.10.0",
    "winston": "^3.13.0",
    "winston-daily-rotate-file": "^5.0.0"
  },

Which is a much greater spread. I think Kafka especially is a pretty big extra burden but I have a separate ticket to move that event system to be backed by Redis pubsub

@brent-hoover brent-hoover added the tech-debt Just my catch-all term for work that makes the app better but doesn't add a user feature label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-debt Just my catch-all term for work that makes the app better but doesn't add a user feature
Projects
None yet
Development

No branches or pull requests

1 participant