Skip to content

Linkry UI main #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 132 commits into from
Apr 17, 2025
Merged
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
79bd3af
New paidevent routes
EthM370 Dec 3, 2024
4857566
Merge
EthM370 Dec 3, 2024
0bbd21f
Fixed
EthM370 Dec 9, 2024
079d4ff
Rename paidevents.ts to paidEvents.ts
EthM370 Dec 9, 2024
8000c22
TestCasesforGet & POST and DELETE for ticket
EthM370 Dec 20, 2024
7b32c6a
New Post Schema
EthM370 Jan 10, 2025
9c88cc8
Merge main paideventroutes
EthM370 Jan 10, 2025
8624549
Fix path routes
EthM370 Jan 10, 2025
4980ac9
setup the scaffolding for linkry routes
devksingh4 Jan 11, 2025
7b66f40
don't run github actions on draft PRs
devksingh4 Jan 11, 2025
04bc57d
setup the redirect route
devksingh4 Jan 13, 2025
ae80735
fix tests
devksingh4 Jan 13, 2025
a7812fd
Adding Routes and Pages for Linkry New UI
tarashagarwal Jan 15, 2025
efa7b59
Merge branch 'dsingh14/linkry' of github.com:acm-uiuc/core-api into l…
tarashagarwal Jan 15, 2025
cbd97d9
Adding a API to fetch data from Dyanmo
tarashagarwal Jan 15, 2025
7f2a78f
UI for Linkry - Step 1
tarashagarwal Jan 15, 2025
a48f5a2
UI for Linkry - Step 2
tarashagarwal Jan 16, 2025
959665b
UI for Linkry - Step 3
tarashagarwal Jan 17, 2025
2e5953f
paidEvent POST merch update
EthM370 Jan 24, 2025
a7c32d1
Linkry-ui Local Merge
EthM370 Jan 25, 2025
c0e1b55
Encoding URL in Delete Request
tarashagarwal Jan 29, 2025
27046d4
Merge branch 'linkry-ui' of https://github.com/acm-uiuc/core-api into…
EthM370 Feb 2, 2025
15b8e7d
New Linkry/Add UI Implemented
EthM370 Feb 2, 2025
067f568
Start of linkry createRequest
CoderCCM Feb 5, 2025
2138892
New UI Implemented
EthM370 Feb 5, 2025
76f671d
Merge Backend-Frontend
EthM370 Feb 5, 2025
0b65b7f
Frontend-Backend Integration: New UI, Fix Delete
EthM370 Feb 5, 2025
129f4d9
Adding ACM Groups to Configurations & Fetching them for Backend and F…
tarashagarwal Feb 9, 2025
93af484
Maintenance
EthM370 Feb 10, 2025
0e5b47b
Merge branch 'linkry-ui' of https://github.com/acm-uiuc/core-api into…
EthM370 Feb 10, 2025
072fb89
New UI Adjustment + Integration via retrieving Linkry Group Setting f…
EthM370 Feb 10, 2025
3a10e2d
Convert Add to Transaction, Validate slug does not already exist on C…
CoderCCM Feb 13, 2025
a28c9be
Validate access group list against env config
CoderCCM Feb 15, 2025
44f4ec7
Do not allow the user to create a reserved slug
CoderCCM Feb 15, 2025
c32ff66
Use Zulu Timestamps
CoderCCM Feb 15, 2025
d3346b9
Minor Timestamp Change
CoderCCM Feb 15, 2025
0d089b6
Initial Implementation of Fetch Link Data
CoderCCM Feb 19, 2025
4ff4002
Updating View Screen To Remove Group# or OWNER# from the view screen
tarashagarwal Feb 20, 2025
4100d4b
Updating Error Message in the UI
tarashagarwal Feb 20, 2025
09b3073
New UI Fix implemented : Current Redirect set to localhost for LOCAL …
EthM370 Mar 3, 2025
1e8b29e
Add listGroupIDsByEmail
CoderCCM Mar 13, 2025
36f165f
Updating User Inteface and few updates at the backend
Mar 23, 2025
66493d9
Adding Cancel Button on Delete Dialog Box
Mar 23, 2025
b214644
Adding Is Edited Flag to Help Updates at the Backend
Mar 23, 2025
37e0fc8
Regression Fixes
Mar 23, 2025
eacba05
Updading UI, Improving API & UI for Editing Links, Updating API fto v…
Mar 23, 2025
4fea6cc
Minor Fixes
Mar 23, 2025
b394498
Updating UI
Mar 23, 2025
85aecf6
UI Updates
Mar 23, 2025
1693007
Improving Delegated Links Fetch Algorithm and some UI Enhancements
Mar 24, 2025
ca730e0
Bug Fix URL regex only accepts https://
EthM370 Mar 24, 2025
f579271
Debug comment
EthM370 Mar 25, 2025
31e06a9
Convert to Group UUIDs
CoderCCM Mar 28, 2025
273d7de
merge
EthM370 Mar 28, 2025
c55c15f
Visit Count Feature Implemented + Edit Feature Bug Fix
EthM370 Mar 29, 2025
7685898
Improve Typecasting; Begin Code Cleanup
CoderCCM Mar 30, 2025
fed20e2
Improve Typecasting; pt. 2
CoderCCM Mar 30, 2025
bc9e5c0
Fix Typecasting pt. 3
CoderCCM Mar 30, 2025
0866a62
Delegated Link Error on Edit Fix
Mar 30, 2025
e3690a6
Merge
EthM370 Mar 30, 2025
1105167
Merge branch 'linkry-ui' of https://github.com/acm-uiuc/core-api into…
EthM370 Mar 30, 2025
2c7f6b1
Delete delegated ownertag
EthM370 Mar 30, 2025
0a9f8f7
Request Pre-Validation and Code Cleanup
CoderCCM Apr 4, 2025
9eae694
Validate User Access for Slug Edit and Delete
CoderCCM Apr 4, 2025
e6201d4
Allow for Links with No Access Groups
CoderCCM Apr 4, 2025
49b3d97
Bug fix : Multiple Delegated entry for the same delegated link
EthM370 Apr 4, 2025
748642c
Merge branch 'linkry-ui' of https://github.com/acm-uiuc/core-api into…
EthM370 Apr 4, 2025
0045b40
Removing Owner id From Delgated Links Access Groups
Apr 5, 2025
aade9be
Fixes
Apr 5, 2025
0d3d59c
Fixes
Apr 5, 2025
22991a3
Progressing On Admin Page
Apr 5, 2025
10a730a
Added Owner To the Admin Links
Apr 6, 2025
4744e84
Improving Readiblity of the APIs
Apr 6, 2025
f6b1109
Adding Loader Screen to The Links View Dashboards
Apr 6, 2025
ce300d2
Add link to Admin Panel and navigate back to source page after edit c…
Apr 6, 2025
c3fa588
Add link to Admin Panel and navigate back to source page after save c…
Apr 6, 2025
2e0d908
Admin API Fixes
Apr 6, 2025
02939e3
Reset Button Only Clickable when count is non zero
EthM370 Apr 6, 2025
566dab5
Merge branch 'linkry-ui' of https://github.com/acm-uiuc/core-api into…
EthM370 Apr 6, 2025
58212ac
Fixing Counter issue
Apr 6, 2025
2bfb50d
Minor buG fix
Apr 6, 2025
9fcbee7
Dark Mode Fixed & dev/prod set redirect url domain
EthM370 Apr 6, 2025
f981c97
Dark Mode for Admin Screen Fixed
EthM370 Apr 6, 2025
3a65ff8
Fix admin page authentication requirement
EthM370 Apr 6, 2025
6199037
Merge branch 'linkry-ui' of https://github.com/acm-uiuc/core-api into…
EthM370 Apr 6, 2025
c721cb7
Resolving Merge Conflicts with Main
Apr 7, 2025
5199197
Merge branch 'linkry-ui' of github.com:acm-uiuc/core into linkry-ui-main
Apr 7, 2025
5e47541
Merge branch 'main' of github.com:acm-uiuc/core into linkry-ui-main
Apr 9, 2025
a7062db
Merge branch 'main' of github.com:acm-uiuc/core into linkry-ui-main
Apr 11, 2025
b6e6ca5
Fixing The User Group Fetch Algo
Apr 11, 2025
e3b5781
Main Merge Updates
Apr 11, 2025
3c3f6d2
Updating Linke-Shortener name to Linkry and adding Test Files for Linkry
Apr 11, 2025
75f89c1
Adding a Test Case & Some cleanup
Apr 12, 2025
9b692db
Fixing few APIS
Apr 12, 2025
66c6fd8
Minor Readibility Updates
Apr 12, 2025
45e7353
Merge Updates
Apr 12, 2025
394b847
Merge Updates
Apr 12, 2025
53f3397
Delete legacy paidevent development
EthM370 Apr 12, 2025
42588fb
Fixed typecheck in Adminpage & created new vitest group for linkadmin…
EthM370 Apr 12, 2025
a6a4c66
Adding Cache Rules and Tests
Apr 12, 2025
1345dbd
Adding Cache Rules and Tests
Apr 12, 2025
a60db23
Deployment Trigges
Apr 13, 2025
11a2618
DyanmoDb Permission Updates
Apr 13, 2025
77db868
Updates
Apr 13, 2025
6c01cc2
dev redirect domain changed to core.aws.qa...
EthM370 Apr 13, 2025
955d8d4
minor changes
devksingh4 Apr 13, 2025
a41aecc
cfn edge function
devksingh4 Apr 14, 2025
f517c23
fix domain name association
devksingh4 Apr 14, 2025
3a503cb
update
devksingh4 Apr 14, 2025
33f53ae
fix
devksingh4 Apr 14, 2025
e043830
use edge function for edge kv
devksingh4 Apr 14, 2025
09e23f0
use cloudfront KV store to handle redirect mechanism instead of dynamo
devksingh4 Apr 15, 2025
ae978ee
mock cloudfront KV correctly
devksingh4 Apr 15, 2025
92b8177
mock getLinkryKvArn
devksingh4 Apr 15, 2025
06df3c6
throw correct error for failing to get the KV arn
devksingh4 Apr 15, 2025
40a8479
fix tests
devksingh4 Apr 15, 2025
1b79bcf
try to bundle signature-v4-crt with the lambda
devksingh4 Apr 15, 2025
73de128
move aws_crt into the bundle
devksingh4 Apr 15, 2025
942793a
fix makefile
devksingh4 Apr 15, 2025
7f14a39
enable cloudfront kv store IAM access
devksingh4 Apr 15, 2025
a1b88ed
update schemas
devksingh4 Apr 15, 2025
93a53ed
support featured tag
devksingh4 Apr 15, 2025
99a0a0c
redesign backend
devksingh4 Apr 17, 2025
1bb8151
add better error catching
devksingh4 Apr 17, 2025
b6088b9
fix tests
devksingh4 Apr 17, 2025
916511b
update behavior
devksingh4 Apr 17, 2025
621e34b
cleanup
devksingh4 Apr 17, 2025
1ce6bc4
log
devksingh4 Apr 17, 2025
fb21561
fix unit testing
devksingh4 Apr 17, 2025
372e898
fix UI papercuts
devksingh4 Apr 17, 2025
9fc82f4
clear session storage on logout
devksingh4 Apr 17, 2025
86cd222
fix unit tests
devksingh4 Apr 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -59,6 +59,8 @@ build: src/ cloudformation/ docs/
cp -r src/api/resources/ dist/api/resources
rm -rf dist/lambda/sqs
sam build --template-file cloudformation/main.yml
mkdir -p .aws-sam/build/AppApiLambdaFunction/node_modules/aws-crt/
cp -r node_modules/aws-crt/dist .aws-sam/build/AppApiLambdaFunction/node_modules/aws-crt

