Skip to content

Reescreve o backend integralmente em Go e remove a base Django#2

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-backend-in-go
Draft

Reescreve o backend integralmente em Go e remove a base Django#2
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-backend-in-go

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 16, 2026

O requisito pedia uma reescrita completa do backend para Go, sem manter compatibilidade com Django. Esta PR substitui integralmente a implementação Python/Django por um serviço HTTP em Go com cobertura das rotas centrais do domínio.

  • Reescrita de arquitetura

    • Remove a aplicação Django (apps, models, migrations, settings, manage.py, dependências Python).
    • Introduz novo backend Go com entrypoint em cmd/server/main.go.
    • Define módulo Go (go.mod) e estrutura por camadas em internal/.
  • Superfície de API em Go

    • Implementa roteamento HTTP para recursos principais:
      • manhwas, chapters, images, comments, notifications
    • Mantém endpoints funcionais de apoio:
      • wrapper, auth/register, auth/login, auth/me, auth/discord
      • favoritos (/favorites, /manhwas/{id}/favorite, /manhwas/{id}/is-favorite)
    • Disponibiliza endpoints de documentação/schema como placeholders:
      • /api/schema/, /api/swagger/, /api/redoc/
  • Modelo de dados e estado

    • Implementa store em memória thread-safe (sync.RWMutex) para entidades e sessões.
    • Define modelos de domínio em Go (Manhwa, Chapter, ImageVariant, Comment, Notification, User).
  • Documentação do projeto

    • Atualiza README.md para setup/execução/testes do backend Go.
    • Ajusta .gitignore para artefatos de build/test de Go.

Exemplo representativo da nova estrutura de entrada:

func main() {
	store := app.NewStore()
	router := api.NewRouter(store)

	port := os.Getenv("PORT")
	if port == "" {
		port = "8080"
	}

	log.Fatal(http.ListenAndServe(":"+port, router))
}

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Refactor entire backend in Go Clarify GO rewrite scope and document current backend gap Mar 16, 2026
Copilot AI requested a review from SMCodesP March 16, 2026 17:35
Co-authored-by: SMCodesP <62559740+SMCodesP@users.noreply.github.com>
Copilot AI changed the title Clarify GO rewrite scope and document current backend gap Reescreve o backend integralmente em Go e remove a base Django Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants