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

Add Programmatic Serverless #350

Open
wants to merge 1 commit into
base: add-frigg-start-command-and-migrate-some-helpers
Choose a base branch
from

Conversation

seanspeaks
Copy link
Contributor

@seanspeaks seanspeaks commented Oct 17, 2024

Infrastructure Creation and Serverless Configuration

This update introduces a createFriggInfrastructure function that significantly enhances the application's infrastructure setup:

  1. Generates default routers for integrations, authentication, user management, and entities.
  2. Programmatically creates the serverless.yml definition based on configured integrations.
  3. Automatically adds a new router, queue, and queue worker for each integration.
  4. Implements a websocket handler for enhanced real-time capabilities.
  5. Lays the groundwork for future iterations and improvements.

TODO:

  • Determine compatibility with locally defined serverless.yml and consider supporting this option.
  • Resolve Webpack issues related to scope/directory references to address build size concerns.
  • Implement additional override options in the serverless.yml definition based on the Frigg App definition.
  • Move Frigg App definition handling to the root level to support concurrent frontend and backend execution.
  • Develop comprehensive test suite.
  • Verify build and deploy functionality, especially with sls offline.
  • Review and adjust defaults for various configurations (KMS Key, Secrets Manager, domain management, VPC settings).
  • Identify and address additional TODOs through testing and frigg start command usage.
  • Consider adding options to the frigg-start command.
  • Evaluate and implement TypeScript support.

…ction that does a lot of things for us.

1. Creates all of the default routers, integration, auth, user, entity
2. Creates the serverless.yml definition programmatically based on configured integrations
3. Adds a new router, queue, and queue worker for every integration by default
4. Adds a websocket handler just because we can? Largely for demos but useful in a lot of other contexts too.
5. Sets the stage for iterating

TODO:
[] Need to figure out if this works with a locally defined serverless.yml / whether we should support that
[] Webpack was having a lot of issues due to it being referenced from a different scope/directory... really unclear how to resolve this, but probably critical due to build size
[] Add some more override options to the serverless.yml definition based on the overall Frigg App definition provided
[] Get the Frigg App definition handled at root instead of in the backend, so we can also run the frontend at the same time (if it exists)
[] Tests, tests, and more tests needed
[] This needs to be tested for build and deploy. Unclear if it does yet, though running sls offline usually indicates we're alright
[] Check defaults and have different defaults for when someone wants KMS Key vs. env, when they want to use Secrets Manager, and probably a few others that are common/critical (like domain management and VPC stuff).
[] More TODOs but those will become apparent when working through the tests and using the `frigg start` command
[] add options to frigg-start?
[] support for TS?
Copy link

sonarcloud bot commented Oct 17, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarCloud

@seanspeaks seanspeaks mentioned this pull request Oct 17, 2024
2 tasks
@seanspeaks seanspeaks marked this pull request as ready for review October 17, 2024 03:36
@seanspeaks seanspeaks changed the title Okay, this is the doozy. We are now adding a createInfrastructure function that does a lot of things for us. 1. Creates all of the default routers, integration, auth, user, entity 2. Creates the serverless.yml definition programmatically based on configured integrations 3. Adds a new router, queue, and queue worker for every integration by default 4. Adds a websocket handler just because we can? Largely for demos but useful in a lot of other contexts too. 5. Sets the stage for iterating Add Programmatic Serverless Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant