Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
adfb0d2
feat: form autosaving, submission, and tweaks to form fields (#98)
hieunguyent12 Sep 4, 2025
7a52a9f
Rate limiting for /interest (#105)
hugoliu-code Sep 5, 2025
12ce2e9
Added Introduction Modal (#106)
hugoliu-code Sep 5, 2025
87b547a
Refactor err == into errors.is (#108)
hugoliu-code Sep 5, 2025
ba3e6f9
hotfix(lint): remove unused imports for build
AlexanderWangY Sep 5, 2025
07ee1f8
feat: configured dev-web workflow
h1divp Sep 5, 2025
c81a4f6
fix: removed need
h1divp Sep 6, 2025
2aa80a5
Merge pull request #109 from swamphacks/feat/web-workflow
h1divp Sep 12, 2025
24c860e
fix: specified dev dockerfile
h1divp Sep 12, 2025
fe55cb2
Merge pull request #111 from swamphacks/feat/web-workflow
h1divp Sep 12, 2025
edd8c03
feat: added settings page, routes refactor and other styling changes …
hieunguyent12 Sep 16, 2025
5cad8ec
Event configuration page for event admins (#112)
AlexanderWangY Sep 19, 2025
56e1116
chore: added link to user/admin portal (#114)
hieunguyent12 Sep 19, 2025
d02f0b9
feature: added openapi generation from `swag` code comments (#113)
hieunguyent12 Oct 1, 2025
8e70627
added link to portal in logo and added page under construction compon…
hieunguyent12 Oct 1, 2025
82f0c5f
Fixes (#117)
hugoliu-code Oct 2, 2025
0d8bc05
feat: create bash script to automate infisical secrets retrieval
SobaSkee Oct 2, 2025
13658e7
Staff Management Page feature (#115)
AlexanderWangY Oct 2, 2025
f93c663
fix: web dockerfile + go versioning for air (#120)
AlexanderWangY Oct 2, 2025
b21c1a3
fix: change types for building (#121)
AlexanderWangY Oct 2, 2025
c73b821
fix: run chmod to ensure command runs as super user
SobaSkee Oct 2, 2025
b569939
Merge branch 'dev' of https://github.com/swamphacks/core into stanley…
SobaSkee Oct 2, 2025
0b9ba9b
feat: create bash script to automate infisical secrets retrieval (#119)
SobaSkee Oct 2, 2025
4aa10d7
fix: add docker dev file to web
SobaSkee Oct 3, 2025
19ddc88
Merge pull request #122 from swamphacks/stanley/infra-fix
h1divp Oct 5, 2025
3927fd6
feat(CI/CD): Deploy dev and prod web servers to digital ocean (#123)
AlexanderWangY Oct 5, 2025
aba7bc1
Feat/deploy web (#125)
AlexanderWangY Oct 5, 2025
fdf75d5
Feat/deploy web (#126)
AlexanderWangY Oct 5, 2025
5528b07
hotfix: merge conflicts resolved
AlexanderWangY Oct 5, 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
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
## Description

<!--
Summarize changes, try to be specific.
-->

## Linked Jira Ticket

<!--
Link Jira ticket here. [TECH-000](https://swamphacks.atlassian.net/browse/TECH-000)
-->

## Type of Change

<!--
Delete irrelevant options:
- Bug fix (non-breaking change)
Expand All @@ -19,13 +22,15 @@ Delete irrelevant options:
-->

## Checklist

- [ ] My code follows the project's style guidelines
- [ ] I have commented on complex parts of the code
- [ ] I have updated documentation if necessary
- [ ] I have updated or added tests to cover my changes
- [ ] I have updated the OpenAPI YAML or other API schema files if applicable

## Additional Notes

<!--
Screenshots and notes would be appreciated!
-->
65 changes: 65 additions & 0 deletions .github/workflows/dev-build-deploy-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Deploy Web to Development

on:
push:
branches:
- dev
paths:
- 'apps/web/**'
- 'infra/docker-compose.web.yml'
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
name: Build and Push Docker Image to GHCR
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build \
--platform linux/amd64 \
-t ghcr.io/${{ github.repository_owner }}/core-web:dev \
--file ./apps/web/Dockerfile \
--target prod \
./apps/web

- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository_owner }}/core-web:dev
deploy:
name: Deploy to Development Server
runs-on: ubuntu-latest
needs: [build-and-push]

steps:
- name: SSH proxy commmand
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.WEB_HOST }}
username: root
password: ${{ secrets.WEB_PASSWORD }}
script: |
cd /root/core/infra
git fetch
git checkout dev
git reset --hard origin/dev
git pull
infisical export --env=dev --format=dotenv --path="/web" --projectId=${{ secrets.INFISICAL_PROJECT_ID }} > ./secrets/.env.dev.web
docker compose -f docker-compose.web.yml pull web-dev
docker compose -f docker-compose.web.yml up -d --no-deps --force-recreate web-dev

66 changes: 66 additions & 0 deletions .github/workflows/prod-build-deploy-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Deploy Web to Production

on:
push:
branches:
- main
paths:
- 'apps/web/**'
- 'infra/docker-compose.web.yml'
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
name: Build and Push Docker Image to GHCR
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build \
--platform linux/amd64 \
-t ghcr.io/${{ github.repository_owner }}/core-web:latest \
--file ./apps/web/Dockerfile \
--target prod \
./apps/web

- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository_owner }}/core-web:latest

deploy:
name: Deploy to Production server
runs-on: ubuntu-latest
needs: [build-and-push]

steps:
- name: SSH proxy commmand
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.WEB_HOST }}
username: root
password: ${{ secrets.WEB_PASSWORD }}
script: |
cd /root/core/infra
git fetch
git checkout main
git reset --hard origin/main
git pull
infisical export --env=prod --format=dotenv --path="/web" --projectId=${{ secrets.INFISICAL_PROJECT_ID }} > ./secrets/.env.web
docker compose -f docker-compose.web.yml pull web
docker compose -f docker-compose.web.yml up -d --no-deps --force-recreate web

2 changes: 1 addition & 1 deletion apps/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.24-alpine AS builder
FROM golang:1.25-alpine AS builder

RUN apk add --no-cache build-base ca-certificates

Expand Down
5 changes: 5 additions & 0 deletions apps/api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ migrate-down:
generate:
@sqlc generate

openapi-generate:
swag init --dir cmd/api,internal/api/handlers --parseDependency --requiredByDefault -v3.1

openapi-format:
swag f --dir cmd/api,internal/api/handlers
16 changes: 14 additions & 2 deletions apps/api/cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ import (
"github.com/swamphacks/core/apps/api/internal/storage"
)

// @title SwampHacks Test API
// @version 1.0
// @description This is SwampHacks' OpenAPI documentation.
// @termsOfService TODO

// @contact.name API Support
// @contact.url http://www.swagger.io/support
// @contact.email support@swagger.io

// @license.name Apache 2.0
// @license.url http://www.apache.org/licenses/LICENSE-2.0.html
func main() {
logger := logger.New()
cfg := config.Load()
Expand Down Expand Up @@ -66,13 +77,14 @@ func main() {

// Injections into services
authService := services.NewAuthService(userRepo, accountRepo, sessionRepo, txm, client, logger, &cfg.Auth)
userService := services.NewUserService(userRepo, logger)
eventInterestService := services.NewEventInterestService(eventInterestRepo, logger)
eventService := services.NewEventService(eventRepo, userRepo, logger)
eventService := services.NewEventService(eventRepo, userRepo, r2Client, &cfg.CoreBuckets, logger)
emailService := services.NewEmailService(taskQueueClient, logger)
applicationService := services.NewApplicationService(applicationRepo, eventService, txm, r2Client, &cfg.CoreBuckets, logger)

// Injections into handlers
apiHandlers := handlers.NewHandlers(authService, eventInterestService, eventService, emailService, applicationService, cfg, logger)
apiHandlers := handlers.NewHandlers(authService, userService, eventInterestService, eventService, emailService, applicationService, cfg, logger)

api := api.NewAPI(&logger, apiHandlers, mw)

Expand Down
4 changes: 2 additions & 2 deletions apps/api/cmd/email_worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.24-alpine AS base
FROM golang:1.25-alpine AS base

WORKDIR /app

Expand All @@ -16,7 +16,7 @@ RUN go install github.com/air-verse/air@latest
CMD ["air"]

# Production
FROM base as prod
FROM base AS prod

RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o email_worker ./cmd/email_worker

Expand Down
Loading
Loading