Skip to content
Draft

docs #1561

Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
c3de9df
feat: initialize docs
chiol Apr 22, 2025
c2c7ede
feat: Refactor documentation for ABC User Feedback
chiol Apr 25, 2025
e08fd6d
feat: Add Docker Compose files for infrastructure setup and CLI commands
chiol Apr 25, 2025
c70d8a0
feat: unify job names in Docker CI workflows and ensure Buildx setup …
chiol Apr 25, 2025
34f322f
refactor: remove redundant API and web build steps from Docker CI wor…
chiol Apr 25, 2025
2b16d00
fix: update Docker metadata tags to use latest version for API and We…
chiol Apr 25, 2025
0252358
feat: add clean command to remove existing mounted docker volumes and…
chiol Apr 25, 2025
4e11844
feat: create docs code
chiol Apr 28, 2025
efe58c5
feat: update documentation links and restructure Dockerfile for impro…
chiol Apr 28, 2025
efc5a8b
feat: docs
chiol Apr 30, 2025
3ddde55
fix: remove unnecessary argument from CMD in Dockerfile for docs
chiol Apr 30, 2025
252b577
Update apps/docs/docs/04-integration-guide/_category_.json
chiol May 19, 2025
f02a24d
fix: coderabbitai
chiol May 19, 2025
e463a77
refactor: documentation for ABC User Feedback
chiol May 19, 2025
612546e
fix: docs
chiol May 21, 2025
216a721
Merge branch 'dev' into feat/docs
chiol May 21, 2025
fe9e779
fix: docs
chiol Jun 3, 2025
5924978
Merge branch 'dev' into feat/docs
chiol Jun 3, 2025
99eab96
Merge branch 'dev' into feat/docs
chiol Jun 3, 2025
1147e62
Merge branch 'dev' into feat/docs
chiol Sep 1, 2025
f606627
chore: update clsx to version 2.1.1 and react/react-dom to version 19…
chiol Sep 1, 2025
68a5a85
feat: remove outdated documentation and add generative AI integration…
chiol Sep 1, 2025
3d78883
docs: update installation links and tutorial references in documentation
chiol Sep 1, 2025
c0ccbc5
docker compose
chiol Sep 2, 2025
566f1a6
refactor: remove BASE_URL and SMTP_BASE_URL from environment configur…
chiol Sep 2, 2025
b954a53
feat: i18n
chiol Sep 2, 2025
0f2e699
Merge branch 'feat/docs' into feat/env-cleanup
chiol Sep 3, 2025
3ec151e
docs: update environment variable configuration for multiple languages
chiol Sep 3, 2025
1ee4222
Refactor environment variable configuration and update Docker Compose…
chiol Sep 3, 2025
fa079f4
docs: translate CLI tool documentation to Chinese
chiol Sep 3, 2025
520115f
feat: update Docker Compose configuration and environment variables f…
chiol Sep 3, 2025
2057976
add integration docs
jihun Sep 4, 2025
07a64d7
add generative ai docs
jihun Sep 8, 2025
36e9d16
add docs images
jihun Sep 9, 2025
96f3ee3
Add documentation for Generative AI settings and Channel settings
chiol Sep 11, 2025
a7d6e3f
docs: add user guide for channel creation in ABC User Feedback
chiol Sep 11, 2025
6ac36dd
Merge branch 'feat/docs' into feat/docs-integration-guide
jihun Sep 11, 2025
4116422
Merge pull request #2059 from line/feat/docs-integration-guide
jihun Sep 11, 2025
d535aa9
Add Korean documentation for AI Issue Recommendation and Channel Sett…
chiol Sep 11, 2025
fcf8c7b
chore: add Apache License header to multiple files and update MySQL c…
chiol Sep 29, 2025
b3d1cb8
refactor: replace z.string().email() with z.email() in user schemas a…
chiol Sep 29, 2025
6c1f630
Add developer guide documentation for installation, API integration, …
chiol Oct 16, 2025
5324a77
fix: docs
chiol Oct 16, 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
8 changes: 2 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@ name: CI

on:
pull_request:
branches: ["*"]
branches: ['*']
push:
branches: ["main"]
branches: ['main']
merge_group:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

# You can leverage Vercel Remote Caching with Turbo to speed up your builds
# @link https://turborepo.org/docs/core-concepts/remote-caching#remote-caching-on-vercel-builds
env:
FORCE_COLOR: 3
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
CI: true

jobs:
Expand Down
48 changes: 16 additions & 32 deletions .github/workflows/docker-dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ on:
- '**-dev'

jobs:
api-build:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Docker meta
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container

- name: Docker meta for API
id: api-meta
uses: docker/metadata-action@v5
with:
Expand All @@ -23,29 +28,7 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push API
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/api.dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.api-meta.outputs.tags }}
labels: ${{ steps.api-meta.outputs.labels }}

web-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Docker meta
- name: Docker meta for Web
id: web-meta
uses: docker/metadata-action@v5
with:
Expand All @@ -63,11 +46,12 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Web
uses: docker/build-push-action@v6
- name: Bake and push multi-platform Docker images
uses: docker/bake-action@v4
with:
context: .
file: ./docker/web.dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.web-meta.outputs.tags }}
labels: ${{ steps.web-meta.outputs.labels }}
files: |
./docker/docker-bake.hcl
push: true
set: |
api.tags=${{ steps.api-meta.outputs.tags }}
web.tags=${{ steps.web-meta.outputs.tags }}
54 changes: 18 additions & 36 deletions .github/workflows/docker-prod-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,36 @@ on:
- '!**-dev'

jobs:
api-build:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Docker meta
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container

- name: Docker meta for API
id: api-meta
uses: docker/metadata-action@v5
with:
images: line/abc-user-feedback-api
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push API
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/api.dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.api-meta.outputs.tags }}
labels: ${{ steps.api-meta.outputs.labels }}

web-build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Docker meta
- name: Docker meta for Web
id: web-meta
uses: docker/metadata-action@v5
with:
images: line/abc-user-feedback-web
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest

- name: Login to DockerHub
if: github.event_name != 'pull_request'
Expand All @@ -65,11 +46,12 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Web
uses: docker/build-push-action@v6
- name: Bake and push multi-platform Docker images
uses: docker/bake-action@v4
with:
context: .
file: ./docker/web.dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.web-meta.outputs.tags }}
labels: ${{ steps.web-meta.outputs.labels }}
files: |
./docker/docker-bake.hcl
push: true
set: |
api.tags=${{ steps.api-meta.outputs.tags }}
web.tags=${{ steps.web-meta.outputs.tags }}
27 changes: 1 addition & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,6 @@

ABC User Feedback is a standalone web application designed to manage Voice of Customer (VoC) data. It enables you to efficiently gather and categorize customer feedback. The application is currently utilized in services with a reach of 10 million MAU.

## Quick Start

To quickly set up and run the application locally, follow these steps:

1. **Clone the Repository**:

```bash
git clone https://github.com/line/abc-user-feedback
cd abc-user-feedback
```

2. **Install Dependencies**:

```bash
pnpm install
```

3. **Start the Application**:
```bash
npx auf-cli init
npx auf-cli start
```

