GTBitsOfGood / juno

Juno is the Unified Infrastructure Platform for Developer Acceleration
7 stars 0 forks source link

Juno

Juno is Bits of Good's central infrastructure API, integrating several in-house services to simplify and streamline project development.

Repo Structure

The project is a monorepo using a combination of NestJS, gRPC, Protobuf, Prisma, and Postgres for API endpoints, interservice communication, and object storage/modeling.

Packages are managed through Yarn Workspaces. The current packages are as follows:

Building

Prerequisites

Using Docker

As this repository contains multiple packages, Docker is used to spin up all microservices in order with their respective dependencies. For more details regarding the docker process and its internal networking mechanism, take a look at the docker-compose.yml file.

Most of the docker-related functionality has been abstracted away into yarn commands.

Install needed dependencies

All package dependencies must first be installed by using the following command in the root directory:

yarn

For development

For spinning up the entire stack (not watching for changes):

yarn start:dev

For spinning up the stack and automatically updating as changes are made to files:

yarn start:dev:live-all

Making requests

Requests can be made at the endpoint localhost:3000/some/request/path.

Testing

Juno currently has support for E2E tests via Jest.

Run tests for specific microservice

(In root directory)

If you're working on juno and wish to test with your updates in live time (watched tests), run the prior command suffixed with -live. This looks like the following for each service:

Windows Troubleshooting

.sh related problems - switch line endings to LF

additional property <> is not allowed> - update docker

db-service is unhealthy - wget script likely failed to install, make sure all .sh files have correct line endings and permissions (chmod)

image

./get_grpc_probe.sh: Permission denied - add permission to get_grpc_probe using chmod:

chmod +x docker/get_grpc_probe.sh
chmod +x packages/db-service/entrypoint.sh