Proposal: Compressing DevDocs with a Low-Level C Core

Open
#2,669 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
18/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Quiet
Tech stack
c, docker, javascript, ruby, wasm

Research direction

The proposal covers the search engine, HTML pipeline, and local server, including Ruby/JS, Nokogiri, Sinatra, C, WebAssembly, and Docker. Start by mapping the existing implementations and their tests before evaluating whether the three replacements can be separated. Done would require an agreed migration scope, compatibility requirements, and validation for search, docset processing, and local hosting.

Written by the indexing model from the issue text.

Description

feature

I’ve been using DevDocs for years—it’s a lifesaver when AI fails on niche cases. I have a lot of respect for the work done so far, but the current Ruby/JS stack feels like it’s holding the project back from being as fast and straight-forward as it could be

What i am asking is if I can rewrite the core server and processing logic in C? Specifically:

  1. The Search Engine: Moving the indexing and fuzzy matching from JS to a C codebase that is compiled to a wasm module to kill the memory lag

  2. The HTML Pipeline: Replacing the Ruby/Nokogiri filters with a fast C-based parser for cleaning docsets

  3. The Local Server: Swapping the Ruby/Sinatra backend for a lightweight C static server to remove the heavy runtime requirements for local hosting

Due to such changes around 30% of the project may be reduced including the definite removal of something as useless as docker, which will be replaced with simple statically-compiled servers for each OS that people can just download (or build themselves since C is available on all platforms) and launch the server without any unnecessary dependencies

I'm happy to handle the heavy lifting and resolve any issues that pop up with this new setup. Are you guys open to adding this C-based paradigm to the official repo? I truly believe this would make the project much leaner and easier to maintain long-term

I truly hope that you will accept this crazy request to rebuild the core of the project in a language that most of your contributors probably dont use and I hope I get the chance to work with you on this

Dominant language
Ruby
Stars
39.5k
Forks
2.6k
Avg merge
4d 32m
Merged PRs (30d)
13

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from freeCodeCamp/devdocs

All issues in freeCodeCamp/devdocs

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.