Skip to content

Commit 46c90b1

Browse files
committed
Initial commit - Whaticket com Wuzapi v1.0.0
Sistema completo de atendimento com Wuzapi integrado: - Envio de mensagens (texto, áudio PTT, imagem, vídeo, documento) - ReadReceipt em tempo real (Delivered/Read) - Conversão automática WebM para OGG/Opus - Gravação de áudio nativa (MediaRecorder API) - Detecção de mensagens deletadas - Sincronização de IDs com UUID - Socket.IO para atualizações em tempo real - Frontend React com Material-UI - Backend Node.js + TypeScript + Express - Documentação completa
0 parents  commit 46c90b1

File tree

314 files changed

+22483
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

314 files changed

+22483
-0
lines changed

.env.example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# MYSQL
2+
MYSQL_ENGINE=
3+
MYSQL_VERSION=
4+
MYSQL_ROOT_PASSWORD=
5+
MYSQL_DATABASE=whaticket
6+
MYSQL_PORT=
7+
TZ=
8+
9+
# BACKEND
10+
BACKEND_PORT=
11+
BACKEND_SERVER_NAME=api.mydomain.com
12+
BACKEND_URL=https://api.mydomain.com
13+
PROXY_PORT=443
14+
JWT_SECRET=
15+
JWT_REFRESH_SECRET=
16+
17+
# FRONTEND
18+
FRONTEND_PORT=80
19+
FRONTEND_SSL_PORT=443
20+
FRONTEND_SERVER_NAME=myapp.mydomain.com
21+
FRONTEND_URL=https://myapp.mydomain.com
22+
23+
# BROWSERLESS
24+
MAX_CONCURRENT_SESSIONS=
25+
26+
# PHPMYADMIN
27+
PMA_PORT=

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
* text=auto
2+
*.sh text eol=lf
3+
Dockerfile eol=lf
4+
docker-compose.yml eol=lf
5+
docker-compose.*.yml eol=lf
6+
*.jpg binary
7+
*.png binary
8+
*.gif binary
9+
*.woff binary
10+
*.tff binary
11+
*.eot binary
12+
*.otf binary

.github/stale.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 10
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 10
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
- bug
10+
- enhancement
11+
# Label to use when marking an issue as stale
12+
staleLabel: stale
13+
# Comment to post when marking an issue as stale. Set to `false` to disable
14+
markComment: >
15+
This issue has been automatically marked as stale because it has not had
16+
recent activity. It will be closed if no further activity occurs. Thank you
17+
for your contributions.
18+
# Comment to post when closing a stale issue. Set to `false` to disable
19+
closeComment: false
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test build backend
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "backend/**"
7+
8+
push:
9+
branches:
10+
- master
11+
paths:
12+
- "backend/**"
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
node-version: [14.x]
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Install dependencies
32+
working-directory: backend
33+
run: npm install
34+
35+
- run: npm run build
36+
working-directory: backend
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test build frontend
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- "frontend/**"
7+
8+
push:
9+
branches:
10+
- master
11+
paths:
12+
- "frontend/**"
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
node-version: [14.x]
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Install dependencies
32+
working-directory: frontend
33+
run: npm install
34+
35+
- run: CI=false npm run build
36+
working-directory: frontend
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Create and publish a Backend Docker image
2+
3+
on:
4+
5+
push:
6+
branches: [master]
7+
paths:
8+
- "backend/**"
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: ${{ github.repository }}
13+
14+
jobs:
15+
build-and-push-image:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
packages: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
25+
- name: Log in to the Container registry
26+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
27+
with:
28+
registry: ${{ env.REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Extract metadata (tags, labels) for Docker
33+
id: meta
34+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-backend
37+
38+
- name: Build and push Docker image
39+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
40+
with:
41+
context: ./backend/
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Create and publish a Frontend Docker image
2+
3+
on:
4+
5+
push:
6+
branches: [master]
7+
paths:
8+
- "frontend/**"
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: ${{ github.repository }}
13+
14+
jobs:
15+
build-and-push-image:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
packages: write
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
24+
25+
- name: Log in to the Container registry
26+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
27+
with:
28+
registry: ${{ env.REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
32+
- name: Extract metadata (tags, labels) for Docker
33+
id: meta
34+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-frontend
37+
38+
- name: Build and push Docker image
39+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
40+
with:
41+
context: ./frontend/
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.docker/data/
2+
ssl/
3+
.env
4+
.wwebjs_auth
5+
.idea

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 canove
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)