Skip to content

AI-Powered Book Production Engine - Transform manuscripts into professionally typeset books in minutes. Combines classical typography (Van de Graaf Canon, Knuth-Plass algorithm) with modern AI (GPT-4, Claude) for automated book design and layout.

License

Notifications You must be signed in to change notification settings

JuanCS-Dev/typecraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

88 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

╔═════════════════════════════════════════════════════════════════════════════════╗
β•‘                                                                                 β•‘
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β•‘
β•‘   β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•   β•‘
β•‘      β–ˆβ–ˆβ•‘    β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—     β–ˆβ–ˆβ•‘      β•‘
β•‘      β–ˆβ–ˆβ•‘     β•šβ–ˆβ–ˆβ•”β•  β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•     β–ˆβ–ˆβ•‘      β•‘
β•‘      β–ˆβ–ˆβ•‘      β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘        β–ˆβ–ˆβ•‘      β•‘
β•‘      β•šβ•β•      β•šβ•β•   β•šβ•β•     β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•šβ•β•        β•šβ•β•      β•‘
β•‘                                                                                 β•‘
β•‘                        AI-Powered Book Production Engine                        β•‘
β•‘                              by JuanCS-DEV & Claude                             β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

Transform manuscripts into professionally typeset books in minutes, not weeks.

Go Version Next.js License Version Status

πŸ”— Live: seuredator.com.br | πŸ“š Docs: ARCHITECTURE.md | πŸ—ΊοΈ Roadmap: UPGRADE_HEROICO_PLAN.md


🎯 O Problema

Publicar um livro profissionalmente formatado hoje requer:

  • R$ 1.500-3.000 em serviΓ§os de design e diagramaΓ§Γ£o
  • 2-4 semanas de tempo de produΓ§Γ£o
  • Expertise tΓ©cnica em ferramentas como InDesign ou LaTeX
  • MΓΊltiplos profissionais: editores, designers, diagramadores

✨ Nossa Solução

TypeCraft Γ© um sistema inteligente de produΓ§Γ£o editorial que combina sΓ©culos de sabedoria tipogrΓ‘fica com IA de ponta para transformar manuscritos em livros prontos para publicaΓ§Γ£o automaticamente.

πŸ“„ manuscrito.docx  β†’  πŸ€– AnΓ‘lise IA  β†’  πŸ“š livro-profissional.pdf
                           5 minutos         Pronto para impressΓ£o

O Que Torna TypeCraft Diferente

  • 🧠 Design Consciente do ConteΓΊdo: IA analisa gΓͺnero, tom e complexidade para decisΓ΅es contextuais
  • 🎨 GeraΓ§Γ£o AutomΓ‘tica de Capas: Stable Diffusion XL para capas profissionais em segundos
  • πŸ“ Tipografia Profissional: Kerning Γ³ptico, ligaduras, variable fonts
  • πŸ“š Layouts Adaptativos: De romances simples a livros de arte complexos
  • πŸ”¬ Suite CientΓ­fica: CitaΓ§Γ΅es (ABNT/APA/Chicago), renderizaΓ§Γ£o de fΓ³rmulas matemΓ‘ticas
  • βœ… QA por IA: Detecta viΓΊvas, Γ³rfΓ£s, rios, erros gramaticais
  • πŸš€ Marketing Integrado: GeraΓ§Γ£o de trailers, assets para redes sociais, otimizaΓ§Γ£o Amazon KDP

πŸš€ Quick Start

PrΓ©-requisitos

  • Go 1.24+
  • Node.js 18+
  • PostgreSQL 14+
  • Redis 7+ (opcional, para cache)
  • Docker (recomendado)

InstalaΓ§Γ£o RΓ‘pida

# Clone o repositΓ³rio
git clone https://github.com/JuanCS-Dev/typecraft.git
cd typecraft

# Backend (Go)
cd backend
cp .env.example .env
# Configure suas variΓ‘veis de ambiente (ver abaixo)
go mod download
go build -o typecraft-api ./cmd/api
./typecraft-api

# Frontend (Next.js)
cd ../web
cp .env.example .env.local
npm install
npm run dev

Acesse: http://localhost:3000

VariΓ‘veis de Ambiente Essenciais

Backend (.env):

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/typecraft

# Redis (opcional)
REDIS_URL=redis://localhost:6379

# AI APIs
REPLICATE_API_TOKEN=r8_xxx...  # Para geraΓ§Γ£o de capas
OPENAI_API_KEY=sk-xxx...       # Para anΓ‘lise de conteΓΊdo e QA

# Server
API_PORT=8080
GIN_MODE=release

Frontend (.env.local):

# API Backend
NEXT_PUBLIC_API_URL=http://localhost:8080/api/v1
NEXT_PUBLIC_API_WS_URL=ws://localhost:8080/ws

# Auth
NEXTAUTH_SECRET=your-secret-here
NEXTAUTH_URL=http://localhost:3000

# Stripe (opcional)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_xxx...

Deploy com Docker

# Build e inicie todos os serviΓ§os
docker-compose up -d

# Logs
docker-compose logs -f

# Parar
docker-compose down

πŸ“¦ Funcionalidades

βœ… v1.0 - FundaΓ§Γ£o (Atual)

Core Engine

  • Upload de manuscritos (DOCX, PDF, Markdown, ODT)
  • AnΓ‘lise de conteΓΊdo com GPT-4
  • DetecΓ§Γ£o automΓ‘tica de gΓͺnero e estrutura
  • FormataΓ§Γ£o ABNT (TCC, Monografias, DissertaΓ§Γ΅es)
  • Export PDF com qualidade de impressΓ£o
  • Sistema de projetos e versionamento
  • Cache inteligente (Redis)
  • Queue system para processamento assΓ­ncrono
  • Health checks e monitoramento

AI Creative Suite (MΓ³dulo 1) πŸ†•

  • Cover Generator: GeraΓ§Γ£o de capas com Stable Diffusion XL
    • Suporte a mΓΊltiplos estilos (photorealistic, illustration, abstract, etc.)
    • Mood customizΓ‘vel (dark, vibrant, minimal, baroque)
    • Output RGB (digital) + CMYK (impressΓ£o)
    • ResoluΓ§Γ£o 300 DPI para impressΓ£o profissional
  • Typography AI: RecomendaΓ§Γ£o inteligente de fontes
    • Font pairing automΓ‘tico
    • Baseado em gΓͺnero e mood do livro
    • Google Fonts integration
  • Layout Suggester: SugestΓ£o de layouts por IA
    • Grids adaptativos (manuscript, column, modular)
    • Baseado em tipo de livro e conteΓΊdo

Frontend (Next.js 16 + React 19)

  • Dashboard de projetos
  • Editor visual de documentos
  • Preview em tempo real
  • Sistema de autenticaΓ§Γ£o (NextAuth.js)
  • Planos e pagamentos (Stripe)
  • SEO otimizado (Schema.org, Open Graph)
  • Performance (Lighthouse 90+)
  • Acessibilidade (WCAG 2.1 AA)

🚧 v2.0 - Upgrade Heroico (Roadmap)

Veja o plano detalhado em UPGRADE_HEROICO_PLAN.md

MΓ³dulo 2: Typography Engine (Sprint 1-4)

  • Harfbuzz/FreeType integration
  • Optical kerning (estilo InDesign)
  • Variable fonts manager
  • Baseline grids
  • Advanced ligatures

MΓ³dulo 3: Layout Systems (Sprint 3-4)

  • Paged.js integration
  • Knuth-Plass line breaking
  • Swiss/Material Design grids
  • Automatic widow/orphan prevention
  • PDF/X-1a generation

MΓ³dulo 4: Art Book Toolkit (Sprint 5)

  • RGB β†’ CMYK conversion (ImageMagick + ICC profiles)
  • Image optimization
  • 3D mockup generation (Blender)
  • Complex grid systems
  • Bleed and crop marks

MΓ³dulo 5: Scientific Publishing Suite (Sprint 5)

  • Citation manager (ABNT, APA, Chicago, Vancouver)
  • BibTeX/CSL support
  • Math rendering (KaTeX/MathJax)
  • Data visualization (D3.js)
  • Cross-referencing

MΓ³dulo 6: Marketing Automation (Sprint 6)

  • Book trailer generation (FFmpeg)
  • Social media assets (Instagram, Twitter, Facebook)
  • Amazon KDP optimizer
  • Keyword research
  • Pricing optimizer

MΓ³dulo 7: QA by AI (Sprint 6)

  • Typography QA (widows, orphans, rivers, hyphens)
  • Content QA (grammar, consistency) via GPT-4
  • Print QA (PDF/X-1a validation, resolution, color space)
  • Automated quality reports

πŸ—οΈ Arquitetura

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     USER INTERFACE                         β”‚
β”‚              Next.js 16 + React 19 (Vercel)               β”‚
β”‚                                                            β”‚
β”‚  Dashboard β†’ Editor β†’ AI Creative Suite β†’ Export          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚ HTTPS / WebSocket
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    TYPECRAFT API                           β”‚
β”‚                 Go 1.24 (Cloud Run)                        β”‚
β”‚                                                            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚  β”‚ Module 1 β”‚  β”‚ Module 2 β”‚  β”‚ Module 3 β”‚               β”‚
β”‚  β”‚ AI Suite β”‚  β”‚Typographyβ”‚  β”‚  Layout  β”‚               β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   DATA LAYER                               β”‚
β”‚  PostgreSQL (Supabase) + Redis + Storage (GCS)            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
                         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                 EXTERNAL SERVICES                          β”‚
β”‚  Replicate β€’ OpenAI β€’ Google Fonts β€’ Crossref β€’ Amazon   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Backend:

  • Language: Go 1.24
  • Framework: Gin (HTTP router)
  • Database: PostgreSQL 14+ (Supabase)
  • Cache: Redis 7
  • Storage: Google Cloud Storage
  • AI APIs: Replicate (Stable Diffusion), OpenAI (GPT-4)
  • Image Processing: ImageMagick, disintegration/imaging

