Sync project with Nintendo Swith and PSN
  • TypeScript 93.5%
  • Shell 2.9%
  • Makefile 1.3%
  • JavaScript 1.2%
  • Dockerfile 1.1%
Find a file
Jonatas Oliveira 08e5c54e78
All checks were successful
ci/woodpecker/push/woodpecker/1 Pipeline was successful
ci/woodpecker/push/woodpecker/2 Pipeline was successful
test: add coverage tests
2026-05-16 15:22:03 +02:00
.githooks fix: corrige TS2742 e copia .npmrc no Dockerfile 2026-04-15 07:26:31 +02:00
docs feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
src test: add coverage tests 2026-05-16 15:22:03 +02:00
tests test: add coverage tests 2026-05-16 15:22:03 +02:00
.env.example feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
.eslintrc.cjs fix(sync): add tsconfig.eslint.json to fix lint scope for test files 2026-05-11 18:14:43 +02:00
.gitignore fix: corrige TS2742 e copia .npmrc no Dockerfile 2026-04-15 07:26:31 +02:00
.mocharc.json fix: corrige TS2742 e copia .npmrc no Dockerfile 2026-04-15 07:26:31 +02:00
.npmrc feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
.nvmrc build: fix error audit lib 2026-05-08 13:56:18 +02:00
.prettierrc feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
.woodpecker.yml fix(ci): use from_secret syntax for docker-build secrets 2026-05-08 15:10:04 +02:00
app.yaml feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
CHANGELOG.md feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
docker-compose.yml feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
Dockerfile fix: corrige TS2742 e copia .npmrc no Dockerfile 2026-04-15 07:26:31 +02:00
DOKKU.md feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
eslint.config.mjs test: add coverage tests 2026-05-16 15:22:03 +02:00
Makefile feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
package.json test: add coverage tests 2026-05-16 15:22:03 +02:00
pnpm-lock.yaml test: add coverage tests 2026-05-16 15:22:03 +02:00
Procfile feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
README.md feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
setup.sh feat: add sync psn and nso 2026-04-13 11:37:58 +02:00
tsconfig.eslint.json fix(sync): add tsconfig.eslint.json to fix lint scope for test files 2026-05-11 18:14:43 +02:00
tsconfig.json test: add coverage tests 2026-05-16 15:22:03 +02:00

PixieLog Sync Service

Serviço de sincronização de plataformas de jogos (PSN e Nintendo Switch Online) via contas de serviço (bots).

Arquitetura

Este serviço implementa uma arquitetura de "service accounts" para integração com plataformas fechadas:

  1. PSN (PlayStation Network): Usa NPSSO token para autenticação de conta bot
  2. Nintendo Switch Online: Usa Friend Code + verificação via nickname

Requisitos

  • Node.js >= 20.0.0
  • Redis >= 7.0
  • npm >= 10.0.0

Instalação

# Usar a versão correta do Node.js (via nvm)
nvm use

# Instalar dependências
npm install

# Configurar variáveis de ambiente
cp .env.example .env
# Editar .env com suas configurações

# Executar em desenvolvimento
npm run dev

# Executar testes
npm test

# Build para produção
npm run build
npm start

Scripts Disponíveis

  • npm run dev - Executar em modo desenvolvimento com hot-reload
  • npm run build - Compilar TypeScript
  • npm start - Iniciar em modo produção
  • npm test - Executar testes
  • npm run test:watch - Executar testes em watch mode
  • npm run test:coverage - Executar testes com coverage
  • npm run lint - Verificar linting
  • npm run lint:fix - Corrigir problemas de linting
  • npm run format - Formatar código
  • npm run format:check - Verificar formatação
  • npm run audit - Verificar vulnerabilidades
  • npm run typecheck - Verificar tipos TypeScript

CI/CD (Woodpecker)

O pipeline executa automaticamente:

  1. Instalação de dependências
  2. Type checking
  3. Linting
  4. Formatação
  5. Security audit
  6. Testes
  7. Coverage
  8. Build
  9. Docker build (apenas na branch main)

Variáveis de Ambiente

Variável Descrição Obrigatório
NODE_ENV Ambiente (development/production) Sim
PORT Porta do servidor Não (default: 3000)
LOG_LEVEL Nível de log (debug/info/warn/error) Não (default: info)
REDIS_URL URL do Redis Sim
API_BASE_URL URL base da API PixieLog Sim
PSN_NPSSO_TOKEN Token NPSSO para conta PSN bot Não (para PSN)
NINTENDO_SESSION_TOKEN Token de sessão Nintendo Não (para Nintendo)
IMINK_API_KEY Chave API do serviço imink Não (para Nintendo)
VERIFICATION_CODE_EXPIRY Expiração do código de verificação (min) Não (default: 30)

Licença

MIT