local:
VITE_BUILD_HASH=$(GIT_HASH) yarn run dev
@@ -80,7 +82,7 @@ deploy_dev: check_account_dev build
invalidate_cloudfront:
@echo "Creating CloudFront invalidation..."
$(eval DISTRIBUTION_ID := $(shell aws cloudformation describe-stacks --stack-name $(application_key) --query "Stacks[0].Outputs[?OutputKey=='CloudfrontDistributionId'].OutputValue" --output text))
$(eval DISTRIBUTION_ID_2 := $(shell aws cloudformation describe-stacks --stack-name $(application_key) --query "Stacks[0].Outputs[?OutputKey=='CloudfrontSecondaryDistributionId'].OutputValue" --output text))
$(eval DISTRIBUTION_ID_2 := $(shell aws cloudformation describe-stacks --stack-name $(application_key) --query "Stacks[0].Outputs[?OutputKey=='CloudfrontIcalDistributionId'].OutputValue" --output text))
$(eval INVALIDATION_ID := $(shell aws cloudfront create-invalidation --distribution-id $(DISTRIBUTION_ID) --paths "/*" --query 'Invalidation.Id' --output text --no-cli-page))
$(eval INVALIDATION_ID_2 := $(shell aws cloudfront create-invalidation --distribution-id $(DISTRIBUTION_ID_2) --paths "/*" --query 'Invalidation.Id' --output text --no-cli-page))
@echo "Waiting on job $(INVALIDATION_ID)..."
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -7,4 +7,4 @@ This repository is split into multiple parts:
## Getting Started
You will need node>=22 installed, as well as the AWS CLI and the AWS SAM CLI. The best way to work with all of this is to open the environment in a container within your IDE (VS Code should prompt you to do so: use "Clone in Container" for best performance). This container will have all needed software installed.