Frontend:

  • Framework: Next.js 16 (App Router)
  • UI Library: React 19
  • Styling: Tailwind CSS + CVA
  • State Management: TanStack Query
  • Auth: NextAuth.js
  • Payments: Stripe
  • Forms: React Hook Form + Zod

Infrastructure:

  • Backend Deploy: Google Cloud Run
  • Frontend Deploy: Vercel
  • DNS: Cloudflare
  • CI/CD: GitHub Actions
  • Monitoring: Cloud Logging + Sentry

Veja ARCHITECTURE.md para detalhes completos.


πŸ“Š Performance

Benchmarks (v1.0)

OperaΓ§Γ£o Tempo (p95) Status
Upload manuscrito (100 pΓ‘ginas) < 5s βœ…
AnΓ‘lise IA (GPT-4) < 15s βœ…
FormataΓ§Γ£o ABNT < 10s βœ…
GeraΓ§Γ£o de capa (Stable Diffusion) < 30s βœ…
Export PDF (300 pÑginas) < 60s 🚧
Total (manuscrito β†’ PDF pronto) < 2 min βœ…

Qualidade

  • Lighthouse Score: 92/100 (Performance), 100/100 (Accessibility)
  • Core Web Vitals: All Green
  • Uptime: 99.9%
  • Error Rate: < 0.1%

πŸ—ΊοΈ Roadmap

Q1 2025 (Atual)

  • v1.0 Release
  • MΓ³dulo 1: AI Creative Suite (backend)
  • MΓ³dulo 1: AI Creative Suite (frontend)
  • DocumentaΓ§Γ£o completa
  • Testes E2E (Playwright)

Q2 2025

  • MΓ³dulo 2: Typography Engine
  • MΓ³dulo 3: Layout Systems
  • Public Beta
  • Performance optimization

Q3 2025

  • MΓ³dulo 4: Art Book Toolkit
  • MΓ³dulo 5: Scientific Publishing Suite
  • InternacionalizaΓ§Γ£o (EN, ES)

Q4 2025

  • MΓ³dulo 6: Marketing Automation
  • MΓ³dulo 7: QA by AI
  • v2.0 Release
  • Mobile apps (React Native)

Veja o plano detalhado de 14 semanas em UPGRADE_HEROICO_PLAN.md.


πŸ“š DocumentaΓ§Γ£o

Para Desenvolvedores

Para UsuΓ‘rios

  • Website: seuredator.com.br
  • Blog: Em breve
  • YouTube: Tutoriais em vΓ­deo (em breve)

🀝 Contribuindo

ContribuiΓ§Γ΅es sΓ£o muito bem-vindas!

Como Contribuir

  1. Fork o repositΓ³rio
  2. Crie uma branch para sua feature (git checkout -b feat/nova-funcionalidade)
  3. Commit suas mudanΓ§as (git commit -m 'feat: adiciona nova funcionalidade')
  4. Push para a branch (git push origin feat/nova-funcionalidade)
  5. Abra um Pull Request

Guia de Estilo

  • Go: gofmt, golint
  • TypeScript: ESLint, Prettier
  • Commits: Conventional Commits
  • DocumentaΓ§Γ£o: Markdown com exemplos de cΓ³digo

Áreas que Precisam de Ajuda

  • ImplementaΓ§Γ£o de novos formatos de export (EPUB, MOBI)
  • Templates de design adicionais
  • TraduΓ§Γ£o para outros idiomas
  • Testes E2E
  • DocumentaΓ§Γ£o de usuΓ‘rio
  • Exemplos de integraΓ§Γ£o

πŸ“„ LicenΓ§a

Este projeto estΓ‘ licenciado sob a licenΓ§a MIT - veja LICENSE para detalhes.


πŸ™ Agradecimentos

  • OpenAI - GPT-4 para anΓ‘lise de conteΓΊdo
  • Stability AI - Stable Diffusion XL para geraΓ§Γ£o de capas
  • Google Fonts - Biblioteca de fontes open-source
  • Vercel - Hospedagem frontend
  • Supabase - Backend-as-a-Service
  • Comunidade Open Source - Pelas ferramentas incrΓ­veis

CitaΓ§Γ£o Especial

"Este projeto foi desenvolvido em parceria com IA (Claude), demonstrando o poder da colaboraΓ§Γ£o humano-IA na criaΓ§Γ£o de software complexo. Toda decisΓ£o arquitetural e linha de cΓ³digo foi revisada e aprovada por humanos."


πŸ“ž Contato


🌟 Star History

Se este projeto te ajudou, considere dar uma ⭐!

Star History Chart


Feito com ❀️ e β˜• por JuanCS-DEV

Powered by AI (Claude) & Em Nome de Jesus

⬆️ Voltar ao topo

About

AI-Powered Book Production Engine - Transform manuscripts into professionally typeset books in minutes. Combines classical typography (Van de Graaf Canon, Knuth-Plass algorithm) with modern AI (GPT-4, Claude) for automated book design and layout.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •