Skip to content

MunsMan/Foppa

Repository files navigation

Foppa

This is the corresponding Project Repository to my bachelor thesis.

Installation/deployment instructions

The setup Process consist of 3 main steps:

  1. Configure SNS Topics
    1. Creating Topics
    2. Linking Topics in variables.ts
  2. Deploying
    1. Installing dependencies
      • yarn
    2. Deploying
      • yarn sls deploy
  3. Configuring Infrastructure
    • yarn run setup

Project structure

The project code base is mainly located within the src folder. This folder is divided in:

  • functions - containing code base and configuration for your lambda functions
  • libs - containing shared code base between your lambdas
.
├── src
│   ├── functions                   # Lambda configuration and source code folder
│   │   ├── hello                   # Example directory
│   │   │   ├── handler.ts          # `Hello` lambda source code
│   │   │   ├── index.ts            # `Hello` lambda Serverless configuration
│   │   │   ├── mock.json           # `Hello` lambda input parameter, if any, for local invocation
│   │   │   └── schema.ts           # `Hello` lambda input event JSON-Schema
│   │   │
│   │   └── index.ts                # Import/export of all lambda configurations
│   │
│   ├── libs                        # Lambda shared code
│   │   ├── apiGateway.ts           # API Gateway specific helpers
│   │   ├── handlerResolver.ts      # Sharable library for resolving lambda handlers
│   │   └── lambda.ts               # Lambda middleware
│   │
│   ├── frontent                    # Svelte Kit Frontend Code
│   │
│   │
│   └── local                       # Scripts to run locally
│       ├── setup.ts                # Setting up aws wrapper logic
│       ├── upload.ts               # script to upload lambda
│       └── consurrentcy_test.ts    # Concurrency Performance Test
├── package.json
├── serverless.ts                   # Serverless service file
├── tsconfig.json                   # Typescript compiler configuration
├── tsconfig.paths.json             # Typescript paths
└── webpack.config.js               # Webpack configuration

3rd party libraries

  • json-schema-to-ts - uses JSON-Schema definitions used by API Gateway for HTTP request validation to statically generate TypeScript types in your lambda's handler code base
  • middy - middleware engine for Node.Js lambda. This template uses http-json-body-parser to convert API Gateway event.body property, originally passed as a stringified JSON, to its corresponding parsed object
  • @serverless/typescript - provides up-to-date TypeScript definitions for your serverless.ts service file

Advanced usage

Any tsconfig.json can be used, but if you do, set the environment variable TS_NODE_CONFIG for building the application, eg TS_NODE_CONFIG=./tsconfig.app.json npx serverless webpack

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published