MCPSERV.CLUB
QPixel

QPixel

Self-Hosted

Community‑driven Q&A platform for multiple topics

Active(95)
431stars
1views
Updated 2 days ago
QPixel screenshot

Overview

Discover what makes QPixel powerful

QPixel is a **Rails‑based** self‑hosted platform that powers the public Codidact site. At its core it implements a multi‑community, category‑aware Q&A system with support for multiple post types (questions, answers, articles) and a sophisticated scoring algorithm that incorporates controversy. The application is designed for rapid iteration: continuous integration, code coverage dashboards and a permissive AGPL license encourage community contributions.

Multi‑tenant architecture

Advanced voting & ranking

Markdown + MathJax

Extensible UI

Overview

QPixel is a Rails‑based self‑hosted platform that powers the public Codidact site. At its core it implements a multi‑community, category‑aware Q&A system with support for multiple post types (questions, answers, articles) and a sophisticated scoring algorithm that incorporates controversy. The application is designed for rapid iteration: continuous integration, code coverage dashboards and a permissive AGPL license encourage community contributions.

Key Features

  • Multi‑tenant architecture – A single deployment can host dozens of independent communities, each with its own set of categories and post types.
  • Advanced voting & ranking – The scoring algorithm is exposed via a REST API and can be overridden by developers to experiment with alternative metrics.
  • Markdown + MathJax – Content is parsed by the redcarpet gem with live preview, and MathJax is loaded on demand for LaTeX rendering.
  • Extensible UI – Themes and custom CSS/JS can be dropped into the app/assets pipeline, allowing brand‑specific styling without touching core code.
  • Rich media support – Image uploads are handled by ActiveStorage with optional CDN integration, and custom content licenses can be attached to each post.

Technical Stack

LayerTechnology
FrameworkRuby on Rails 7 (API + MVC)
DatabasePostgreSQL (primary), optional Redis for caching & background jobs
Background processingSidekiq, with Redis queue
Search & indexingElasticSearch via the searchkick gem (optional)
ContainerizationDocker images are available in the CI pipeline; a docker-compose.yml is provided for local development
TestingRSpec, FactoryBot; CI runs coverage on Codecov

The Rails stack provides a familiar MVC structure for developers, while the use of searchkick and Redis allows horizontal scaling of search and job queues. The AGPL license ensures that any modifications remain open source, fostering a healthy ecosystem.

Core Capabilities

  • RESTful API – Endpoints for users, posts, votes, and community metadata are fully documented in the api namespace.
  • Webhooks – External services can subscribe to events such as post.created, vote.updated via a simple JSON payload.
  • GraphQL – A lightweight GraphQL layer is available for clients that prefer single‑endpoint queries.
  • Permission system – Based on abilities derived from user activity, developers can expose or restrict actions through the cancancan gem.
  • Plugin hooks – The after_commit callbacks and ActiveSupport::Concern modules expose extension points for custom business logic.

Deployment & Infrastructure

QPixel is intentionally lightweight: a single rails server instance can handle moderate traffic, while a Sidekiq worker pool handles background tasks. For production, the recommended stack is:

  1. PostgreSQL – Persist all relational data; pg gem handles connection pooling.
  2. Redis – Caching and Sidekiq queues; a single instance can serve both purposes.
  3. ElasticSearch – Optional but highly recommended for full‑text search across communities.
  4. Docker Compose – A ready‑made docker-compose.yml bundles all services, making scaling as simple as adding replicas.
  5. CI/CD – GitHub Actions builds Docker images and runs tests; a registry can be used for custom deployments.

The application scales horizontally by adding more Rails workers behind a load balancer and replicating the database with logical replication. ElasticSearch shards can be distributed across nodes to handle large search workloads.

Integration & Extensibility

  • OAuth / SAML – Built‑in support for external authentication providers; developers can plug in new strategies via the devise gem.
  • Custom post types – Adding a new type involves creating a model, migration, and controller; the routing layer automatically registers it.
  • Theming – A theme can be dropped into app/assets/stylesheets and referenced in the community settings.
  • APIs – The OpenAPI specification is auto‑generated from controller annotations, enabling SDK generation for any language.
  • Webhooks – External services can register endpoints; the system posts events asynchronously, ensuring non‑blocking performance.

Developer Experience

The repository follows standard Rails conventions, making onboarding fast for Ruby developers. Documentation is split into a README, an INSTALLATION.md guide, and a CONTRIBUTING.md file that outlines coding standards. Continuous integration ensures any pull request passes tests and coverage checks before merging, fostering high code quality. The community is active on Codidact Meta and the Collab forum, where developers can discuss architecture decisions or propose new features.

Use Cases

  • Enterprise Knowledge Base – Companies can host a private Q&A hub with custom branding and role‑based permissions.
  • Educational Platforms – Universities can deploy a community for course discussions, leveraging the ability to create multiple categories per subject.
  • Open‑Source Projects – Maintainers can embed a Q&A section alongside documentation, benefiting from the same voting and moderation system.
  • Specialized Communities – Hobbyists or niche professional groups can spin up isolated communities with tailored post types and scoring rules.

Advantages

  • Performance – Rails 7

Open SourceReady to get started?

Join the community and start self-hosting QPixel today