Making classic literature absolutely bussin' for Gen Z, no cap fr fr
Brainrot Publishing House creates hilarious Gen Z "brainrot" translations of classic literature. We're talking Shakespeare but make it TikTok. Fitzgerald but make it Discord. Homer but make it Twitch chat.
This monorepo contains:
- Web App: Next.js reading platform at brainrotpublishing.com
- Translations: The actual book translations (our crown jewels)
- Publisher: Automated publishing to Amazon KDP, Lulu, and more
- Converter: Tools to transform content for different platforms
BEFORE TRANSLATING ANY CONTENT, READ THIS:
Our translations follow "maximalist gremlin mode" - a specific, documented methodology that ALL contributors must follow:
π MANDATORY READING: TRANSLATION_GUIDELINES.md (1000+ lines of detailed methodology)
- all lowercase formatting (no capitals except emphasis)
- 3-5+ brainrot terms per sentence MINIMUM
- 400+ term vocabulary including: skibidi, gyatt, rizz, fr fr ong, no cap, lowkey, etc.
- Character voice mapping - each character gets 3-5 signature terms
- Systematic slur replacement - NEVER reproduce historical slurs
- 1,600+ core term occurrences per book target
Original: "I went down yesterday to the Piraeus with Glaucon..."
Brainrot: "so yesterday i was heading down to the piraeus with my boy glaucon (ariston's son) to check out this new festival for the goddess bendis - basically the thracian version of artemis. had to pay my respects and all that, plus i was lowkey curious about how they'd throw down for this thing since it was literally the first time."
brainrot/
βββ apps/
β βββ web/ # Next.js 15 web application
β βββ publisher/ # CLI for KDP, Lulu, IngramSpark
βββ content/
β βββ translations/
β βββ books/ # All book translations
β βββ great-gatsby/ # Each book has brainrot/ and metadata.yaml
β βββ the-iliad/
β βββ [8 more books]
βββ packages/
β βββ @brainrot/types/ # Shared TypeScript interfaces
β βββ @brainrot/converter/ # Markdown β Text/EPUB/PDF/Kindle
β βββ @brainrot/metadata/ # YAML parsing, ISBN validation
β βββ @brainrot/templates/ # LaTeX/EPUB/Kindle templates
βββ scripts/
β βββ generate-formats.ts # Convert books to all formats
β βββ sync-translations.ts # Publish generated text to Spaces
βββ turbo.json # Turborepo configuration
# Required versions
node >= 22.0.0
pnpm >= 8.15.1
# Clone the monorepo
git clone https://github.com/misty-step/brainrot.git
cd brainrot# Install all dependencies
pnpm install
# Start everything in dev mode
pnpm dev
# Or just the web app
pnpm dev --filter=@brainrot/web
# Build everything (super fast with Turborepo!)
pnpm build
# Run tests
pnpm test- β‘ Lightning fast builds - Turborepo caches everything (174ms rebuilds!)
- π¦ Shared packages - Reusable code across all apps
- π Unified pipeline - One command to rule them all
- π― Selective execution - Work on just what you need
- π Type safety - TypeScript types shared everywhere
- The Great Gatsby - "back when i was a lil sus beta and way more vulnerable to getting absolutely ratio'd by life"
- The Iliad - "greek drama hits different when paris catches feelings"
- The Odyssey - "odysseus speed-running his way home while poseidon stays pressed"
- The Aeneid - "aeneas carries his dad out of troy like a true sigma"
- Alice in Wonderland - "alice falls down the most unhinged discord server"
- Frankenstein - "victor creates life then ghosts harder than your crush"
- Declaration of Independence - "the colonies said 'we're breaking up with u britain'"
- Simple Sabotage Field Manual - "how to troll your workplace (CIA approved)"
- La Divina Comedia - Complex 3-part structure needs special handling
- Tao Te Ching - Source text ready, translation pending
- Pride and Prejudice
- Hamlet
- Romeo and Juliet
- Paradise Lost
- And 100+ more classics
- Monorepo: Turborepo + pnpm workspaces
- Web: Next.js 16 + React 19 + TypeScript
- Styling: Tailwind CSS + Radix UI
- Storage: DigitalOcean Spaces
- Publishing: Playwright (KDP) + Axios (Lulu API)
- Testing: Vitest + React Testing Library
- CI/CD: GitHub Actions + DigitalOcean App Platform
# Development
pnpm dev # Start all apps in dev mode
pnpm dev --filter=@brainrot/web # Web app only
pnpm build # Build everything (174ms with cache!)
pnpm lint # Lint all packages
# Testing (Powered by Vitest)
pnpm test # Run tests in watch mode
pnpm test:run # Run tests once (CI mode)
pnpm test:ui # Open Vitest UI for interactive testing
pnpm test:coverage # Generate coverage report
pnpm test:watch # Alias for pnpm test
# Content Pipeline
pnpm generate:formats book [book] # Convert one book to release formats
pnpm generate:formats all # Process all books
pnpm sync:spaces book [book] # Publish one generated book to Spaces
pnpm sync:spaces all # Publish all generated books
# Publishing
pnpm publisher list # List available books
pnpm publisher validate [book] # Pre-flight checks
pnpm publisher publish [book] --platform=lulu # Publish to Lulu
pnpm publisher publish [book] --platform=kdp # Publish to Amazon
pnpm publisher publish-all [book] # All platforms
# Utilities
pnpm vault:pull # Get latest secretsThis project uses dotenv-vault for secure secret sharing:
# First time setup
pnpm vault:login # Login to dotenv-vault
pnpm vault:pull # Pull encrypted secrets
# Daily workflow
pnpm vault:pull # Get latest secrets
pnpm vault:push # Share your changesManual setup (if not using vault):
- Copy
.env.exampleto.env.local - Set
NEXT_PUBLIC_SPACES_BASE_URLto the authoritative DigitalOcean Spaces bucket - Add Spaces credentials only for asset publishing or migration operations
- Add
LULU_API_KEY- For print publishing - Add
KDP_EMAIL/PASSWORD- For Amazon publishing
See docs/DOTENV_VAULT_SETUP.md for complete setup guide.
Protect your secrets with our multi-layer security:
# Install Git hooks for local secret scanning
./scripts/setup-git-hooks.sh
# (Optional) Install gitleaks for enhanced scanning
brew install gitleaks
# Run manual security scan
gitleaks detect --source . -vSecurity Features:
- Pre-commit hooks - Prevents accidental secret commits
- GitHub secret scanning - Monitors pushed code
- Custom patterns - Detects service-specific tokens
- Gitleaks integration - Advanced local scanning
See docs/SECRETS.md for rotation procedures.
We use Vitest for blazing-fast unit and integration testing:
- 5-10x faster than Jest
- Native ESM support - No transforms needed
- HMR for tests - Tests re-run instantly on save
- Compatible API - Drop-in Jest replacement
- Built-in coverage - Via c8/v8
# Interactive watch mode (recommended for development)
pnpm test
# Run all tests once
pnpm test:run
# Open Vitest UI - beautiful interface for test exploration
pnpm test:ui
# Generate coverage report
pnpm test:coverage
# Test specific packages
pnpm test --filter=@brainrot/converter
pnpm test --filter=@brainrot/web
# Run specific test files
pnpm test -- download.test.ts
pnpm test -- --grep="security"We maintain 85%+ coverage across all packages:
# Check coverage
pnpm test:coverage
# Coverage thresholds (enforced in CI)
# - Branches: 85%
# - Functions: 85%
# - Lines: 85%
# - Statements: 85%We recently migrated from Jest to Vitest. Key changes:
// Old (Jest)
import { jest } from "@jest/globals";
const mockFn = jest.fn();
jest.mock("./module");
// New (Vitest)
import { vi } from "vitest";
const mockFn = vi.fn();
vi.mock("./module");Migration benefits:
- Test execution: ~50s β ~5s (10x speedup)
- No more
ts-jestconfiguration - Better TypeScript support out of the box
- Simpler configuration (single
vitest.config.ts)
For migration details, see our migration guide.
We maintain a minimalist script structure focused on essential development tasks. We reduced from 74 scripts to just 7 core scripts in the web app, removing all one-time migration and utility scripts.
# The Magnificent Seven - Everything you actually need
pnpm dev # Start dev server with Turbopack (blazing fast HMR)
pnpm build # Production build with Next.js optimizations
pnpm test # Run tests in watch mode with Vitest
pnpm lint # ESLint with Next.js rules
pnpm format # Prettier auto-formatting
pnpm typecheck # TypeScript type checking
pnpm prettier:fix # Direct Prettier command (alias for format)# Core Development
pnpm dev # Start all apps in dev mode (Turborepo)
pnpm build # Build all packages (cached, ~13s)
pnpm lint # Lint all packages
pnpm typecheck # Type check everything
pnpm clean # Nuclear option - clear all caches
# Testing Suite
pnpm test # Interactive watch mode
pnpm test:run # Single run (CI mode)
pnpm test:ui # Beautiful Vitest UI
pnpm test:coverage # Coverage report
# Content & Publishing
pnpm generate:formats book [book] # Convert one book
pnpm sync:spaces book [book] # Publish one generated book to SpacesWe archived 67 legacy scripts that were:
- Migration scripts (45): One-time data migrations now complete
- Audit/verify scripts (15): Replaced with automated tests
- Standardization scripts (10): Data is now standardized
- Utility scripts (7): Either automated or rarely needed
Why remove them?
- Clarity: New developers see only what matters
- Maintenance: Less scripts = less confusion
- Speed: Faster package.json parsing
- Focus: Essential workflows are obvious
Legacy scripts are preserved in /tools/legacy-scripts/ for historical reference:
# If you need migration scripts for reference
ls tools/legacy-scripts/
# Each script has documentation
cat tools/legacy-scripts/README.mdImportant: These scripts are archived, not deleted. They serve as:
- Historical record of migrations performed
- Reference for future similar tasks
- Documentation of data transformation logic
- Learning resource for complex operations
Before adding a new script, ask:
- Is it used daily? β Add to package.json
- Is it a one-time task? β Run with
tsxdirectly - Is it rarely used? β Document in README, don't add script
- Is it project-specific? β Add to that package only
# For one-time or rare tasks, just use tsx directly
tsx scripts/some-utility.ts
# Or with Node
node --loader tsx scripts/analyze-something.tsgraph LR
A[Markdown Translation] --> B[Converter Package]
B --> C[Plain Text<br/>for Web]
B --> D[EPUB<br/>for E-readers]
B --> E[PDF<br/>for Print]
B --> F[MOBI<br/>for Kindle]
C --> G[DigitalOcean Spaces]
G --> H[Web App]
D --> I[Apple Books]
E --> J[Lulu Print]
F --> K[Amazon KDP]
- Web: DigitalOcean App Platform + Spaces (automatic)
- Amazon KDP: Kindle + Paperback (semi-automated)
- Lulu: Print-on-demand (API automated)
- IngramSpark: Bookstores (manual)
- Apple Books: Coming soon
- Google Play: Coming soon
We believe classic literature should be:
- Accessible - No more "thou" and "forsooth"
- Entertaining - Actual laugh-out-loud moments
- Relevant - References that make sense today
- Respectful - The stories remain intact
- Educational - Still learning, just more fun
This is currently a private project, but we're considering open-sourcing the translation tools. Stay tuned!
The translations are original creative works. Classic source texts are public domain.
- Web App: www.brainrotpublishing.com
- GitHub: github.com/misty-step/brainrot
- Discord: Coming soon
- TikTok: @brainrotpublishing (coming soon)
This monorepo was successfully migrated from two repositories with full git history preserved:
- β
brainrot-publishing-houseβapps/web/ - β
brainrot-translationsβcontent/translations/
Old repositories have been archived with deprecation notices.
Great Gatsby not loading? β This has been fixed! All books are pre-processed and uploaded.
App Platform deployment failing?
Run pnpm ci:required locally, then inspect the current DigitalOcean deployment
log. The production branch is the deployment authority; no repo workflow
deploys a second copy.
Make sure you have:
- Node.js >= 22.0.0
- pnpm >= 8.15.1
- All environment variables set
We use subtree merge to preserve history. If you need to trace back:
git log --follow apps/web/[file]
git log --follow content/translations/[file]- Create monorepo structure with Turborepo
- Migrate repositories with git subtree
- Set up 4 shared packages
- Fix Great Gatsby (blob simplification: 1000 lines β 37 lines)
- Lulu API integration with OAuth2
- KDP automation with Playwright
- Batch processing for all books
- Mock mode for testing
- Deploy to DigitalOcean App Platform β
- Test publishing pipeline with real credentials
- Launch first 10 books on all platforms
- Set up analytics and monitoring
- 50 books translated
- AI-assisted translation tools
- Subscription service
- Mobile apps
- 500+ books
- International versions
- Educational partnerships
- Physical bookstore presence
"We're not just translating books, we're translating culture. Shakespeare would've loved TikTok, and we're here to prove it."
The Brainrot Publishing House Team Making Literature Absolutely Bussin' Since 2024