Then, run `make install` to install all packages, and `make local` to start the UI and API servers! The UI will be accessible on `http://localhost:5173/` and the API on `http://localhost:8080/`.
Then, run `make install` to install all packages, and `make local` to start the UI and API servers! The UI will be accessible on `http://localhost:5173/` and the API on `http://localhost:8080/`.
10 changes: 10 additions & 0 deletions cloudformation/iam.yml
Original file line number Diff line number Diff line change
@@ -15,6 +15,8 @@ Parameters:
Type: String
SqsQueueArn:
Type: String
LinkryKvArn:
Type: String

Conditions:
IsDev: !Equals [!Ref RunEnvironment, "dev"]
@@ -74,12 +76,14 @@ Resources:
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-external
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests-status
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-linkry
# Index accesses
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-events/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-merchstore-purchase-history/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests-status/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-linkry/index/*

- Sid: DynamoDBCacheAccess
Effect: Allow
@@ -112,6 +116,12 @@ Resources:
Resource:
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links/stream/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-events/stream/*
- Sid: CloudfrontKvStreamAccess
Effect: Allow
Action:
- cloudfront-keyvaluestore:*
Resource:
- !Ref LinkryKvArn

# API Lambda IAM Role
ApiLambdaIAMRole:
159 changes: 131 additions & 28 deletions cloudformation/main.yml
Original file line number Diff line number Diff line change
@@ -87,6 +87,7 @@ Resources:
LambdaFunctionName: !Sub ${ApplicationPrefix}-lambda
SesEmailDomain: !FindInMap [General, !Ref RunEnvironment, SesDomain]
SqsQueueArn: !GetAtt AppSQSQueues.Outputs.MainQueueArn
LinkryKvArn: !GetAtt LinkryRecordsCloudfrontStore.Arn

AppLogGroups:
Type: AWS::Serverless::Application
@@ -125,26 +126,6 @@ Resources:
!FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId]
CloudfrontDomain: !GetAtt [AppIcalCloudfrontDistribution, DomainName]

LinkryDomainProxy:
Type: AWS::Serverless::Application
Properties:
Location: ./custom-domain.yml
Parameters:
RunEnvironment: !Ref RunEnvironment
RecordName: go
GWBaseDomainName: !FindInMap
- ApiGwConfig
- !Ref RunEnvironment
- EnvDomainName
GWCertArn: !FindInMap
- ApiGwConfig
- !Ref RunEnvironment
- EnvCertificateArn
GWApiId: !Ref AppApiGateway
GWHostedZoneId:
!FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId]
CloudfrontDomain: !GetAtt [AppIcalCloudfrontDistribution, DomainName]

CoreUrlProd:
Type: AWS::Serverless::Application
Properties:
@@ -184,6 +165,8 @@ Resources:
Variables:
RunEnvironment: !Ref RunEnvironment
EntraRoleArn: !GetAtt AppSecurityRoles.Outputs.EntraFunctionRoleArn
LinkryKvArn: !GetAtt LinkryRecordsCloudfrontStore.Arn
AWS_CRT_NODEJS_BINARY_RELATIVE_PATH: node_modules/aws-crt/dist/bin/linux-arm64-glibc/aws-crt-nodejs.node
VpcConfig:
Ipv6AllowedForDualStack: !If [ShouldAttachVpc, True, !Ref AWS::NoValue]
SecurityGroupIds:
@@ -483,6 +466,34 @@ Resources:
Projection:
ProjectionType: "ALL"

LinkryRecordsTable:
Type: "AWS::DynamoDB::Table"
Properties:
BillingMode: "PAY_PER_REQUEST"
TableName: "infra-core-api-linkry"
DeletionProtectionEnabled: !If [IsProd, true, false] # TODO: remove this
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: !If [IsProd, true, false]
AttributeDefinitions:
- AttributeName: "slug"
AttributeType: "S"
- AttributeName: "access"
AttributeType: "S"
KeySchema:
- AttributeName: "slug"
KeyType: "HASH"
- AttributeName: "access"
KeyType: "RANGE"
GlobalSecondaryIndexes:
- IndexName: "AccessIndex"
KeySchema:
- AttributeName: "access"
KeyType: "HASH"
- AttributeName: "slug"
KeyType: "RANGE"
Projection:
ProjectionType: "ALL"

CacheRecordsTable:
Type: "AWS::DynamoDB::Table"
DeletionPolicy: "Retain"
@@ -831,13 +842,6 @@ Resources:
OriginProtocolPolicy: https-only
Enabled: true
Aliases:
- !Join
- ""
- - "go."
- !FindInMap
- ApiGwConfig
- !Ref RunEnvironment
- EnvDomainName
- !Join
- ""
- - "ical."
@@ -875,6 +879,105 @@ Resources:
HttpVersion: http2
PriceClass: PriceClass_100

LinkryRecordsCloudfrontStore:
Type: AWS::CloudFront::KeyValueStore
Properties:
Name: infra-core-api-cloudfront-linkry-kv

LinkryRecordsCloudfrontFunction:
Type: 'AWS::CloudFront::Function'
Properties:
Name: infra-core-api-cloudfront-linkry-redir
FunctionConfig:
Comment: 'Linkry Redirect Cloudfront Function'
Runtime: 'cloudfront-js-2.0'
KeyValueStoreAssociations:
- KeyValueStoreARN: !Sub '${LinkryRecordsCloudfrontStore.Arn}'
FunctionCode: !Sub |
import cf from 'cloudfront';
const kvsId = '${LinkryRecordsCloudfrontStore.Id}';
const kvs = cf.kvs(kvsId);

async function handler(event) {
const request = event.request;
const path = request.uri.replace(/^\/+/, '');
let redirectUrl = "https://acm.illinois.edu/404";
try {
const value = await kvs.get(path);
if (value) {
redirectUrl = value;
}
} catch (err) {
console.log('KVS key lookup failed');
}
var response = {
statusCode: 302,
statusDescription: 'Found',
headers: {
'location': { value: redirectUrl }
}
};
return response;
}
AutoPublish: true

AppLinkryCloudfrontDistribution:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
Enabled: true
DefaultCacheBehavior:
ViewerProtocolPolicy: redirect-to-https
TargetOriginId: dummyOrigin
ForwardedValues:
QueryString: false
Cookies:
Forward: none
FunctionAssociations:
- EventType: viewer-request
FunctionARN: !GetAtt LinkryRecordsCloudfrontFunction.FunctionARN
Origins:
- Id: dummyOrigin
DomainName: example.com
CustomOriginConfig:
OriginProtocolPolicy: https-only
Aliases:
- !Join
- ""
- - "go."
- !FindInMap
- ApiGwConfig
- !Ref RunEnvironment
- EnvDomainName
ViewerCertificate:
AcmCertificateArn: !FindInMap
- ApiGwConfig
- !Ref RunEnvironment
- EnvCertificateArn
MinimumProtocolVersion: TLSv1.2_2021
SslSupportMethod: sni-only
HttpVersion: http2
PriceClass: PriceClass_100

LinkryDomainProxy:
Type: AWS::Serverless::Application
Properties:
Location: ./custom-domain.yml
Parameters:
RunEnvironment: !Ref RunEnvironment
RecordName: go
GWBaseDomainName: !FindInMap
- ApiGwConfig
- !Ref RunEnvironment
- EnvDomainName
GWCertArn: !FindInMap
- ApiGwConfig
- !Ref RunEnvironment
- EnvCertificateArn
GWApiId: !Ref AppApiGateway
GWHostedZoneId:
!FindInMap [ApiGwConfig, !Ref RunEnvironment, HostedZoneId]
CloudfrontDomain: !GetAtt [AppLinkryCloudfrontDistribution, DomainName]

Outputs:
DomainName:
@@ -902,7 +1005,7 @@ Outputs:
Description: Cloudfront Distribution ID
Value: !GetAtt AppFrontendCloudfrontDistribution.Id

CloudfrontSecondaryDistributionId:
CloudfrontIcalDistributionId:
Description: Cloudfront Distribution ID
Value: !GetAtt AppIcalCloudfrontDistribution.Id

Loading
Loading