Bits of Good's central infrastructure API, integrating several in-house services to simplify and streamline project development.
« Back to main README
This is what project teams and API customers interface with. The Gateway guards all sensitive endpoints and utilizes a combination of the feature services described below and the auth service to call subsequent features.
Juno packages are built with Nest.js and follow a standard 3-tier architecture: controllers, service layer, and data access layer. The documentation is fairly comprehensive and a recommended read, but here are the highlights:
-
Modules -
.module.ts
files splitting the package into capabilities, allowing feature encapsulation. There will always be a root module within the package importing all other modules. -
Controllers -
.controller.ts
files for handling and sending HTTP requests . -
Middleware -
.middleware.ts
files for intercepting a client request before it gets routed to a controller. An example for this would be logging middleware, where a request could be sent to a logging mechanism before reaching the route handler. -
Models - files defining the data used in all nest files, typically taking a proto as an input. For more information on proto files, see the proto package.
-
E2E Tests -
.*.spec.ts
specification files testing a particular model or behavior.
├── src
│ ├── middleware
│ ├── models
│ └── modules
│ ├── auth
│ ├── email
│ ├── project
│ └── user
└── test
Make sure to check out the main installation instructions first!
Run E2E tests in watch mode:
api-gateway: `yarn test:e2e:api-gateway-live`