How discourse/discourse works
Discourse is a self-hostable community platform. Members create discussion topics and interact through conversations, while the Rails API serves the Ember frontend; Markdown processing and Onebox turn authored text and links into rendered content. The README also highlights real-time chat, themes, and plugins, and identifies PostgreSQL and Redis as storage and cache/transient-data services. Sampled source supports the Markdown and Onebox internals; broader feature links reflect README descriptions and repository paths rather than inspected implementation details.
Main entry points: discourse Ember frontend · controllers Rails API · engine.js Markdown engine · text-post-process.js Text post-process
Components 18
Community discussions
- Rails API
app/controllers - Discussion topics
app/controllers/topics_controller.rb - Posts and replies
app/controllers/posts_controller.rb - PostgreSQL
- Redis cache
- Ember frontend
frontend/discourse
Content rendering
- Markdown engine
frontend/discourse-markdown-it/src/engine.js - Text post-process
frontend/discourse-markdown-it/src/features/text-post-process.js - BBCode rules
frontend/discourse-markdown-it/src/features/bbcode-block.js - Onebox engine
lib/onebox/engine.rb - Link adapters
lib/onebox/engine - GitHub helpers
lib/onebox/mixins
Realtime and extensions
- Realtime chat
plugins/chat - Themes
app/controllers/admin/themes_controller.rb - Plugin extensions
plugins
Administration
- Site administration
app/controllers/admin - Review and moderation
app/controllers/reviewables_controller.rb
Other components
- Community member
Connections 16
- Community member → Ember frontend: uses
README.md - Ember frontend → Rails API: calls REST API
README.md - Community member → Discussion topics: creates discussions
README.md - Rails API → PostgreSQL: stores data
README.md - Rails API → Redis cache: caches transient data
README.md - Ember frontend → Markdown engine: cooks content
- Markdown engine → Text post-process: installs ruler
frontend/discourse-markdown-it/src/engine.js - Text post-process → BBCode rules: uses parsing helpers
frontend/discourse-markdown-it/src/features/text-post-process.js - Markdown engine → Onebox engine: embeds links
- Onebox engine → Link adapters: loads adapters
lib/onebox/engine.rb - Link adapters → GitHub helpers: uses GitHub helpers
lib/onebox/engine/github_issue_onebox.rb - Community member → Realtime chat: chats in real time
README.md - Community member → Themes: customizes experience
README.md - Plugin extensions → Ember frontend: extends platform
- Site administration → Themes: manages themes
- Community member → Review and moderation: submits content for review