For more detailed setup instructions, refer to the [Getting Started](#getting-started) section.

<p align="center">
<video src="https://github.com/user-attachments/assets/a2ef7a1a-41ec-4cec-b7d1-bda5fbd7d48b" width="100%" />
</p>
Expand Down Expand Up @@ -147,7 +122,7 @@ npm run migration:run
pnpm dev
```

### Build Docker Image
### Option3. Build Docker Image

For your code build, you can build a Docker image using Docker Compose. Refer to [remote caching](https://turbo.build/repo/docs/core-concepts/remote-caching) and [deploying with Docker](https://turbo.build/repo/docs/handbook/deploying-with-docker) using `turborepo`.

Expand Down
1 change: 1 addition & 0 deletions apps/cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
abc-user-feedback
6 changes: 4 additions & 2 deletions apps/cli/config.toml → apps/cli/bin/assets/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ MYSQL_PRIMARY_URL="mysql://root:userfeedback@host.docker.internal:13306/userfeed
OPENSEARCH_USE=true
OPENSEARCH_NODE="http://localhost:9200"
OPENSEARCH_USERNAME="UserFeedback123!@#"
SMTP_HOST="localhost"
OPENSEARCH_PASSWORD="UserFeedback123!@#"

SMTP_HOST="smtp4dev"
SMTP_PORT=25
SMTP_SENDER="noreply@linecorp.com"
SMTP_BASE_URL="http://localhost:3000"

AUTO_MIGRATION=true
NODE_OPTIONS="--max_old_space_size=3072"
BASE_URL="http://localhost:3000"
JWT_SECRET="secret"
OPENSEARCH_PASSWORD="UserFeedback123!@#"
MASTER_API_KEY="MASTER_API_KEY"

[web]
Expand Down
34 changes: 34 additions & 0 deletions apps/cli/bin/assets/docker-compose.generated.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
services:
web:
hostname: web
image: line/abc-user-feedback-web
restart: always
ports:
- 3000:3000
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
- NEXT_PUBLIC_API_BASE_URL=http://localhost:4000
- NEXT_PUBLIC_MAX_DAYS=90
depends_on:
- api

api:
hostname: api
image: line/abc-user-feedback-api
restart: always
ports:
- 4000:4000
extra_hosts:
- 'host.docker.internal:host-gateway'
environment:
- JWT_SECRET=secret
- MYSQL_PRIMARY_URL=mysql://root:userfeedback@host.docker.internal:13306/userfeedback
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Security concern: Hardcoded sensitive values in configuration.

The Docker Compose file contains hardcoded sensitive values:

  • JWT_SECRET is set to "secret"
  • MYSQL_PRIMARY_URL contains database credentials

These values should be replaced with environment variables or secure secrets management.

    environment:
-      - JWT_SECRET=secret
-      - MYSQL_PRIMARY_URL=mysql://root:userfeedback@host.docker.internal:13306/userfeedback
+      - JWT_SECRET=${JWT_SECRET:-secret}
+      - MYSQL_PRIMARY_URL=${MYSQL_PRIMARY_URL:-mysql://root:userfeedback@host.docker.internal:13306/userfeedback}

This allows users to override these values with environment variables while still providing defaults.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- JWT_SECRET=secret
- MYSQL_PRIMARY_URL=mysql://root:userfeedback@host.docker.internal:13306/userfeedback
environment:
- JWT_SECRET=${JWT_SECRET:-secret}
- MYSQL_PRIMARY_URL=${MYSQL_PRIMARY_URL:-mysql://root:userfeedback@host.docker.internal:13306/userfeedback}

- BASE_URL=http://localhost:3000
- SMTP_HOST=smtp4dev
- SMTP_PORT=25
- SMTP_SENDER=noreply@linecorp.com
- SMTP_BASE_URL=http://localhost:3000
- AUTO_MIGRATION=true
- MASTER_API_KEY=MASTER_API_KEY
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace default API key with a placeholder or generated value.

The MASTER_API_KEY is set to a predictable value "MASTER_API_KEY". This should be a placeholder instructing users to change it, or better, a generated secure random value.

-      - MASTER_API_KEY=MASTER_API_KEY
+      - MASTER_API_KEY=${MASTER_API_KEY:-$(openssl rand -hex 16)}

Alternatively, generate this value during initialization and store it in the config.toml file.

Committable suggestion skipped: line range outside the PR's diff.

- NODE_OPTIONS=--max_old_space_size=3072
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add volume mounts for data persistence.

The Docker Compose services don't include any volume mounts. Without persistent storage, all data will be lost when containers are removed.

    environment:
      - JWT_SECRET=secret
      - MYSQL_PRIMARY_URL=mysql://root:userfeedback@host.docker.internal:13306/userfeedback
      - BASE_URL=http://localhost:3000
      - SMTP_HOST=smtp4dev
      - SMTP_PORT=25
      - SMTP_SENDER=noreply@linecorp.com
      - SMTP_BASE_URL=http://localhost:3000
      - AUTO_MIGRATION=true
      - MASTER_API_KEY=MASTER_API_KEY
      - NODE_OPTIONS=--max_old_space_size=3072
+    volumes:
+      - api_data:/app/data
+
+volumes:
+  api_data:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- BASE_URL=http://localhost:3000
- SMTP_HOST=smtp4dev
- SMTP_PORT=25
- SMTP_SENDER=noreply@linecorp.com
- SMTP_BASE_URL=http://localhost:3000
- AUTO_MIGRATION=true
- MASTER_API_KEY=MASTER_API_KEY
- NODE_OPTIONS=--max_old_space_size=3072
environment:
- JWT_SECRET=secret
- MYSQL_PRIMARY_URL=mysql://root:userfeedback@host.docker.internal:13306/userfeedback
- BASE_URL=http://localhost:3000
- SMTP_HOST=smtp4dev
- SMTP_PORT=25
- SMTP_SENDER=noreply@linecorp.com
- SMTP_BASE_URL=http://localhost:3000
- AUTO_MIGRATION=true
- MASTER_API_KEY=MASTER_API_KEY
- NODE_OPTIONS=--max_old_space_size=3072
volumes:
- api_data:/app/data
volumes:
api_data:

Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,7 @@ services:
ports:
- 13306:3306
volumes:
- ./volumes/mysql:/var/lib/mysql
networks:
- app_network

# optional for e2e test
mysql-for-e2e:
hostname: mysql
image: mysql:8.0.39
platform: linux/amd64
restart: always
command:
[
'--default-authentication-plugin=mysql_native_password',
'--collation-server=utf8mb4_bin',
]
environment:
MYSQL_ROOT_PASSWORD: userfeedback
MYSQL_DATABASE: e2e
MYSQL_USER: userfeedback
MYSQL_PASSWORD: userfeedback
TZ: UTC
ports:
- 13307:3306
volumes:
- ./volumes/mysql-for-e2e:/var/lib/mysql-for-e2e
networks:
- app_network
- mysql:/var/lib/mysql

# optional for email verification on creating user
smtp4dev:
Expand All @@ -55,15 +29,12 @@ services:
- 25:25
- 143:143
volumes:
- ./volumes/smtp4dev:/smtp4dev
networks:
- app_network
- smtp4dev:/smtp4dev

# optional for better performance on searching feedbacks
opensearch-node:
image: opensearchproject/opensearch:2.15.0
image: opensearchproject/opensearch:2.16.0
restart: always
container_name: opensearch-node
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node
Expand All @@ -80,27 +51,24 @@ services:
soft: 65536
hard: 65536
volumes:
- ./volumes/opensearch:/usr/share/opensearch/data
- opensearch:/usr/share/opensearch/data
ports:
- 9200:9200
- 9600:9600
networks:
- app_network

# optional for opensearch
opensearch-dashboards:
image: opensearchproject/opensearch-dashboards:2.15.0
image: opensearchproject/opensearch-dashboards:2.16.0
restart: always
container_name: opensearch-dashboards
ports:
- 5601:5601
environment:
- 'OPENSEARCH_HOSTS=["http://opensearch-node:9200"]'
- 'DISABLE_SECURITY_DASHBOARDS_PLUGIN=true'
depends_on:
- opensearch-node
networks:
- app_network

networks:
app_network:
volumes:
mysql:
smtp4dev:
opensearch:
Loading