HUFGhani / sveltekit-cdk

Tools for deploying SvelteKit to AWS using CDK

Home Page:https://juranki.github.io/sveltekit-cdk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SvelteKit CDK Adapter

Note: 2022-02-12 Radically narrowed scope of the project to be able to focus on ease of use and robustness. Dropped support for regular lambda SSR and CDK v1

WARNING: Not for production, yet!!

This repo contains tooling to deploy SvelteKit sites to AWS using CDK.

Tools are split to two packages: adapter that plugs into the sveltekit project, and constructs that are imported to CDK project to integrate SvelteKit site to other parts of your system.

  • @sveltekit-cdk/adapter

    • plugs into the sveltekit project and makes site available to be consumed in CDK stacks
    • npm version
  • @sveltekit-cdk/constructsv2

    • SvelteDistribution construct bundles and deploys the site to Lambda@Edge and S3, and distributes it with CloudFront
    • npm version

Howto

TODO: fill in details

  1. init sveltekit project
  2. init cdk project
  3. add adapter to sveltekit project and point it to cdk project
  4. add constructs to cdk project
  5. optionally edit cdk stacks to
    • hook site up with other resources
    • add custom domain and certificate
    • adjust capacity allocation
    • ...

Status

  • In initial development, API IS NOT STABLE!
  • I feel quite confident about overall structure
  • Areas of uncertainty that are likely to cause significant changes (== opinions, feedback and advice appreciated)
    • how to design constructs to be both intuitive and flexible; how much flexibility is really needed (2022-02-12: focus on ease or use and robustness, even at the expence of flexibility)
    • dependency management of constructs: cdk moves fast, v1 and v2 have different approaches to packaging and versioning (2022-02-12: only support v2)
    • adapter interface of sveltekit might still change a little

Links

About

Tools for deploying SvelteKit to AWS using CDK

https://juranki.github.io/sveltekit-cdk/

License:MIT License


Languages

Language:TypeScript 68.1%Language:Svelte 24.4%Language:JavaScript 3.5%Language:CSS 2.8%Language:HTML 1.1%