Code Monkey home page Code Monkey logo

galaxyops's Introduction

@galaxyops 🌌

@galaxyops is an architecture aimed to support efficient project management and accelerate domain-driven DevOps teams running workloads on AWS.

CI Codacy Badge Codacy Badge

Overview

Running multiple applications on AWS without a robust architectural framework may lead to chaos. @galaxyops is a comprehensive cloud architecture solution, emphasizing modern DevOps practices on AWS. This repository lays the groundwork for enterprise software landscapes, ensuring scalability and maintainability across projects.

Features

  • Universal Language: Leveraging TypeScript for microservices, enhancing performance, readability, and maintenance.

  • Simple Setup: Turn-key deployment on bare metal systems, designed for MacOS silicon environments without Docker dependency.

  • Monorepo Architecture: Centralizes development, streamlining code sharing, versioning, and dependency management with tools like Nx and PNPM.

  • CI/CD Pipeline: Autonomous pipeline for deploying auditable artifacts to AWS using IaC, ensuring consistency and scalability.

  • Event-Driven Microservices: Fault-tolerant communication via queues, with event data archived in a data lake for analytics.

  • Schema Contracts: Automatic mocking and validation for seamless inter-service communication and data integrity.

  • Ephemeral Environments: Provisioning of TLS certificates and email services using AWS Org Formation.

  • User Authentication: Integration of Cognito for user registration and authentication.

  • SPA Frontend with BFF: Single-page application frontend hosted on S3 and deployed via CloudFront, with middleware for backend operations.

Getting Started

To install and build all packages, follow these steps:

corepack enable pnpm
pnpm install
pnpm nx run-many -t build --all
pnpm nx run hydrate-dotenvs:start hydrate ../../..

Scripts from any project can be ran:

pnpm nx run package-name:script

Install the following

brew install jq # MacOS, used for lambda layer builder

Flow Chart

AWS Multi-Account Architecture Initial Setup

These steps are required once by the platform team to initialize the IaaS.

  1. Setup AWS Org Formation.

  2. Set an environmental variable in the shell configuration file to establish a default AWS CLI profile for seamless authentication and resource access.

    echo 'export AWS_PROFILE=DeveloperSandbox' >> ~/.zshrc
  3. Login via SSO and bootstrap deployments. Deploy platform, services, and then clients in that order.

     aws configure sso
     pnpm nx run aws-sso:start DeveloperSandbox
     pnpm nx run-many -t cdk:bootstrap --all
     pnpm nx run-many -t cdk:deploy --projects=tag:scope:platform --parallel=false
     pnpm nx run-many -t cdk:deploy --projects=tag:scope:services --parallel=false
     pnpm nx run-many -t cdk:deploy --projects=tag:scope:middleware --parallel=false
     pnpm nx run-many -t cdk:deploy --projects=tag:scope:clients --parallel=false
  4. Login via SSO to tools account and then deploy tools.

    pnpm nx run aws-sso:start tools
    pnpm nx run-many -t cdk:bootstrap --all
    pnpm nx run-many -t cdk:deploy --projects=tag:scope:aws-tools-account --parallel=false

Documentation

Comprehensive documentation is essential for understanding and maintaining this project. Each project and folder structure should feature a README.md files containing documentation following RFC 2119 standards.

Note Use ./tools/help.sh for information on builtin commands.

Third Party Documentation

Contributing

Pull requests and bug reports are welcome on GitHub at https://github.com/hxtree/galaxyops. Please follow the code of conduct when contributing.

Acknowledgements

License

All packages available NPM are MIT licensed.

galaxyops's People

Contributors

hxtree avatar ifm-studio avatar aerisapp avatar dependabot[bot] avatar snyk-bot avatar

Stargazers

LZ91X  avatar  avatar Tuan Duc Tran avatar CyberJunkie avatar Lucas Silva avatar  avatar Leonardo Souza avatar Yeong-in Jang avatar Sam Hammer avatar  avatar Mauro Risonho de Paula Assumpção avatar  avatar

Watchers

 avatar  avatar  avatar

galaxyops's Issues

dynamic image generation.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

make a service that deploys a s3 bucket with a cloud front distubution.
it should contain a mongo db instance to keep track of files
it should allow request to pass a focal point and a image size. if the file exist with that request the file is returned.
if the file exist but not with regards torequest one is generated and then sent.
authorization should exist to prevent abuse.l
a srcset element can then be included on the page.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

separate luck-by-dice

part of luck by dice service is a library the other is a service. Move the library over to libraries to allow others seeking to have dice roller use and then rename the service dice-service.

Authenitcation and ACL

We have authentication services.
We have a login form on the admin client.

Want to:

  • add key/code verification for signup endpoint
  • add authentication support in middleware to handle roles.
  • Considering CASL and role base permission with various endpoints
  • Don't want to use amplify.
  • add registration
  • add forgot password
  • add signup endup to auth service
  • add login endup to auth service
  • add signup form
  • integrate login form with auth serivce
  • add a uuid4 userid to cognito attributes to
  • generate jtw token on login
  • use jtw token for future auth request
  • sign out
  • sign out time out
  • allow for addition info about the user to be stored in mongo correlate by userid v4

rush cov bin

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

rush start requires user to clone or run script from bin

Describe the solution you'd like
A clear and concise description of what you want to happen.

npx @cats-cradle/rush-coverage

add bin command and file

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

in readme would be good to have github ci codacy example. also switch ci to use npx command too.

rush coverage

Is your feature request related to a problem? Please describe.
Rush coverage must match the version of the rush used in the repo.
This does not help with package reuse.

It would probably make more sense to dependent on another abstraction layer than rush for projects, as to prevent need to use exact version.

Describe the solution you'd like
e.g. pnpm could be used, although the following includes /dist/, cdk.out/ etc.

pnpm m ls --json | jq -r '.[].path

jq -r '.[].username'

Describe alternatives you've considered
glob files

// glob.js file

const glob = require('glob');
glob('**/coverage.final', (err, files) => {
    if (err) {
        console.log(err);
        return;
    }

    console.log(files);
});

find -name -- maybe performant?

Additional context
Add any other context or screenshots about the feature request here.

Not a road blocker but would make package much more user friendly for other monorepos.

Add auto generate character sheet

Add auto generate character sheet, maybe related to spawn, endpoint

there would be the level (fixed, or range or array), and how the discipline points are spent mainly (auto or by param)

Add endpoint that map character sheet moves to a interactive menu.

Enable two character sheets to battle each other via using there menu

Call it VS or something

https://casl.js.org/v6/en/guide/define-rules user paid unpaid game master admin unauthenticated user game instance owner can(read, write, update where instance id) acl concerning game progress

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

vsliveshare.vsliveshare

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

https://www.youtube.com/watch?v=B6ZrVLkilec&t=870s

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add front end render

Add 3d isometric - ish rendering engine similar to prior one build but with camera angle adjustable. basic post mapping.

Generate some base objects, grass, rocks/stone, water.

setup publishing packages to npm

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

packages that might be beneficial to others should be deployed to npm during ci.

Describe the solution you'd like
A clear and concise description of what you want to happen.

when code is merged into master rush should publish applicable code to npm for all packages that feature shouldPublish

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

none

Additional context
Add any other context or screenshots about the feature request here.

Root API

API gateway between projects needs to be assessed
See /platform/root-api/README.md

Stats component

Component that that can be used for story telling purposes. Displays three stats:

Screenshot 2024-06-30 at 2 13 10 AM

Action modifier equipment.

steal, disguise, disarm (maybe), etc should modify player equipment via actionEffects also party inventory

steal would remove item and place it in invetory
traps would remove a prepared trap.

using a item would remove it from inventory

disguise would change characters outfit for a duration.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Allow for archetype and character skills

Currently there is only support for skills obtained via discipline, e.g. class skills.

A character may obtain a skill through an event or encounter. Also some skills may not be associated with a discipline. Add support for such skills, add them as applicable to archetypes. Separate current skills, class/discipline skills from other skills.

DNS

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Add DNS to microservices scoped to AWS account.

should be able to curl individual services

-> api token ->
https://api-test.cats-cradle.io/default/character-sheet/affiliations/?name=Keepers
https://api-sandbox.cats-cradle.io/jsmith/character-sheet/affiliations/?name=Keepers
https://api.cats-cradle.io/default/character-sheet/affiliations/?name=Keepers

Also consider use cases for private DNS.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Set global package name

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

In order for any package to be pushed to npm the org should be determined and registered.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Pick an org name and then setup for one package to be published under that org name

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

None

Additional context
Add any other context or screenshots about the feature request here.

Need to have name not be used and be something that is relative to package. Short would be ideal, must work with rush.json etc.

Upgrade rush to allow for pnpm v8

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Upgrade rush and pnpm version to 8.
microsoft/rushstack#4033

This should allow for the pnpm deploy feature

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

spawning probability

need to detemine unit of measurement for spawning.

probability: number;
uom:??

is it per minute?
Is it per map generation?

is there reswapping while within a give map?

Populate on UUID based _id

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

This works with populate:

@IsUuidV4()
@prop({
type: MongooseSchema.Types.ObjectId,
ref: 'Person',
})
public person: any;

This does not work with populate:

@IsUuidV4()
@prop({
type: MongooseSchema.Types.UUID,
ref: 'Person',
})
public person: any;

Describe the solution you'd like
A clear and concise description of what you want to happen.

Be able to use populate with UUID

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

The issue looks to be due to mongoose and was patched. Should be resolved by upgrading packages.

Automattic/mongoose#13317

Update shrinkwrap on PR.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Dependobot, Synk, etc. PR as not actionable because those utils do not perform rush update to update the shrink wrap. This makes it time consuming to accept package recommendations and see if the failure is related to dep undate failing.

This step is also often missed by humans as well.

Describe the solution you'd like
A clear and concise description of what you want to happen.

On PR run github action to checkout branch, perform desired commands, and push to branch. This should be possible using gh.

  • name: Checkout PR env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    run: |
    #checkout branch
    gh pr checkout ${{ github.event.pull_request.number }}

