Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/deploy_backend.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy DurianPy Events Service
name: Deploy SPARCS Events Service
on:
push:
paths:
Expand Down
2 changes: 1 addition & 1 deletion backend/controller/pycon_registration_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def register_pycon(
'lastName': 'Dela Cruz',
'nickname': 'Juan',
'pronouns': 'he/him',
'email': 'durianpy.davao+juan.delacruz@gmail.com',
'email': 'sparcsup+juan.delacruz@gmail.com',
'eventId': 'pycon-davao-2024',
'contactNumber': '+639171234567',
'organization': 'Tech Company Inc',
Expand Down
4 changes: 2 additions & 2 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

app = FastAPI(
root_path=root_path,
title='DURIANPY Event Service',
title='SPARCS Event Service',
contact={
'name': 'Society of Programmers and Refined Computer Scientists',
'email': 'contact@durianpy.org',
'email': 'sparcsup@gmail.com',
},
)

Expand Down
40 changes: 20 additions & 20 deletions backend/resources/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ app:
path: /docs
method: get
authorizer:
arn: arn:aws:lambda:${self:provider.region}:${aws:accountId}:function:durianpy-auth-service-${self:custom.stage}-basicAuthAuthorizer
arn: arn:aws:lambda:${self:provider.region}:${aws:accountId}:function:sparcs-auth-service-${self:custom.stage}-basicAuthAuthorizer
resultTtlInSeconds: 0
iamRoleStatements:
- Effect: Allow
Expand All @@ -31,51 +31,51 @@ app:
Resource:
- { "Fn::GetAtt": [Evaluations, Arn] }
- "Fn::Join":
- "/"
- - "Fn::GetAtt": [ Evaluations, Arn ]
- "index"
- "*"
- "/"
- - "Fn::GetAtt": [Evaluations, Arn]
- "index"
- "*"
- Effect: Allow
Action:
- "dynamodb:*"
Resource:
- { "Fn::GetAtt": [Events, Arn] }
- "Fn::Join":
- "/"
- - "Fn::GetAtt": [ Events, Arn ]
- "index"
- "*"
- "/"
- - "Fn::GetAtt": [Events, Arn]
- "index"
- "*"
- Effect: Allow
Action:
- "dynamodb:*"
Resource:
- { "Fn::GetAtt": [Registrations, Arn] }
- "Fn::Join":
- "/"
- - "Fn::GetAtt": [ Registrations, Arn ]
- "index"
- "*"
- "/"
- - "Fn::GetAtt": [Registrations, Arn]
- "index"
- "*"
- Effect: Allow
Action:
- "dynamodb:*"
Resource:
- { "Fn::GetAtt": [PreRegistrations, Arn] }
- "Fn::Join":
- "/"
- - "Fn::GetAtt": [ PreRegistrations, Arn ]
- "index"
- "*"
- "/"
- - "Fn::GetAtt": [PreRegistrations, Arn]
- "index"
- "*"
- Effect: Allow
Action:
- ssm:GetParameter
Resource:
- arn:aws:ssm:*:*:parameter/durianpy-auth-secret-key-${self:custom.stage}
- arn:aws:ssm:*:*:parameter/sparcs-auth-secret-key-${self:custom.stage}
- Effect: Allow
Action:
- "sqs:*"
Resource:
- !Sub arn:aws:sqs:ap-southeast-1:${AWS::AccountId}:${self:custom.stage}-durianpy-events-email-queue.fifo
- !Sub arn:aws:sqs:ap-southeast-1:${AWS::AccountId}:${self:custom.stage}-durianpy-events-certificate-queue.fifo
- !Sub arn:aws:sqs:ap-southeast-1:${AWS::AccountId}:${self:custom.stage}-sparcs-events-email-queue.fifo
- !Sub arn:aws:sqs:ap-southeast-1:${AWS::AccountId}:${self:custom.stage}-sparcs-events-certificate-queue.fifo
- Effect: Allow
Action:
- s3:PutObject
Expand Down
6 changes: 3 additions & 3 deletions backend/resources/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ paymentHandler:
events:
- sqs:
arn:
"Fn::GetAtt": [ PaymentQueue, Arn ]
"Fn::GetAtt": [PaymentQueue, Arn]
iamRoleStatements:
- Effect: Allow
Action:
- "sqs:*"
Resource:
- "Fn::GetAtt": [ PaymentQueue, Arn ]
- "Fn::GetAtt": [PaymentQueue, Arn]
- Effect: Allow
Action:
- "dynamodb:PutItem"
Expand All @@ -48,4 +48,4 @@ paymentHandler:
- "sqs:SendMessage"
- "sqs:ReceiveMessage"
- "sqs:DeleteMessage"
Resource: "arn:aws:sqs:${self:provider.region}:${aws:accountId}:${self:custom.stage}-durianpy-events-email-queue.fifo"
Resource: "arn:aws:sqs:${self:provider.region}:${aws:accountId}:${self:custom.stage}-sparcs-events-email-queue.fifo"
49 changes: 21 additions & 28 deletions backend/serverless.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
service: durianpy-events-api
frameworkVersion: '^3.40.0'
service: sparcs-events-api
frameworkVersion: "^3.40.0"

custom:
projectName: durianpy-events
projectName: sparcs-events
serviceName: events
stage: ${opt:stage, self:provider.stage}
paymentQueue: ${self:custom.stage}-${self:custom.projectName}-payment-queue.fifo
Expand All @@ -16,12 +16,9 @@ custom:
# konfHubApiKey: ${ssm:/konfhub/api-key-${self:custom.stage}}
betterCredentials:
enabled: true
emailQueue:
!ImportValue EmailQueue-${self:custom.stage}
certificateQueue:
!ImportValue CertificateQueue-${self:custom.stage}
basicAuthorizerARN:
!ImportValue BasicAuthAuthorizerARN-${self:custom.stage}
emailQueue: !ImportValue EmailQueue-${self:custom.stage}
certificateQueue: !ImportValue CertificateQueue-${self:custom.stage}
basicAuthorizerARN: !ImportValue BasicAuthAuthorizerARN-${self:custom.stage}
pythonRequirements:
dockerizePip: true
usePoetry: false
Expand All @@ -30,7 +27,7 @@ custom:
- boto3
- botocore
layer:
name: durianpy-events-${self:custom.stage}-python-requirements
name: sparcs-events-${self:custom.stage}-python-requirements
compatibleRuntimes:
- python3.11
slim: true
Expand Down Expand Up @@ -65,16 +62,13 @@ provider:
CERTIFICATE_QUEUE: ${self:custom.certificateQueue}
S3_BUCKET: ${self:custom.bucket}
# KONFHUB_API_KEY: ${self:custom.konfHubApiKey}
USER_POOL_ID:
!ImportValue UserPoolId-${self:custom.stage}
USER_POOL_CLIENT_ID:
!ImportValue AppClientId-${self:custom.stage}
USER_POOL_ID: !ImportValue UserPoolId-${self:custom.stage}
USER_POOL_CLIENT_ID: !ImportValue AppClientId-${self:custom.stage}
SPARCS_GMAIL: sparcsup@gmail.com
logs:
restApi:
role: !GetAtt ApiGatewayCloudWatchRole.Arn


resources:
- ${file(resources/dynamodb.yml)}
- ${file(resources/api_gateway.yml)}
Expand All @@ -88,30 +82,29 @@ resources:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service: apigateway.amazonaws.com
Action: sts:AssumeRole
- Effect: Allow
Principal:
Service: apigateway.amazonaws.com
Action: sts:AssumeRole
Policies:
- PolicyName: AllowCloudWatchLogs
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:DescribeLogGroups
- logs:DescribeLogStreams
- logs:PutLogEvents
Resource: "*"
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:DescribeLogGroups
- logs:DescribeLogStreams
- logs:PutLogEvents
Resource: "*"
Outputs:
ApiGatewayCloudWatchRoleArn:
Value: !GetAtt ApiGatewayCloudWatchRole.Arn
Export:
Name: ApiGatewayCloudWatchRole-${self:custom.serviceName}-${self:custom.stage}


functions:
- ${file(resources/api.yml)}
- ${file(resources/functions.yml)}
Expand Down
4 changes: 2 additions & 2 deletions backend/usecase/certificate_usecase.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def generate_certificates(self, event_id: str, registration_id: str = None) -> T
try:
timestamp = datetime.utcnow().isoformat(timespec='seconds')
payload = {'eventId': event_id}
message_group_id = f'durianpy-certificates-{event_id}'
message_dedup_id = f'durianpy-certificates-{event_id}-{timestamp}'
message_group_id = f'sparcs-certificates-{event_id}'
message_dedup_id = f'sparcs-certificates-{event_id}-{timestamp}'

if registration_id:
payload['registrationId'] = registration_id
Expand Down
2 changes: 1 addition & 1 deletion backend/utils/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from sys import stdout

logger = logging.getLogger('durianpy-certificates-service')
logger = logging.getLogger('sparcs-certificates-service')
handler = logging.StreamHandler(stdout)
if os.getenv('AWS_EXECUTION_ENV'): # pragma: no cover
logger.propagate = False
Expand Down
4 changes: 2 additions & 2 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "durianpy-techtix",
"name": "sparcs-techtix",
"private": true,
"version": "0.0.1",
"type": "module",
Expand Down