GTBitsOfGood / juno

Juno is the Unified Infrastructure Platform for Developer Acceleration
7 stars 0 forks source link
![E2E Tests](https://img.shields.io/github/actions/workflow/status/GTBitsOfGood/juno/e2e-tests.yml?style=for-the-badge) ![GitHub Releases](https://img.shields.io/github/v/release/GTBitsOfGood/juno?include_prereleases&style=for-the-badge) ![TypeScript](https://img.shields.io/badge/typescript-%23007ACC.svg?style=for-the-badge&logo=typescript&logoColor=white)

Juno

[Bits of Good](https://bitsofgood.org/)'s central infrastructure API, integrating several in-house services to simplify and streamline project development.

Project Description

Juno 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 PNPM Workspaces. The current packages are as follows:

Getting Started

[!WARNING] Due to several of the initialization and configuration scripts requiring Unix-specific functionality, building on Windows is currently not supported. However, you can still install Juno onto Windows via WSL2. When later installing Docker Desktop, follow the official instructions to ensure Docker Desktop WSL 2 is enabled.

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-dev-compose.yml and Dockerfile file.

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

Installation

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

pnpm install

Development

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

pnpm 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.

To run tests a single time for a particular service:

To continuously run tests for a service as file changes are made:

Troubleshooting

Windows

Make sure everything is done through the Windows Subsystem for Linux (WSL).

Some common issues:

If VSCode outputs Failed to connect. Is Docker running?:

To add chmod permissions to all shell scripts:

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