rush update
rush api

etc

push changes

env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: git push

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

there is an issue with linting running in local dev, likely hook

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Ticker

Unlike other applications games continuously run independent of user input. Where is the services that is persistently running?

Service -> State of the world -> User
User -> Service -> State of the world

Complete CodePipeline Deployment

Once Github CI uploads deployment to S3 the CodePipeline kicks off, but doesn't actually complete to deploy the project.

Also, a CodePipeline is needed for each project, but this can be handled as a separate issue.

mongoose memory

use config service for in memory db and have start just set the env. this should prevent the need to have two root modules.

AWS S3 Pipeline

Github uploads artifacts to s3 bucket during each merge upon successful build.

But the CodePipeline is not kicking off from there.

A/C

Code pipeline should automatically deploy software to sandbox environment.
After successful build in lower level environment it should deploy to QA environment
After successful build in QA environment it should go to prod environment.
Consider ephemeral environments for development purposes.

storybook switch from tsdx to native

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
the design system is using tsdx and rollup. this was very quick to setup at the time, but with storybook 7. vite seems like the way to go.

https://storybook.js.org/blog/first-class-vite-support-in-storybook/

npx storybook init --builder=vite

Describe the solution you'd like
A clear and concise description of what you want to happen.

design system builder is flaky. it doesnt work well with rush build. often it does build. it does work well with rushx build. This is causing ripplinf effects with clients

https://github.com/storybookjs/builder-vite#typescript

Maybe able to switch bundler

rush add --package -D @storybook/builder-vite

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

speed up unit test by making parallel again

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Unit test coverage is increasing but test are taking a while in CI.

Describe the solution you'd like
A clear and concise description of what you want to happen.

With mongo db test each test needs to run on a unique database to avoid bleed over of information when running in parallel

beforeEach(async () => {
const dbName = test-db-${Math.random().toString(36).substring(7)};
await client.db(dbName).collection('yourCollection').deleteMany({});
});

Also on PR we changed it to run every test verses only test for packages that had changes. This help prevent breaking changes, but may of not been necessary.

Describe alternatives you've consideredAdd any other context or screenshots about the feature request here.

A clear and concise description of any alternative solutions or features you've considered.

We already setup and tear down data but in order to run in parallel databases between each test should be isolated. This is particularly a concern for service e2e-spec tests.

Additional context
Add any other context or screenshots about the feature request here.

None

add player-client

add a player client.
use localStorage and sessopmStorage to maintain client side game values.
player client should be a spa.
have it use threejs
remove unreal
have it consume design system for hud.

CORPG Maker

The instance of the game should not be tightly twined. Allow game logic to be easily swapped out for the purpose of other games. Allowing for the creation of a Co-Op RPG Maker.

Developer portal

Instead of granting access to each microservice, it be nice for there to be a developer portal

  • can each service serve its openapi.spec? Or could we generate and upload them to s3 during deploy to be stitched together?
  • developer portal would need to maintain access keys that would work with api middleware

Add average to dice roller.

Add a average roll calculation to luck by dice. This could be used for displaying stats.

The average roll of a 1d6 (a six-sided die) can be calculated using the formula for the average (or expected value) of a discrete uniform distribution:

Expected value

1
+
2
+
3
+
4
+
5
+
6
6
Expected value=
6
1+2+3+4+5+6

Calculate the sum of the numbers on the die:

1
+
2
+
3
+
4
+
5
+
6

21
1+2+3+4+5+6=21

Divide this sum by the number of possible outcomes (which is 6):

21
6

3.5
6
21

=3.5

Therefore, the average roll of a 1d6 (a fair six-sided die) is 3.5. This means that over many rolls of the die, the average value you would expect to get is 3.5.

Area of Effect map to define skills impact. Weather Aoe impacts party or enemies. targets: -self caster -party member -party members -impact aoe map, abstraction layer to make reusuable. e.g. cone ft, raius 5 ft, burst, line 15 ft, line 30 ft, cube 5ft. - enemy - enemies - max distance - min distance? flesh out...

Area of Effect map to define skills impact.Weather Aoe impacts party or enemies.targets:-self caster-party member-party members-impact aoe map, abstraction layer to make reusuable. e.g. cone ft, raius 5 ft, burst, line 15 ft, line 30 ft, cube 5ft.- enemy- enemies- max distance- min distance?flesh out...

Recursive Skills

All skills menu slot are recursive. For example a summons skill. Or preparing a type of food.

Characters need to learn Magic in order to use Fire for example. There is a child parent relationship.
It would be best to indicate this relationship in the data source, character-sheets/data rather than creating it on front end.

pipeline

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

aws pipelines should kick off on merge to automatically deploy code.

code needs to be deployed from the tools account.

Describe the solution you'd like
A clear and concise description of what you want to happen.

when code is merged into main it gets deployed in aws

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

one merge could cause multiple cloud formation stack changes.

expose probability in mock factory

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
expose probablity in mock factory

Describe the solution you'd like
A clear and concise description of what you want to happen.

to make some unit tests simpler

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

aws sso doesn't select profile on host machine

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

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.