The purpose of this web application is to showcase the projects that Arky has created throughout his software development journey.
This is the entire backend, deployed on AWS. The client side is deployed here
If you are looking for the client side code go here
This app is structured into 3 categories, with important functions associated with each
- Hosting contains the functions required to deploy cloudfront distributions, all domains, and s3 buckets.
- Rest API contains the function to deploy the monolithic Rest API on API Gateway, as well as every lambda function connected to it.
- Webhooks contains the functions that deploy a DynamoDB Table that is used to store webhook data, so a cron job can run and refresh them after expiration. This also contains the logic that deploys a seperate API on API Gateway that handles callback events from a github and google drive webhook event.
This app uses a series of dependencies and you can check the list in the following package.json file. Most notably are the following:
- AWS CDK Lib which is used to deploy all AWS infastructure, as code.
- Google Apis for creating webhooks on a personal google drive, that push changes to database when changes are made
- Jimp for programmatically editing images
- HTML to Text for parsing through HTML, and allowing personal site to display information available to the public UI, but not available on it's public API
- Email validator for validating email structures, and date-fns for validating dates
- Azure's Computer Vision AI API that is used to generate a caption to an uploaded image.
This project uses Typescript for type safety, however, AWS lambda functions cannot be written as such. Therefore, custom build steps are needed to compile typescript to javascript.
This is automated by calling custom build scripts, included in the top-level directories (hosting, rest api and webhooks). These scripts use built-in node libraries, like execShellCommand
and fs
for initiating build actions, and copying resulting files into the build folder.
This works suprisingly well, and no issues have been observed so far. However, there is always a chance that files will take to long to copy, and cause a build failure.
- To build this project, to check for type saftey, run npm build
- To build this project and migrate compiled files into a build folder and generate a cloudformation template, run
npm bootstrap
This project is auto deployed through a custom github action, that creates cloudformation templates and then auto deploys them to AWS.
To initate the deploy process on your local machine you must:
- Request access to an account on AWS, that has AWS Lambda, Route 53, API gateway, Cloudfront and/or DynamoDB access. You will only be able to change infastructure that your account has access to.
- Run
npm serve