Skip to content

the-collab-lab/code-cupid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

code-cupid

Demo repo for AWS App Composer meetup talk. The repo contains code for an app that connects developers with open source projects. Kind of like finding a Valentine's date, but for code! 💘

We ❤️ AWS Application Composer.

Cloud Resources

application-composer-template yaml

Quickstart

  1. Clone this repo
  2. Install the AWS CLI and SAM CLI
  3. Sign up for an AWS account if you do not have one or use an existing account (see warning below)
  4. Configure the AWS CLI
  5. Run sam build
  6. Run sam deploy --guided and follow the prompts

Alt: Instead of steps 4-5, this can also be done via Application Composer and the AWS Toolkit for VS Code using the "sync" button. Getting started guide here.

Hot Tip: view all of your deployed Lambda logs at once in this stack in your terminal by using the SAM CLI command

sam logs --profile <your-aws-profile-name> --region <your-aws-region> --stack-name <your-stack-name> --tail

Warning: Anything you deploy to an AWS account will cost money if it goes beyond the free tier. Make sure to clean up your resources after you are done with this demo.

Alternatively, you can ask someone for access to their AWS account, or see if Danielle Heberling has some AWS credits she can give you (she is reachable via DM in the collab lab slack).

Endpoints

POST /repo

Body

{
  "repoURL": "https://github.com/{repoOwner}/{repoName}",
  "language": "programming-language"
}

Purpose: Add a new repo to the table

GET /repos/:language

Purpose: Get a list of repos from the table for a given programming language

DynamoDB Table

Table Name

{stackname}-Repos-{randomString}

Table Schema

id: string (partition key) - format: {repoOwner}-{repoName} - generated by backend

link: string - format: https://github.com/{repoOwner}/{repoName}

language: string - programming language converted to lowercase - ex. javascript

createdAt: string - milliseconds since epoch (January 1, 1970 UTC) - generated by backend

Global Secondary Index

languageIndex

Partition key: language - allows us to search by language

Running the frontend

The Code Cupid frontend is a React app using Vite and written in TypeScript. To run the app locally, run the following:

cd code-cupid-frontend
npm run start

Be sure to replace the endpoint in code-cupid/code-cupid-frontend/src/constants.ts with your own API Gateway endpoint.

About

Demo repo for AWS App Composer meetup talk

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published