Skip to content

that-in-rust/campfire-on-rust

 
 

Repository files navigation

Campfire on Rust

A Rust rewrite of Basecamp's open-source Campfire chat application.

About This Project

This project is a complete reimplementation of Campfire in Rust, preserving the elegant simplicity of the original while leveraging Rust's performance, safety, and modern async ecosystem.

We proudly embrace the legacy of Basecamp's Campfire. The original Ruby/Rails codebase serves as our reference implementation, and we're deeply grateful to the Basecamp team (formerly 37signals) for open-sourcing this exemplar of focused, opinionated software design.

Architecture

This project uses a layered architecture organized into 7 core crates:

Layer 1: Domain (Pure Business Logic)

  • COR01 - Core domain entities (User, Room, Message, Membership)

Layer 2: Infrastructure & Application Services

  • COR02 - Storage layer (database, file storage, caching)
  • COR03 - Web layer (HTTP routing, controllers, middleware)
  • COR04 - Real-time layer (WebSocket, pub/sub, presence)

Layer 3: Supporting Services

  • COR05 - Background jobs (job queue, async workers)
  • COR06 - External services (WebPush, OpenGraph, webhooks)
  • COR07 - Shared infrastructure (config, logging, errors)

Design principle: Strict dependency flow from outer layers toward the domain core. No circular dependencies.

Reference Materials

This repository includes comprehensive analysis of the original Campfire codebase:

  • Original codebase: .ref/once-campfire/ - Basecamp's Ruby/Rails implementation
  • ISG Analysis: .ref/analysis-campfire/REPOSITORY-ANALYSIS.md - Interface Signature Graph analysis using Parseltongue v0.8.9
    • 1,946 entities indexed
    • 3,736 dependency edges mapped
    • Detailed migration strategy for all architectural layers

Development Approach

This project follows Test-Driven Development (TDD) practices:

  1. RED - Write failing tests that specify behavior
  2. GREEN - Implement minimum code to pass
  3. REFACTOR - Improve design while maintaining passing tests

See the Parseltongue analysis documentation in .claude/ for ISG-based architecture exploration workflows.

Acknowledgments

Thank you to the Basecamp team for creating and open-sourcing Campfire. Your commitment to calm, focused software that respects users' time and attention is an inspiration. This rewrite aims to honor that philosophy while exploring what the same vision looks like in Rust.

Original Campfire: https://github.com/basecamp/campfire

License

MIT License (following the original Campfire's licensing)


This project is not affiliated with or endorsed by Basecamp. It's an independent rewrite for educational and practical purposes.

About

campfire by 37signals rewritten in Rust by a PM for fun exclusively using LLMs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%