System Manual - bounswe/bounswe2024group8 GitHub Wiki

System Manual

1. Deployment Requirements & Instructions

1.1. System Requirements

1.1.1. Hardware Requirements

  • Minimum: 2-core CPU, 2 GB RAM, 10 GB SSD.
  • Recommended: 4-core CPU, 4 GB RAM, 20 GB SSD.

1.1.1.2. Software Requirements

  • Operating System: Ubuntu 22.04.
  • Other Dependencies: Docker (v27.4+), Node.js (v20.18+), PostgreSQL (v14).

1.2. Pre-Deployment Checklist

  • Ensure administrator-level permissions on the target server.
  • Verify network connectivity for database and API access.
  • Verify GCP Cloud Storage permissions from backend.

1.3. Deployment Steps

Step 1: Install PostgreSQL.

sudo apt install -y postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresql
sudo -i -u postgres bash <<EOF
createdb threedesign
psql -c "CREATE USER postgres WITH PASSWORD 'psqldev2024';"
psql -c "GRANT ALL PRIVILEGES ON DATABASE threedesign TO postgres;
EOF

Step 2: Install Docker

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
sudo docker --version
sudo systemctl status docker
sudo usermod -aG docker $USER

Step 3: Clone the repository and navigate to the project directory.

git clone https://github.com/bounswe/bounswe2024group8.git
cd bounswe2024group8

Step 4: Build and start backend application.

cd 3Design/backend/
docker build -t backend:1.0 -f Dockerfile ./threedesign/
docker run -d -v /path/to/gcp/cloud/access/pamkeyfile.json:/key.json -e GOOGLE_APPLICATION_CREDENTIALS=/key.json --name backend --rm -p 8080:8080 --network host backend:1.0
docker exec backend /bin/bash -c "nohup java -jar /app/target/threedesign-0.0.1-SNAPSHOT.jar &"
cd ../../

Step 5: Build and start frontend application.

cd 3Design/frontend/
docker build -t frontend:1.0 -f Dockerfile ./
docker run -d --name frontend -p 3000:3000 --network host frontend:1.0

Step 4: Verify the deployment by accessing localhost:3000 (or IP:PORT for non-local access) in your browser.

2. Used Libraries & Software

2.1. Frontend

  • Ant Design (v5.x)
  • Axios (v1.x)
  • DaisyUI (v4.x)
  • dotenv (v16.x)
  • Online 3D Viewer (v0.15.x)
  • React (v18.x)
  • React Countdown (v2.x)
  • React DOM (v18.x)
  • React Router DOM (v6.x)
  • React Scripts (v5.x)
  • TypeScript (v4.x)
  • Web Vitals (v2.x)
  • Autoprefixer (v10.x)
  • PostCSS (v8.x)
  • TailwindCSS (v3.x)

2.2. Backend

  • Spring Boot Starter Data JPA
  • Spring Boot Starter Security
  • Spring Boot Starter Web
  • PostgreSQL JDBC Driver
  • Lombok
  • Spring Boot Starter Validation
  • Spring Boot Starter Test
  • Spring Security Test
  • JJWT API (v0.11.5)
  • JJWT Implementation (v0.11.5)
  • JJWT Jackson Integration (v0.11.5)
  • Jakarta Validation API (v3.0.2)
  • Apache Jena Libraries (v3.17.0)
  • Spring Retry (v2.0.3)
  • Google Cloud Storage SDK (v2.44.1)
  • Jackson Databind (v2.17.2)
  • SpringDoc OpenAPI WebMVC UI (v2.5.0)

2.3. Database

  • PostgreSQL (v14.15)

2.4. Object Storage

  • GCP Cloud Storage

3. How to Acquire - Versions

3.1. Node.js

3.2. PostgreSQL

3.3. Docker

3.4. Other Dependencies

Managed via the project’s configuration files:

  • bounswe2024group8/3Design/frontend/package.json (frontend)
  • bounswe2024group8/3Design/backend/threedesign/pom.xml (backend).