diff --git a/referência/sistema-de-chamados-main/.env.example b/referência/sistema-de-chamados-main/.env.example deleted file mode 100644 index 2fbeb51..0000000 --- a/referência/sistema-de-chamados-main/.env.example +++ /dev/null @@ -1,28 +0,0 @@ -NODE_ENV=development - -# Public app URL -NEXT_PUBLIC_APP_URL=http://localhost:3000 - -# Better Auth -BETTER_AUTH_URL=http://localhost:3000 -BETTER_AUTH_SECRET=change-me-in-prod - -# Convex (dev server URL) -NEXT_PUBLIC_CONVEX_URL=http://127.0.0.1:3210 - -# SQLite database (local dev) -DATABASE_URL=file:./prisma/db.dev.sqlite - -# Optional SMTP (dev) -# SMTP_ADDRESS=localhost -# SMTP_PORT=1025 -# SMTP_TLS=false -# SMTP_USERNAME= -# SMTP_PASSWORD= -# SMTP_AUTHENTICATION=login -# SMTP_ENABLE_STARTTLS_AUTO=false -# MAILER_SENDER_EMAIL=no-reply@example.com - -# Dev-only bypass to simplify local testing (do NOT enable in prod) -# DEV_BYPASS_AUTH=0 -# NEXT_PUBLIC_DEV_BYPASS_AUTH=0 diff --git a/referência/sistema-de-chamados-main/.github/workflows/ci-cd-web-desktop.yml b/referência/sistema-de-chamados-main/.github/workflows/ci-cd-web-desktop.yml deleted file mode 100644 index 3296b69..0000000 --- a/referência/sistema-de-chamados-main/.github/workflows/ci-cd-web-desktop.yml +++ /dev/null @@ -1,533 +0,0 @@ -name: CI/CD Web + Desktop - -on: - push: - branches: [ main ] - tags: - - 'v*.*.*' - workflow_dispatch: - inputs: - force_web_deploy: - description: 'Forçar deploy do Web (ignorar filtro)?' - required: false - default: 'false' - force_convex_deploy: - description: 'Forçar deploy do Convex (ignorar filtro)?' - required: false - default: 'false' - -env: - APP_DIR: /srv/apps/sistema - VPS_UPDATES_DIR: /var/www/updates - RUN_MACHINE_SMOKE: ${{ vars.RUN_MACHINE_SMOKE || secrets.RUN_MACHINE_SMOKE || 'false' }} - -jobs: - changes: - name: Detect changes - runs-on: ubuntu-latest - outputs: - convex: ${{ steps.filter.outputs.convex }} - web: ${{ steps.filter.outputs.web }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Paths filter - id: filter - uses: dorny/paths-filter@v3 - with: - filters: | - convex: - - 'convex/**' - web: - - 'src/**' - - 'public/**' - - 'prisma/**' - - 'next.config.ts' - - 'package.json' - - 'pnpm-lock.yaml' - - 'tsconfig.json' - - 'middleware.ts' - - 'stack.yml' - - deploy: - name: Deploy (VPS Linux) - needs: changes - # Executa em qualquer push na main (independente do filtro) ou quando disparado manualmente - if: ${{ github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main' }} - runs-on: [ self-hosted, linux, vps ] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Determine APP_DIR (fallback safe path) - id: appdir - run: | - TS=$(date +%s) - # Use a web-specific build dir to avoid clashes with convex job - FALLBACK_DIR="$HOME/apps/web.build.$TS" - mkdir -p "$FALLBACK_DIR" - echo "Using APP_DIR (fallback)=$FALLBACK_DIR" - echo "EFFECTIVE_APP_DIR=$FALLBACK_DIR" >> "$GITHUB_ENV" - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.20.0 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Setup Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.3.1 - - - name: Verify Bun runtime - run: bun --version - - - name: Permissions diagnostic (server paths) - run: | - set +e - echo "== Basic context ==" - whoami || true - id || true - groups || true - umask || true - echo "HOME=$HOME" - echo "APP_DIR(default)=${APP_DIR:-/srv/apps/sistema}" - echo "EFFECTIVE_APP_DIR=$EFFECTIVE_APP_DIR" - - echo "\n== Permissions check ==" - check_path() { - P="$1" - echo "-- $P" - if [ -e "$P" ]; then - stat -c '%A %U:%G %n' "$P" 2>/dev/null || ls -ld "$P" || true - echo -n "WRITABLE? "; [ -w "$P" ] && echo yes || echo no - if command -v namei >/dev/null 2>&1; then - namei -l "$P" || true - fi - TMP="$P/.permtest.$$" - (echo test > "$TMP" 2>/dev/null && echo "CREATE_FILE: ok" && rm -f "$TMP") || echo "CREATE_FILE: failed" - else - echo "(missing)" - fi - } - check_path "/srv/apps/sistema" - check_path "/srv/apps/sistema/src/app/machines/handshake" - check_path "/srv/apps/sistema/apps/desktop/node_modules" - check_path "/srv/apps/sistema/node_modules" - check_path "$EFFECTIVE_APP_DIR" - check_path "$EFFECTIVE_APP_DIR/node_modules" - - - name: Sync workspace to APP_DIR (preserving local env) - run: | - mkdir -p "$EFFECTIVE_APP_DIR" - RSYNC_FLAGS="-az --inplace --no-times --no-perms --no-owner --no-group --delete" - # Excluir .env apenas quando copiando para o diretório padrão (/srv) para preservar segredos locais - EXCLUDE_ENV="--exclude '.env*' --exclude 'apps/desktop/.env*' --exclude 'convex/.env*'" - if [ "$EFFECTIVE_APP_DIR" != "${APP_DIR:-/srv/apps/sistema}" ]; then - EXCLUDE_ENV="" - fi - rsync $RSYNC_FLAGS \ - --filter='protect .next.old*' \ - --exclude '.next.old*' \ - --filter='protect node_modules' \ - --filter='protect node_modules/**' \ - --filter='protect .pnpm-store' \ - --filter='protect .pnpm-store/**' \ - --filter='protect .env' \ - --filter='protect .env*' \ - --filter='protect apps/desktop/.env*' \ - --filter='protect convex/.env*' \ - --exclude '.git' \ - --exclude '.next' \ - --exclude 'node_modules' \ - --exclude 'node_modules/**' \ - --exclude '.pnpm-store' \ - --exclude '.pnpm-store/**' \ - $EXCLUDE_ENV \ - ./ "$EFFECTIVE_APP_DIR"/ - - - name: Acquire Convex admin key - id: key - run: | - CID=$(docker ps --format '{{.ID}} {{.Names}}' | awk '/sistema_convex_backend/{print $1; exit}') - if [ -z "$CID" ]; then echo "No convex container"; exit 1; fi - KEY=$(docker exec -i "$CID" /bin/sh -lc './generate_admin_key.sh' | tr -d '\r' | grep -o 'convex-self-hosted|[^ ]*' | tail -n1) - echo "ADMIN_KEY=$KEY" >> $GITHUB_OUTPUT - echo "Admin key acquired? $([ -n "$KEY" ] && echo yes || echo no)" - - - name: Copy production .env if present - run: | - DEFAULT_DIR="${APP_DIR:-/srv/apps/sistema}" - if [ "$EFFECTIVE_APP_DIR" != "$DEFAULT_DIR" ] && [ -f "$DEFAULT_DIR/.env" ]; then - echo "Copying production .env from $DEFAULT_DIR to $EFFECTIVE_APP_DIR" - cp -f "$DEFAULT_DIR/.env" "$EFFECTIVE_APP_DIR/.env" - fi - - - name: Prune workspace for server-only build - run: | - cd "$EFFECTIVE_APP_DIR" - # Keep only root (web) as a package in this effective workspace - printf "packages:\n - .\n\nignoredBuiltDependencies:\n - '@prisma/client'\n - '@prisma/engines'\n - '@tailwindcss/oxide'\n - esbuild\n - prisma\n - sharp\n - unrs-resolver\n" > pnpm-workspace.yaml - - - name: Ensure Next.js cache directory exists and is writable - run: | - cd "$EFFECTIVE_APP_DIR" - mkdir -p .next/cache - chmod -R u+rwX .next || true - - - name: Cache Next.js build cache (.next/cache) - uses: actions/cache@v4 - with: - path: ${{ env.EFFECTIVE_APP_DIR }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml', 'bun.lock') }}-${{ hashFiles('src/**/*.ts', 'src/**/*.tsx', 'src/**/*.js', 'src/**/*.jsx', 'next.config.ts') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml', 'bun.lock') }}- - - - name: Install and build (Next.js) - run: | - cd "$EFFECTIVE_APP_DIR" - bun install --frozen-lockfile --filter '!appsdesktop' - bun run prisma:generate - bun run build:bun - - - name: Publish build to stable APP_DIR directory - run: | - set -e - DEST="$HOME/apps/sistema" - mkdir -p "$DEST" - mkdir -p "$DEST/.next/static" - # One-time fix for old root-owned files (esp. .pnpm-store) left by previous containers - docker run --rm -v "$DEST":/target alpine:3 sh -lc 'chown -R 1000:1000 /target 2>/dev/null || true; chmod -R u+rwX /target 2>/dev/null || true' || true - # Preserve previously published static assets to keep stale chunks available for clients mid-navigation - if [ -d "$EFFECTIVE_APP_DIR/.next/static" ]; then - rsync -a \ - "$EFFECTIVE_APP_DIR/.next/static/" "$DEST/.next/static/" - fi - # Publish new build; exclude .pnpm-store to avoid Permission denied on old entries - rsync -a --delete \ - --chown=1000:1000 \ - --exclude '.pnpm-store' --exclude '.pnpm-store/**' \ - --exclude '.next/static' \ - "$EFFECTIVE_APP_DIR"/ "$DEST"/ - echo "Published build to: $DEST" - - - name: Swarm deploy (stack.yml) - run: | - cd "$EFFECTIVE_APP_DIR" - # Exporta variáveis do .env para substituição no stack (ex.: MACHINE_PROVISIONING_SECRET) - set -o allexport - if [ -f .env ]; then . ./.env; fi - set +o allexport - APP_DIR_STABLE="$HOME/apps/sistema" - if [ ! -d "$APP_DIR_STABLE" ]; then - echo "ERROR: Stable APP_DIR does not exist: $APP_DIR_STABLE" >&2; exit 1 - fi - echo "Using APP_DIR (stable)=$APP_DIR_STABLE" - APP_DIR="$APP_DIR_STABLE" RELEASE_SHA=${{ github.sha }} docker stack deploy --with-registry-auth -c stack.yml sistema - - - name: Ensure Convex service envs and restart - run: | - cd "$EFFECTIVE_APP_DIR" - set -o allexport - if [ -f .env ]; then . ./.env; fi - set +o allexport - echo "Ensuring Convex envs on service: sistema_convex_backend" - if [ -n "${MACHINE_PROVISIONING_SECRET:-}" ]; then - docker service update --env-add MACHINE_PROVISIONING_SECRET="${MACHINE_PROVISIONING_SECRET}" sistema_convex_backend || true - fi - if [ -n "${MACHINE_TOKEN_TTL_MS:-}" ]; then - docker service update --env-add MACHINE_TOKEN_TTL_MS="${MACHINE_TOKEN_TTL_MS}" sistema_convex_backend || true - fi - if [ -n "${FLEET_SYNC_SECRET:-}" ]; then - docker service update --env-add FLEET_SYNC_SECRET="${FLEET_SYNC_SECRET}" sistema_convex_backend || true - fi - echo "Current envs:" - docker service inspect sistema_convex_backend --format '{{range .Spec.TaskTemplate.ContainerSpec.Env}}{{println .}}{{end}}' || true - echo "Forcing service restart..." - docker service update --force sistema_convex_backend || true - - - name: Smoke test — register + heartbeat - run: | - set -e - if [ "${RUN_MACHINE_SMOKE:-false}" != "true" ]; then - echo "RUN_MACHINE_SMOKE != true — pulando smoke test"; exit 0 - fi - # Load MACHINE_PROVISIONING_SECRET from production .env on the host - if [ -f /srv/apps/sistema/.env ]; then - set -o allexport - . /srv/apps/sistema/.env - set +o allexport - fi - if [ -z "${MACHINE_PROVISIONING_SECRET:-}" ]; then - echo "MACHINE_PROVISIONING_SECRET ausente — pulando smoke test"; exit 0 - fi - HOSTNAME_TEST="ci-smoke-$(date +%s)" - BODY='{"provisioningSecret":"'"$MACHINE_PROVISIONING_SECRET"'","tenantId":"tenant-atlas","hostname":"'"$HOSTNAME_TEST"'","os":{"name":"Linux","version":"6.1.0","architecture":"x86_64"},"macAddresses":["AA:BB:CC:DD:EE:FF"],"serialNumbers":[],"metadata":{"inventory":{"cpu":"i7","ramGb":16}},"registeredBy":"ci-smoke"}' - HTTP=$(curl -sS -o resp.json -w "%{http_code}" -H 'Content-Type: application/json' -d "$BODY" https://tickets.esdrasrenan.com.br/api/machines/register || true) - echo "Register HTTP=$HTTP" - if [ "$HTTP" != "201" ]; then - echo "Register failed:"; tail -c 600 resp.json || true; exit 1; fi - TOKEN=$(node -e 'try{const j=require("fs").readFileSync("resp.json","utf8");process.stdout.write(JSON.parse(j).machineToken||"");}catch(e){process.stdout.write("")}' ) - if [ -z "$TOKEN" ]; then echo "Missing token in register response"; exit 1; fi - HB=$(curl -sS -o /dev/null -w "%{http_code}" -H 'Content-Type: application/json' -d '{"machineToken":"'"$TOKEN"'","status":"online","metrics":{"cpuPct":5,"memFreePct":70}}' https://tickets.esdrasrenan.com.br/api/machines/heartbeat || true) - echo "Heartbeat HTTP=$HB" - if [ "$HB" != "200" ]; then echo "Heartbeat failed"; exit 1; fi - - - name: Cleanup old build workdirs (keep last 2) - run: | - set -e - ROOT="$HOME/apps" - KEEP=2 - PATTERN='web.build.*' - ACTIVE="$HOME/apps/sistema" - echo "Scanning $ROOT for old $PATTERN dirs" - LIST=$(find "$ROOT" -maxdepth 1 -type d -name "$PATTERN" | sort -r || true) - echo "$LIST" | sed -n "1,${KEEP}p" | sed 's/^/Keeping: /' || true - echo "$LIST" | sed "1,${KEEP}d" | while read dir; do - [ -z "$dir" ] && continue - if [ -n "$ACTIVE" ] && [ "$(readlink -f "$dir")" = "$ACTIVE" ]; then - echo "Skipping active dir (in use by APP_DIR): $dir"; continue - fi - echo "Removing $dir" - chmod -R u+rwX "$dir" 2>/dev/null || true - rm -rf "$dir" || { - echo "Local rm failed, falling back to docker (root) cleanup for $dir..." - docker run --rm -v "$dir":/target alpine:3 sh -lc 'chown -R 1000:1000 /target 2>/dev/null || true; chmod -R u+rwX /target 2>/dev/null || true; rm -rf /target/* /target/.[!.]* /target/..?* 2>/dev/null || true' || true - rm -rf "$dir" 2>/dev/null || rmdir "$dir" 2>/dev/null || true - } - done - echo "Disk usage (top 10 under $ROOT):" - du -sh "$ROOT"/* 2>/dev/null | sort -rh | head -n 10 || true - - - name: Restart web service with new code (skip — stack deploy already updated) - if: ${{ always() && false }} - run: | - docker service update --force sistema_web - - - name: Restart Convex backend service (optional) - run: | - # Fail the job if the convex backend cannot restart - docker service update --force sistema_convex_backend - - convex_deploy: - name: Deploy Convex functions - needs: changes - # Executa quando convex/** mudar ou via workflow_dispatch - if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.convex == 'true' }} - runs-on: [ self-hosted, linux, vps ] - env: - APP_DIR: /srv/apps/sistema - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Determine APP_DIR (fallback safe path) - id: appdir - run: | - TS=$(date +%s) - # Use a convex-specific build dir to avoid clashes with web job - FALLBACK_DIR="$HOME/apps/convex.build.$TS" - mkdir -p "$FALLBACK_DIR" - echo "Using APP_DIR (fallback)=$FALLBACK_DIR" - echo "EFFECTIVE_APP_DIR=$FALLBACK_DIR" >> "$GITHUB_ENV" - - - name: Sync workspace to APP_DIR (preserving local env) - run: | - mkdir -p "$EFFECTIVE_APP_DIR" - RSYNC_FLAGS="-az --inplace --no-times --no-perms --no-owner --no-group --delete" - rsync $RSYNC_FLAGS \ - --filter='protect .next.old*' \ - --exclude '.next.old*' \ - --exclude '.env*' \ - --exclude 'apps/desktop/.env*' \ - --exclude 'convex/.env*' \ - --filter='protect node_modules' \ - --filter='protect node_modules/**' \ - --filter='protect .pnpm-store' \ - --filter='protect .pnpm-store/**' \ - --exclude '.git' \ - --exclude '.next' \ - --exclude 'node_modules' \ - --exclude 'node_modules/**' \ - --exclude '.pnpm-store' \ - --exclude '.pnpm-store/**' \ - ./ "$EFFECTIVE_APP_DIR"/ - - - name: Acquire Convex admin key - id: key - run: | - CID=$(docker ps --format '{{.ID}} {{.Names}}' | awk '/sistema_convex_backend/{print $1; exit}') - if [ -z "$CID" ]; then echo "No convex container"; exit 1; fi - KEY=$(docker exec -i "$CID" /bin/sh -lc './generate_admin_key.sh' | tr -d '\r' | grep -o 'convex-self-hosted|[^ ]*' | tail -n1) - echo "ADMIN_KEY=$KEY" >> $GITHUB_OUTPUT - echo "Admin key acquired? $([ -n "$KEY" ] && echo yes || echo no)" - - - name: Bring convex.json from live app if present - run: | - if [ -f "$APP_DIR/convex.json" ]; then - echo "Copying $APP_DIR/convex.json -> $EFFECTIVE_APP_DIR/convex.json" - cp -f "$APP_DIR/convex.json" "$EFFECTIVE_APP_DIR/convex.json" - else - echo "No existing convex.json found at $APP_DIR; convex CLI will need self-hosted vars" - fi - - - name: Set Convex env vars (self-hosted) - env: - CONVEX_SELF_HOSTED_URL: https://convex.esdrasrenan.com.br - CONVEX_SELF_HOSTED_ADMIN_KEY: ${{ steps.key.outputs.ADMIN_KEY }} - MACHINE_PROVISIONING_SECRET: ${{ secrets.MACHINE_PROVISIONING_SECRET }} - MACHINE_TOKEN_TTL_MS: ${{ secrets.MACHINE_TOKEN_TTL_MS }} - FLEET_SYNC_SECRET: ${{ secrets.FLEET_SYNC_SECRET }} - run: | - set -e - docker run --rm -i \ - -v "$EFFECTIVE_APP_DIR":/app \ - -w /app \ - -e CONVEX_SELF_HOSTED_URL \ - -e CONVEX_SELF_HOSTED_ADMIN_KEY \ - -e MACHINE_PROVISIONING_SECRET \ - -e MACHINE_TOKEN_TTL_MS \ - -e FLEET_SYNC_SECRET \ - node:20-bullseye bash -lc "set -euo pipefail; curl -fsSL https://bun.sh/install | bash >/tmp/bun-install.log; export BUN_INSTALL=\"\${BUN_INSTALL:-/root/.bun}\"; export PATH=\"\$BUN_INSTALL/bin:\$PATH\"; bun install --frozen-lockfile; \ - if [ -n \"$MACHINE_PROVISIONING_SECRET\" ]; then bunx convex env set MACHINE_PROVISIONING_SECRET \"$MACHINE_PROVISIONING_SECRET\"; fi; \ - if [ -n \"$MACHINE_TOKEN_TTL_MS\" ]; then bunx convex env set MACHINE_TOKEN_TTL_MS \"$MACHINE_TOKEN_TTL_MS\"; fi; \ - if [ -n \"$FLEET_SYNC_SECRET\" ]; then bunx convex env set FLEET_SYNC_SECRET \"$FLEET_SYNC_SECRET\"; fi; \ - bunx convex env list" - - - name: Ensure .env is not present for Convex deploy - run: | - cd "$EFFECTIVE_APP_DIR" - if [ -f .env ]; then - echo "Renaming .env -> .env.bak (Convex self-hosted deploy)" - mv -f .env .env.bak - fi - - name: Deploy functions to Convex self-hosted - env: - CONVEX_SELF_HOSTED_URL: https://convex.esdrasrenan.com.br - CONVEX_SELF_HOSTED_ADMIN_KEY: ${{ steps.key.outputs.ADMIN_KEY }} - run: | - docker run --rm -i \ - -v "$EFFECTIVE_APP_DIR":/app \ - -w /app \ - -e CI=true \ - -e CONVEX_SELF_HOSTED_URL \ - -e CONVEX_SELF_HOSTED_ADMIN_KEY \ - node:20-bullseye bash -lc "set -euo pipefail; curl -fsSL https://bun.sh/install | bash >/tmp/bun-install.log; export BUN_INSTALL=\"\${BUN_INSTALL:-/root/.bun}\"; export PATH=\"\$BUN_INSTALL/bin:\$PATH\"; bun install --frozen-lockfile; bunx convex deploy" - - - name: Cleanup old convex build workdirs (keep last 2) - run: | - set -e - ROOT="$HOME/apps" - KEEP=2 - PATTERN='convex.build.*' - LIST=$(find "$ROOT" -maxdepth 1 -type d -name "$PATTERN" | sort -r || true) - echo "$LIST" | sed -n "1,${KEEP}p" | sed 's/^/Keeping: /' || true - echo "$LIST" | sed "1,${KEEP}d" | while read dir; do - [ -z "$dir" ] && continue - echo "Removing $dir" - chmod -R u+rwX "$dir" 2>/dev/null || true - rm -rf "$dir" || { - echo "Local rm failed, falling back to docker (root) cleanup for $dir..." - docker run --rm -v "$dir":/target alpine:3 sh -lc 'chown -R 1000:1000 /target 2>/dev/null || true; chmod -R u+rwX /target 2>/dev/null || true; rm -rf /target/* /target/.[!.]* /target/..?* 2>/dev/null || true' || true - rm -rf "$dir" 2>/dev/null || rmdir "$dir" 2>/dev/null || true - } - done - - desktop_release: - name: Desktop Release (Windows) - if: ${{ startsWith(github.ref, 'refs/tags/v') }} - runs-on: [ self-hosted, windows, desktop ] - defaults: - run: - working-directory: apps/desktop - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.20.0 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Install deps (desktop) - run: pnpm install --frozen-lockfile - - - name: Build with Tauri - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - with: - projectPath: apps/desktop - - - - name: Upload latest.json + bundles to VPS - uses: appleboy/scp-action@v0.1.7 - with: - host: ${{ secrets.VPS_HOST }} - username: ${{ secrets.VPS_USER }} - key: ${{ secrets.VPS_SSH_KEY }} - source: | - **/bundle/**/latest.json - **/bundle/**/* - target: ${{ env.VPS_UPDATES_DIR }} - overwrite: true - - diagnose_convex: - name: Diagnose Convex (env + register test) - if: ${{ github.event_name == 'workflow_dispatch' }} - runs-on: [ self-hosted, linux, vps ] - steps: - - name: Print service env and .env subset - run: | - echo "=== Convex service env ===" - docker service inspect sistema_convex_backend --format '{{range .Spec.TaskTemplate.ContainerSpec.Env}}{{println .}}{{end}}' || true - echo - echo "=== /srv/apps/sistema/.env subset ===" - [ -f /srv/apps/sistema/.env ] && grep -E '^(MACHINE_PROVISIONING_SECRET|MACHINE_TOKEN_TTL_MS|FLEET_SYNC_SECRET|NEXT_PUBLIC_CONVEX_URL)=' -n /srv/apps/sistema/.env || echo '(no .env)' - - name: Acquire Convex admin key - id: key - run: | - CID=$(docker ps --format '{{.ID}} {{.Names}}' | awk '/sistema_convex_backend/{print $1; exit}') - if [ -z "$CID" ]; then echo "No convex container"; exit 1; fi - KEY=$(docker exec -i "$CID" /bin/sh -lc './generate_admin_key.sh' | tr -d '\r' | grep -o 'convex-self-hosted|[^ ]*' | tail -n1) - echo "ADMIN_KEY=$KEY" >> $GITHUB_OUTPUT - echo "Admin key acquired? $([ -n "$KEY" ] && echo yes || echo no)" - - name: List Convex env and set missing - env: - CONVEX_SELF_HOSTED_URL: https://convex.esdrasrenan.com.br - ADMIN_KEY: ${{ steps.key.outputs.ADMIN_KEY }} - run: | - set -e - if [ -f /srv/apps/sistema/.env ]; then - set -o allexport - . /srv/apps/sistema/.env - set +o allexport - fi - docker run --rm -i \ - -v /srv/apps/sistema:/app -w /app \ - -e CONVEX_SELF_HOSTED_URL -e CONVEX_SELF_HOSTED_ADMIN_KEY="$ADMIN_KEY" \ - -e MACHINE_PROVISIONING_SECRET -e MACHINE_TOKEN_TTL_MS -e FLEET_SYNC_SECRET \ - node:20-bullseye bash -lc "set -euo pipefail; curl -fsSL https://bun.sh/install | bash >/tmp/bun-install.log; export BUN_INSTALL=\"\${BUN_INSTALL:-/root/.bun}\"; export PATH=\"\$BUN_INSTALL/bin:\$PATH\"; bun install --frozen-lockfile; \ - unset CONVEX_DEPLOYMENT; bunx convex env list; \ - if [ -n \"$MACHINE_PROVISIONING_SECRET\" ]; then bunx convex env set MACHINE_PROVISIONING_SECRET \"$MACHINE_PROVISIONING_SECRET\"; fi; \ - if [ -n \"$MACHINE_TOKEN_TTL_MS\" ]; then bunx convex env set MACHINE_TOKEN_TTL_MS \"$MACHINE_TOKEN_TTL_MS\"; fi; \ - if [ -n \"$FLEET_SYNC_SECRET\" ]; then bunx convex env set FLEET_SYNC_SECRET \"$FLEET_SYNC_SECRET\"; fi; \ - bunx convex env list" - - name: Test register from runner - run: | - HOST="vm-teste-$(date +%s)" - DATA='{"provisioningSecret":"'"${MACHINE_PROVISIONING_SECRET:-"71daa9ef54cb224547e378f8121ca898b614446c142a132f73c2221b4d53d7d6"}"'","tenantId":"tenant-atlas","hostname":"'"$HOST"'","os":{"name":"Linux","version":"6.1.0","architecture":"x86_64"},"macAddresses":["AA:BB:CC:DD:EE:FF"],"serialNumbers":[],"metadata":{"inventario":{"cpu":"i7","ramGb":16}},"registeredBy":"diag-test"}' - HTTP=$(curl -sS -o resp.json -w "%{http_code}" -H 'Content-Type: application/json' -d "$DATA" https://tickets.esdrasrenan.com.br/api/machines/register || true) - echo "Register HTTP=$HTTP" && tail -c 400 resp.json || true diff --git a/referência/sistema-de-chamados-main/.github/workflows/desktop-release.yml b/referência/sistema-de-chamados-main/.github/workflows/desktop-release.yml deleted file mode 100644 index d0b3c21..0000000 --- a/referência/sistema-de-chamados-main/.github/workflows/desktop-release.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Desktop Release (Tauri) - -on: - workflow_dispatch: - push: - tags: - - 'desktop-v*' - -permissions: - contents: write - -jobs: - build: - name: Build ${{ matrix.platform }} - runs-on: ${{ matrix.runner }} - strategy: - fail-fast: false - matrix: - include: - - platform: linux - runner: ubuntu-latest - - platform: windows - runner: windows-latest - - platform: macos - runner: macos-latest - defaults: - run: - shell: bash - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Enable Corepack - run: corepack enable && corepack prepare pnpm@10.20.0 --activate - - - name: Install Rust (stable) - uses: dtolnay/rust-toolchain@stable - - - name: Install Linux deps - if: matrix.platform == 'linux' - run: | - sudo apt-get update - sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libxdo-dev libssl-dev build-essential curl wget file - - - name: Install pnpm deps - run: pnpm -C apps/desktop install --frozen-lockfile - - - - name: Build desktop - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - VITE_APP_URL: https://tickets.esdrasrenan.com.br - VITE_API_BASE_URL: https://tickets.esdrasrenan.com.br - run: pnpm -C apps/desktop tauri build - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: desktop-${{ matrix.platform }} - path: apps/desktop/src-tauri/target/release/bundle diff --git a/referência/sistema-de-chamados-main/.github/workflows/quality-checks.yml b/referência/sistema-de-chamados-main/.github/workflows/quality-checks.yml deleted file mode 100644 index 73446cb..0000000 --- a/referência/sistema-de-chamados-main/.github/workflows/quality-checks.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Quality Checks - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - lint-test-build: - name: Lint, Test and Build - runs-on: ubuntu-latest - env: - BETTER_AUTH_SECRET: test-secret - NEXT_PUBLIC_APP_URL: http://localhost:3000 - BETTER_AUTH_URL: http://localhost:3000 - NEXT_PUBLIC_CONVEX_URL: http://localhost:3210 - DATABASE_URL: file:./prisma/db.dev.sqlite - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Setup Bun - uses: oven-sh/setup-bun@v2 - with: - bun-version: 1.3.1 - - - name: Verify Bun - run: bun --version - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: Cache Next.js build cache - uses: actions/cache@v4 - with: - path: | - ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml', 'bun.lock') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }} - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml', 'bun.lock') }}- - - - name: Generate Prisma client - run: bun run prisma:generate - - - name: Lint - run: bun run lint - - - name: Test - run: bun test - - - name: Build - run: bun run build:bun diff --git a/referência/sistema-de-chamados-main/.gitignore b/referência/sistema-de-chamados-main/.gitignore deleted file mode 100644 index 7e0652c..0000000 --- a/referência/sistema-de-chamados-main/.gitignore +++ /dev/null @@ -1,60 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/versions - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem -*.sqlite -# external experiments -nova-calendar-main/ - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* -.pnpm-debug.log* - -# env files (can opt-in for committing if needed) -.env* -!.env.example -!apps/desktop/.env.example - -# Accidental Windows duplicate downloads (e.g., "env (1)") -env (*) -env (1) - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - -# backups locais -.archive/ - -# arquivos locais temporários -Captura de tela *.png -Screenshot*.png -# Ignore NTFS ADS streams accidentally committed from Windows downloads -*:*Zone.Identifier -*:\:Zone.Identifier diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/Inter-Italic-VariableFont_opsz,wght.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/Inter-Italic-VariableFont_opsz,wght.ttf deleted file mode 100644 index 43ed4f5..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/Inter-Italic-VariableFont_opsz,wght.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/Inter-VariableFont_opsz,wght.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/Inter-VariableFont_opsz,wght.ttf deleted file mode 100644 index e31b51e..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/Inter-VariableFont_opsz,wght.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/OFL.txt b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/OFL.txt deleted file mode 100644 index d05ec4b..0000000 --- a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/OFL.txt +++ /dev/null @@ -1,93 +0,0 @@ -Copyright 2020 The Inter Project Authors (https://github.com/rsms/inter) - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -https://openfontlicense.org - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/README.txt b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/README.txt deleted file mode 100644 index b92a417..0000000 --- a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/README.txt +++ /dev/null @@ -1,118 +0,0 @@ -Inter Variable Font -=================== - -This download contains Inter as both variable fonts and static fonts. - -Inter is a variable font with these axes: - opsz - wght - -This means all the styles are contained in these files: - Inter/Inter-VariableFont_opsz,wght.ttf - Inter/Inter-Italic-VariableFont_opsz,wght.ttf - -If your app fully supports variable fonts, you can now pick intermediate styles -that aren’t available as static fonts. Not all apps support variable fonts, and -in those cases you can use the static font files for Inter: - Inter/static/Inter_18pt-Thin.ttf - Inter/static/Inter_18pt-ExtraLight.ttf - Inter/static/Inter_18pt-Light.ttf - Inter/static/Inter_18pt-Regular.ttf - Inter/static/Inter_18pt-Medium.ttf - Inter/static/Inter_18pt-SemiBold.ttf - Inter/static/Inter_18pt-Bold.ttf - Inter/static/Inter_18pt-ExtraBold.ttf - Inter/static/Inter_18pt-Black.ttf - Inter/static/Inter_24pt-Thin.ttf - Inter/static/Inter_24pt-ExtraLight.ttf - Inter/static/Inter_24pt-Light.ttf - Inter/static/Inter_24pt-Regular.ttf - Inter/static/Inter_24pt-Medium.ttf - Inter/static/Inter_24pt-SemiBold.ttf - Inter/static/Inter_24pt-Bold.ttf - Inter/static/Inter_24pt-ExtraBold.ttf - Inter/static/Inter_24pt-Black.ttf - Inter/static/Inter_28pt-Thin.ttf - Inter/static/Inter_28pt-ExtraLight.ttf - Inter/static/Inter_28pt-Light.ttf - Inter/static/Inter_28pt-Regular.ttf - Inter/static/Inter_28pt-Medium.ttf - Inter/static/Inter_28pt-SemiBold.ttf - Inter/static/Inter_28pt-Bold.ttf - Inter/static/Inter_28pt-ExtraBold.ttf - Inter/static/Inter_28pt-Black.ttf - Inter/static/Inter_18pt-ThinItalic.ttf - Inter/static/Inter_18pt-ExtraLightItalic.ttf - Inter/static/Inter_18pt-LightItalic.ttf - Inter/static/Inter_18pt-Italic.ttf - Inter/static/Inter_18pt-MediumItalic.ttf - Inter/static/Inter_18pt-SemiBoldItalic.ttf - Inter/static/Inter_18pt-BoldItalic.ttf - Inter/static/Inter_18pt-ExtraBoldItalic.ttf - Inter/static/Inter_18pt-BlackItalic.ttf - Inter/static/Inter_24pt-ThinItalic.ttf - Inter/static/Inter_24pt-ExtraLightItalic.ttf - Inter/static/Inter_24pt-LightItalic.ttf - Inter/static/Inter_24pt-Italic.ttf - Inter/static/Inter_24pt-MediumItalic.ttf - Inter/static/Inter_24pt-SemiBoldItalic.ttf - Inter/static/Inter_24pt-BoldItalic.ttf - Inter/static/Inter_24pt-ExtraBoldItalic.ttf - Inter/static/Inter_24pt-BlackItalic.ttf - Inter/static/Inter_28pt-ThinItalic.ttf - Inter/static/Inter_28pt-ExtraLightItalic.ttf - Inter/static/Inter_28pt-LightItalic.ttf - Inter/static/Inter_28pt-Italic.ttf - Inter/static/Inter_28pt-MediumItalic.ttf - Inter/static/Inter_28pt-SemiBoldItalic.ttf - Inter/static/Inter_28pt-BoldItalic.ttf - Inter/static/Inter_28pt-ExtraBoldItalic.ttf - Inter/static/Inter_28pt-BlackItalic.ttf - -Get started ------------ - -1. Install the font files you want to use - -2. Use your app's font picker to view the font family and all the -available styles - -Learn more about variable fonts -------------------------------- - - https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts - https://variablefonts.typenetwork.com - https://medium.com/variable-fonts - -In desktop apps - - https://theblog.adobe.com/can-variable-fonts-illustrator-cc - https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts - -Online - - https://developers.google.com/fonts/docs/getting_started - https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide - https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts - -Installing fonts - - MacOS: https://support.apple.com/en-us/HT201749 - Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux - Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows - -Android Apps - - https://developers.google.com/fonts/docs/android - https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts - -License -------- -Please read the full license text (OFL.txt) to understand the permissions, -restrictions and requirements for usage, redistribution, and modification. - -You can use them in your products & projects – print or digital, -commercial or otherwise. - -This isn't legal advice, please consider consulting a lawyer and see the full -license for all details. diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Black.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Black.ttf deleted file mode 100644 index 89673de..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Black.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-BlackItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-BlackItalic.ttf deleted file mode 100644 index b33602f..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-BlackItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Bold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Bold.ttf deleted file mode 100644 index 57704d1..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Bold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-BoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-BoldItalic.ttf deleted file mode 100644 index d53a199..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-BoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraBold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraBold.ttf deleted file mode 100644 index e71c601..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraBold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraBoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraBoldItalic.ttf deleted file mode 100644 index df45062..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraBoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraLight.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraLight.ttf deleted file mode 100644 index f9c6cfc..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraLight.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraLightItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraLightItalic.ttf deleted file mode 100644 index 275f305..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ExtraLightItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Italic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Italic.ttf deleted file mode 100644 index 14d3595..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Italic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Light.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Light.ttf deleted file mode 100644 index acae361..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Light.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-LightItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-LightItalic.ttf deleted file mode 100644 index f69e18b..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-LightItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Medium.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Medium.ttf deleted file mode 100644 index 71d9017..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Medium.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-MediumItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-MediumItalic.ttf deleted file mode 100644 index 5c8c8b1..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-MediumItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Regular.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Regular.ttf deleted file mode 100644 index ce097c8..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Regular.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-SemiBold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-SemiBold.ttf deleted file mode 100644 index 053185e..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-SemiBold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-SemiBoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-SemiBoldItalic.ttf deleted file mode 100644 index d9c9896..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-SemiBoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Thin.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Thin.ttf deleted file mode 100644 index e68ec47..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-Thin.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ThinItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ThinItalic.ttf deleted file mode 100644 index 134e837..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_18pt-ThinItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Black.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Black.ttf deleted file mode 100644 index dbb1b3b..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Black.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-BlackItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-BlackItalic.ttf deleted file mode 100644 index b89d61c..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-BlackItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Bold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Bold.ttf deleted file mode 100644 index e974d96..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Bold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-BoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-BoldItalic.ttf deleted file mode 100644 index 1c3d251..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-BoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraBold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraBold.ttf deleted file mode 100644 index b775c08..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraBold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraBoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraBoldItalic.ttf deleted file mode 100644 index 3461a92..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraBoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraLight.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraLight.ttf deleted file mode 100644 index 2ec6ca3..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraLight.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraLightItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraLightItalic.ttf deleted file mode 100644 index c634a5d..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ExtraLightItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Italic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Italic.ttf deleted file mode 100644 index 1048b07..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Italic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Light.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Light.ttf deleted file mode 100644 index 1a2a6f2..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Light.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-LightItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-LightItalic.ttf deleted file mode 100644 index ded5a75..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-LightItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Medium.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Medium.ttf deleted file mode 100644 index 5c88739..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Medium.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-MediumItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-MediumItalic.ttf deleted file mode 100644 index be091b1..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-MediumItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Regular.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Regular.ttf deleted file mode 100644 index 6b088a7..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Regular.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-SemiBold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-SemiBold.ttf deleted file mode 100644 index ceb8576..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-SemiBold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-SemiBoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-SemiBoldItalic.ttf deleted file mode 100644 index 6921df2..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-SemiBoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Thin.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Thin.ttf deleted file mode 100644 index 3505b35..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-Thin.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ThinItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ThinItalic.ttf deleted file mode 100644 index a3e6feb..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_24pt-ThinItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Black.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Black.ttf deleted file mode 100644 index 66a252f..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Black.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-BlackItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-BlackItalic.ttf deleted file mode 100644 index 3c8fdf9..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-BlackItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Bold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Bold.ttf deleted file mode 100644 index 14db994..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Bold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-BoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-BoldItalic.ttf deleted file mode 100644 index 704b12b..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-BoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraBold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraBold.ttf deleted file mode 100644 index 6d87cae..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraBold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraBoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraBoldItalic.ttf deleted file mode 100644 index 1a56735..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraBoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraLight.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraLight.ttf deleted file mode 100644 index d42b3f5..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraLight.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraLightItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraLightItalic.ttf deleted file mode 100644 index 90e2f20..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ExtraLightItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Italic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Italic.ttf deleted file mode 100644 index c2a143a..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Italic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Light.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Light.ttf deleted file mode 100644 index 5eeff3a..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Light.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-LightItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-LightItalic.ttf deleted file mode 100644 index 6b90b76..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-LightItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Medium.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Medium.ttf deleted file mode 100644 index 00120fe..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Medium.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-MediumItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-MediumItalic.ttf deleted file mode 100644 index 7481e7b..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-MediumItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Regular.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Regular.ttf deleted file mode 100644 index 855b6f4..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Regular.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-SemiBold.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-SemiBold.ttf deleted file mode 100644 index 8b84efc..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-SemiBold.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-SemiBoldItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-SemiBoldItalic.ttf deleted file mode 100644 index 2e22c5a..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-SemiBoldItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Thin.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Thin.ttf deleted file mode 100644 index 94e6108..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-Thin.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ThinItalic.ttf b/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ThinItalic.ttf deleted file mode 100644 index d3d44cd..0000000 Binary files a/referência/sistema-de-chamados-main/Inter,Manrope/Inter/static/Inter_28pt-ThinItalic.ttf and /dev/null differ diff --git a/referência/sistema-de-chamados-main/README.md b/referência/sistema-de-chamados-main/README.md deleted file mode 100644 index dc5db70..0000000 --- a/referência/sistema-de-chamados-main/README.md +++ /dev/null @@ -1,127 +0,0 @@ -## Sistema de Chamados - -Aplicação **Next.js 16 (App Router)** com **React 19**, **Convex** e **Better Auth** para gestão de tickets da Rever. A stack ainda inclui **Prisma 6** (SQLite padrão para DEV), **Tailwind** e **Turbopack** em desenvolvimento (o build de produção roda com o webpack padrão do Next). Todo o código-fonte fica na raiz do monorepo seguindo as convenções do App Router. - -## Requisitos - -- Bun >= 1.3 (recomendado 1.3.1). Após instalar via script oficial, adicione `export PATH="$HOME/.bun/bin:$PATH"` ao seu shell (ex.: `.bashrc`) para ter `bun` disponível globalmente. -- Node.js >= 20 (necessário para ferramentas auxiliares como Prisma CLI e Next.js em modo fallback). -- CLI do Convex (`bunx convex dev` instalará automaticamente no primeiro uso, se ainda não estiver presente). - -## Configuração rápida - -1. Instale as dependências: - ```bash - bun install - ``` -2. Ajuste o arquivo `.env` (ou crie a partir de `.env.example`) e confirme os valores de: - - `NEXT_PUBLIC_CONVEX_URL` (gerado pelo Convex Dev) - - `BETTER_AUTH_SECRET`, `BETTER_AUTH_URL`, `DATABASE_URL` (por padrão `file:./db.dev.sqlite`, que mapeia para `prisma/db.dev.sqlite`) -3. Aplique as migrações e gere o client Prisma: - ```bash - bunx prisma migrate deploy - bun run prisma:generate - ``` -4. Popule usuários padrão do Better Auth: - ```bash - bun run auth:seed - ``` - > Sempre que trocar de máquina ou quiser “zerar” o ambiente local, basta repetir os passos 3 e 4 com a mesma `DATABASE_URL`. - -### Resetar rapidamente o ambiente local - -1. Garanta que `DATABASE_URL` aponte para o arquivo desejado (ex.: `file:./db.dev.sqlite` para desenvolvimento, `file:./db.sqlite` em produção local). -2. Aplique as migrações no arquivo informado: - ```bash - DATABASE_URL=file:./db.dev.sqlite bunx prisma migrate deploy - ``` -3. Recrie/garanta as contas padrão de login: - ```bash - DATABASE_URL=file:./db.dev.sqlite bun run auth:seed - ``` -4. Suba o servidor normalmente com `bun run dev`. Esses três comandos bastam para reconstruir o ambiente sempre que trocar de computador. - -### Subir serviços locais - -- (Opcional) Para re-sincronizar manualmente as filas padrão, execute `bun run queues:ensure`. -- Em um terminal, rode o backend em tempo real do Convex com `bun run convex:dev:bun` (ou `bun run convex:dev` para o runtime Node). -- Em outro terminal, suba o frontend Next.js (Turpoback) com `bun run dev:bun` (`bun run dev:webpack` serve como fallback). -- Com o Convex rodando, acesse `http://localhost:3000/dev/seed` uma vez para popular dados de demonstração (tickets, usuários, comentários). - -> Se o CLI perguntar sobre configuração do projeto Convex, escolha criar um novo deployment local (opção padrão) e confirme. As credenciais são armazenadas em `.convex/` automaticamente. - -### Documentação -- Índice de docs: `docs/README.md` -- Operações (produção): `docs/OPERATIONS.md` (versão EN) e `docs/OPERACAO-PRODUCAO.md` (PT-BR) -- Guia de DEV: `docs/DEV.md` -- Testes automatizados (Vitest/Playwright): `docs/testes-vitest.md` -- Stack Swarm: `stack.yml` (roteado por Traefik, rede `traefik_public`). - -### Variáveis de ambiente - -- Exemplo na raiz: `.env.example` — copie para `.env` e preencha segredos. -- App Desktop: `apps/desktop/.env.example` — copie para `apps/desktop/.env` e ajuste `VITE_APP_URL`. -- Nunca faça commit de arquivos `.env` com valores reais (já ignorados em `.gitignore`). - -### Guia de DEV (Prisma, Auth e Desktop/Tauri) - -Para fluxos detalhados de desenvolvimento — banco de dados local (SQLite/Prisma), seed do Better Auth, ajustes do Prisma CLI no DEV e build do Desktop (Tauri) — consulte `docs/DEV.md`. - -## Scripts úteis - -- `bun run dev:bun` — padrão atual para o Next.js com runtime Bun (`bun run dev:webpack` permanece como fallback). -- `bun run convex:dev:bun` — runtime Bun para o Convex (`bun run convex:dev` mantém o fluxo antigo usando Node). -- `bun run build:bun` / `bun run start:bun` — build e serve com Bun; `bun run build` mantém o fallback Node. -- `bun run dev:webpack` — fallback do Next.js em modo desenvolvimento (webpack). -- `bun run lint` — ESLint com as regras do projeto. -- `bun test` — suíte de testes unitários usando o runner do Bun (o teste de screenshot fica automaticamente ignorado se o matcher não existir). -- `bun run build` — executa `next build --webpack` (webpack padrão do Next). -- `bun run build:turbopack` — executa `next build --turbopack` para reproduzir/debugar problemas. -- `bun run auth:seed` — atualiza/cria contas padrão do Better Auth (credenciais em `agents.md`). -- `bunx prisma migrate deploy` — aplica migrações ao banco SQLite local. -- `bun run convex:dev` — roda o Convex em modo desenvolvimento com Node, gerando tipos em `convex/_generated`. - -## Transferir dispositivo entre colaboradores - -Quando uma dispositivo trocar de responsável: - -1. Abra `Admin > Dispositivos`, selecione o equipamento e clique em **Resetar agente**. -2. No equipamento, execute o reset local do agente (`rever-agent reset` ou reinstale o serviço) e reprovisione com o código da empresa. -3. Após o agente gerar um novo token, associe a dispositivo ao novo colaborador no painel. - -Sem o reset de agente, o Convex reaproveita o token anterior e o inventário continua vinculado ao usuário antigo. - -## Estrutura principal - -- `app/` dentro de `src/` — rotas e layouts do Next.js (App Router). -- `components/` — componentes reutilizáveis (UI, formulários, layouts). -- `convex/` — queries, mutations e seeds do Convex. -- `prisma/` — schema, migrações e banco SQLite (`prisma/db.sqlite`). -- `scripts/` — utilitários em Node para sincronização e seeds adicionais. -- `agents.md` — guia operacional e contexto funcional (em PT-BR). -- `PROXIMOS_PASSOS.md` — backlog de melhorias futuras. - -## Credenciais de demonstração - -Após executar `bun run auth:seed`, as credenciais padrão ficam disponíveis conforme descrito em `agents.md` (seção “Credenciais padrão”). Ajuste variáveis `SEED_USER_*` se precisar sobrepor usuários ou senhas durante o seed. - -## Próximos passos - -Consulte `PROXIMOS_PASSOS.md` para acompanhar o backlog funcional e o progresso das iniciativas planejadas. - -### Executar com Bun - -- `bun install` é o fluxo padrão (o arquivo `bun.lock` deve ser versionado; use `bun install --frozen-lockfile` em CI). -- `bun run dev:bun`, `bun run convex:dev:bun`, `bun run build:bun` e `bun run start:bun` já estão configurados; internamente executam `bun run --bun - -
- - -