Skip to content

fior-digital/coding-challenge-core-ledger

Repository files navigation

Project Overview

Welcome to the project repository! This guide will help you get started and understand the different parts of the project.

Hint: If you encounter timeouts during pnpm run dev, pnpm run deploy or pnpm run test, it might be due to the database needing to spin up as it is currently in idle mode.

Technologies Used

  • SST: We use SST for easy serverless deployments and live lambda development.
  • Database: PostgreSQL with Drizzle ORM.
  • Messaging: EventBridge Event Bus for easy publishing and subscribing.

Code Structure

Feel free to adjust the code structure as you see fit and use the patterns that work best for you.

  • Infrastructure: Located in the /stacks folder.
  • Application Code: Found in /packages.
  • Lambda Functions: Found in /functions.

Installation

You will need an active AWS account to run this code. Follow these steps to set up your environment:

  1. Setup AWS Account
  2. Create IAM User
  3. Configure AWS CLI

Hint: Please ensure you have node v18.18.2 or above installed.

Then, follow these commands:

pnpm install
pnpm run build # Ensures all types are working
pnpm run dev # will start deploy the ressources and start the live lambda development

You can optionally run with aws-vault:

If you update the database models, generate the migration files with:

pnpm run generate:migrations

Running Tests

To run tests, ensure your environment is deployed pnpm run deploy or running with pnpm run dev. In another terminal window, run:

cd packages/core && pnpm run test

Hint: The database might need some time to start. If you get timeouts, try again after a few minutes.

Removing Resources

Remember to remove resources after you are done to avoid unnecessary AWS billing costs, especially for the database.

pnpm run remove

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •