Contributing
System Requirements
- Rust 1.93.1+ — Install Rust
- Bun 1.3.10+ — Install Bun
- Node.js 20+
Local Development
-
Clone the repository and open
freeCodeCampOS/exampleas a new workspace in VSCode. -
Install dependencies and build the project:
bun install bun run build -
Run the development server:
cargo run --bin freecodecamp-server -
In a separate terminal, run the client in development mode:
cd client && bun run devThe client will be available at
http://localhost:5173.
Common Tasks
# Run all tests
cargo test --all
# Check formatting
cargo fmt --all -- --check
# Fix formatting
cargo fmt --all
# Run linter
cargo clippy --all -- -D warnings
# Build optimized binaries
cargo build --release --all
# Build client assets
cd client && bun run build
Environment Variables
RUST_LOG=info # Log level (debug, info, warn, error)
PORT=8080 # Server port (default: 8080)
CONFIG_PATH=./conf.json # Path to configuration file
Repository Layout
cli/ # create-freecodecamp-os-app CLI tool
client/ # React frontend
config/ # Shared types and configuration
docs/ # Documentation (this site)
example/ # Example curriculum used for development
parser/ # Curriculum markdown parser
runner/ # Test execution engine
server/ # Axum HTTP server
Gitpod
Opening a Pull Request
- Fork the repository
- Push your changes to your fork
- Open a pull request with the recommended style
Commit Message
<type>(<scope>): <description>
Pull Request Title
<type>(<scope>): <description>
Pull Request Body
Answer the following questions:
- What does this pull request do?
- How should this be manually tested?
- Any background context you want to provide?
- What are the relevant issues?
- Screenshots (if appropriate)
Types
fixfeatrefactorchore
Scopes
Any top-level directory or config file. Changing a package should have a scope of dep or deps.
Documentation
This documentation is built using mdBook. Read their documentation to install the latest version.
Also, the documentation uses mdbook-admonish:
cargo install mdbook-admonish
Serve the Documentation
cd docs
mdbook serve
This will spin up a local server at http://localhost:3000 with hot-reloading.
Build the Documentation
cd docs
mdbook build
CLI (create-freecodecamp-os-app)
The CLI is written in Rust and is located in the cli directory.
Development
cd cli
cargo run
Flight Manual
Release
Releases are done manually through the GitHub Actions.
Making a Release
In the Actions tab, select the Publish to npm workflow. Then, select Run workflow.