https://github.com/norun9/hybird
Real-Time Chat App with Serverless Architecture
https://github.com/norun9/hybird
clean-architecture lambda serverless websocket
Last synced: about 2 months ago
JSON representation
Real-Time Chat App with Serverless Architecture
- Host: GitHub
- URL: https://github.com/norun9/hybird
- Owner: norun9
- Created: 2024-06-22T09:00:23.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-02T06:49:37.000Z (over 1 year ago)
- Last Synced: 2025-09-12T21:16:56.548Z (7 months ago)
- Topics: clean-architecture, lambda, serverless, websocket
- Language: HCL
- Homepage:
- Size: 1.24 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Backend Development Architecture
[See our "Clean Architecture" for more details](backend/api/doc/README.md)
## AWS Architecture
### REST API
### WebSocket API
### Frontend
## Deployment Process
> The following are personal notes
###
Terraform
```bash
export AWS_PROFILE=your_iam_user_name
terraform plan -out=tfplan
terraform apply "tfplan"
```
###
Next.js
Run GitHub Actions manually ([ssg_deploy.yml](.github/workflows/ssg_deploy.yml))
## Goose Migration to RDS via Bastion Host
> [!NOTE]
> In the future, we plan to integrate the migration process into the Continuous Deployment (CD) pipeline to automate database updates during deployments.
Follow these steps to perform Goose migration to RDS instance via Bastion host.
#### Step 1: SSH into the Bastion Host
```bash
ssh -i "path/to/your-keypair.pem" ec2-user@
```
#### Step 2: Connect to the RDS Instance
Once logged into the Bastion, use the following command to connect to your RDS instance in the shell.
```bash
mysql -h -u -p
```
#### Step 3: Install Goose
Use the following command to install Goose in the shell.
```bash
# Download the Goose installation script
curl -fsSL https://raw.githubusercontent.com/pressly/goose/master/install.sh -o goose | sh
# Make the Goose binary executable
chmod +x goose
# Move Goose to /usr/local/bin to make it accessible globally
sudo mv goose /usr/local/bin/
# Verify that Goose is installed correctly
goose --version
```
#### Step 4: Transfer Migration Directory to the Home Directory on Bastion
To transfer the migration directory from "your local machine" to the Bastion instance, use the following command.
```bash
# /home/ec2-user/ is the Bastion home directory
scp -r -i "your_keypair.pem" your_migration_files_dir ec2-user@:/home/ec2-user/
```
#### Step 5: Run Goose Migration
After transferring the migration files, run the Goose migration using the following command in the shell.
```bash
goose -dir /path/to/your_migrations_dir mysql ':@tcp(:3306)/?parseTime=true' up
```