freeCodeCamp Review Generator
freeCodeCamp Review Generator (hereinafter the “Application”) is a command-line tool that aggregates all review lesson pages from freeCodeCamp’s Full Stack Developer curriculum into a single, comprehensive PDF document for offline study and reference.
1. User Documentation
Section titled “1. User Documentation”This section is for those interacting with a live instance of the Application.
Overview
Section titled “Overview”The Application generates a compiled PDF document containing all review pages from freeCodeCamp’s Full Stack Developer curriculum. The generated PDF includes:
- A custom cover page with generation date
- An automatically generated table of contents with links to each review section
- All review content organised according to the curriculum structure
- Custom headers and footers for easy navigation
- Page numbers and links to community resources
Generated PDF Structure
Section titled “Generated PDF Structure”The output PDF (fcc-review-pages.pdf) follows the freeCodeCamp curriculum structure:
- HTML Topics - Reviews covering basic HTML, semantic HTML, forms and tables, and accessibility
- CSS Topics - Reviews covering basic CSS, layout (Flexbox, Grid), styling, responsive design, animations, and more
- JavaScript Topics - Reviews covering variables, functions, arrays, objects, DOM manipulation, asynchronous programming, and more
- Frontend Libraries - Reviews covering React fundamentals, state management, routing, and frontend frameworks
- Python Topics - Reviews covering Python basics, data structures, algorithms, and object-oriented programming
- Relational Databases - Reviews covering SQL, Bash scripting, and Git
What to Expect
Section titled “What to Expect”Each review page in the generated PDF contains:
- Topic headings - Clear section markers for each subject
- Code examples - Syntax-highlighted code snippets demonstrating concepts
- Explanations - Detailed descriptions of programming concepts and best practices
- Reference material - Quick-reference information for common patterns and methods
Output Format
Section titled “Output Format”- File name:
fcc-review-pages.pdf - Page format: Legal size (8.5” x 14”)
- Margins: 0.75 inches on all sides
- Header: Displays “Naomi’s freeCodeCamp Review”
- Footer: Contains page numbers and link to community Discord server
Disclaimer
Section titled “Disclaimer”This is not an officially sanctioned freeCodeCamp document. The Application is maintained independently and the generated content reflects the curriculum state at the time of generation. For the most up-to-date information, always refer to the official freeCodeCamp website.
2. Technical Documentation
Section titled “2. Technical Documentation”This section is for those interested in running their own instance of the Application.
Prerequisites
Section titled “Prerequisites”- Node.js: Version 18.x or higher recommended
- pnpm: Package manager (version 10.18.0 or compatible)
- Operating System: Linux, macOS, or Windows
- Disk Space: Minimum 500MB for dependencies and output files
Installation
Section titled “Installation”-
Clone the repository:
Terminal window git clone <repository-url>cd fcc-review-generator -
Install dependencies:
Terminal window pnpm installThis will automatically install Chrome browser via Puppeteer (required for PDF generation).
Directory Structure
Section titled “Directory Structure”fcc-review-generator/├── content/ # Review lesson markdown files│ └── review-*/ # Individual review topic directories├── data/│ └── order.json # Curriculum ordering configuration├── src/│ ├── config/│ │ ├── options.ts # PDF generation options│ │ └── text.ts # Cover page text template│ └── index.ts # Main application entry point├── package.json # Project dependencies and scripts└── tsconfig.json # TypeScript configurationConfiguration
Section titled “Configuration”Content Source
Section titled “Content Source”- Copy review lesson markdown files from the freeCodeCamp repository to the
content/directory - The Application recursively walks the directory tree, so nested folders are supported
- Only
.mdfiles are processed; other files are ignored
Curriculum Ordering
Section titled “Curriculum Ordering”- Copy the Full Stack curriculum order from
/curriculum/structure/superblocks/fullstack.jsonin the freeCodeCamp repository - Paste into
data/order.jsonin this project - The Application uses this to sort review pages in the correct curriculum order
PDF Customisation
Section titled “PDF Customisation”Modify src/config/options.ts to customise:
- Page size and margins
- Header and footer templates
- Styling and formatting
Modify src/config/text.ts to customise:
- Cover page content
- Introduction text
- Disclaimer text
Run the Application:
pnpm startThe Application will:
- Read all markdown files from
content/directory - Sort them according to
data/order.json - Generate a table of contents
- Compile all content into a single markdown file (
review.md) - Convert the markdown to PDF (
fcc-review-pages.pdf) - Clean up the temporary markdown file
Output
Section titled “Output”- Success: Generates
fcc-review-pages.pdfin the project root - Console: Displays progress messages during execution
- Errors: Logged to console with descriptive messages
Development
Section titled “Development”Build TypeScript
Section titled “Build TypeScript”pnpm buildCompiles TypeScript files according to tsconfig.json.
Linting
Section titled “Linting”pnpm lintRuns ESLint with strict settings (max warnings: 0).
Testing
Section titled “Testing”pnpm testCurrently outputs a placeholder message (no tests implemented).
Technical Architecture
Section titled “Technical Architecture”Core Components
Section titled “Core Components”-
File Reader (
readDirectoryRecursively)- Recursively scans the content directory
- Returns flat array of file paths
- Handles nested directory structures
-
File Sorter (
sortFiles)- Sorts files based on curriculum order from
order.json - Matches file directory names to curriculum block names
- Maintains proper curriculum sequence
- Sorts files based on curriculum order from
-
Content Processor (
rollupFiles)- Extracts frontmatter metadata (title, ID, etc.)
- Strips frontmatter and freeCodeCamp-specific heading syntax
- Generates table of contents with anchor links
- Compiles all content into single markdown file
-
PDF Generator (
createPdf)- Uses
md-to-pdflibrary (which uses Puppeteer/Chrome) - Applies custom styling and layout options
- Generates headers, footers, and page numbers
- Writes final PDF to disk
- Uses
Dependencies
Section titled “Dependencies”- md-to-pdf (v5.2.4): Markdown to PDF conversion using headless Chrome
- tsx (v4.20.6): TypeScript execution for development
- typescript (v5.9.3): TypeScript compiler
- eslint (v9.37.0): Code quality and style enforcement
Troubleshooting
Section titled “Troubleshooting”Common Issues
Section titled “Common Issues”Issue: Puppeteer/Chrome installation fails
- Solution: Ensure you have sufficient disk space and network connectivity. Run
pnpx puppeteer browsers install chromemanually.
Issue: PDF generation fails with “Protocol error”
- Solution: Chrome may need additional system dependencies. On Linux, install required libraries for headless Chrome.
Issue: Files not appearing in correct order
- Solution: Verify
data/order.jsonmatches the structure of your content directory names.
Issue: Out of memory errors
- Solution: The Application processes all content in memory. For very large datasets, consider increasing Node.js memory limit:
NODE_OPTIONS="--max-old-space-size=4096" pnpm start
Performance Considerations
Section titled “Performance Considerations”- File processing is sequential for consistent ordering
- PDF generation uses headless Chrome, which is memory-intensive
- Typical generation time: 10-30 seconds depending on content volume
- Temporary markdown file is automatically cleaned up after PDF generation
System Requirements
Section titled “System Requirements”- Memory: Minimum 2GB RAM (4GB recommended)
- CPU: Modern multi-core processor recommended
- Network: Required for initial dependency installation
- Storage: 500MB minimum for dependencies and output
3. Legal Documentation
Section titled “3. Legal Documentation”This section is for expansions to our legal policies specific to the Application.
License
Section titled “License”This software is licensed under Naomi’s Public Licence. The full licence text can be found at:
- Local: LICENSE.md
- Online: https://docs.spellware.dev/#/license
Copyright is held by Naomi Carrigan.
Privacy Policy
Section titled “Privacy Policy”The Application processes markdown files locally and does not collect, store, or transmit any personal data. For information about privacy practices related to the project infrastructure (repository hosting, issue tracking, etc.), please refer to:
- Local: PRIVACY.md
- Online: https://docs.spellware.dev/#/privacy
Terms of Service
Section titled “Terms of Service”By using this Application, you agree to the Terms of Service. The full terms can be found at:
- Local: TERMS.md
- Online: https://docs.spellware.dev/#/terms
Security Policy
Section titled “Security Policy”If you discover a security vulnerability in the Application, please follow the responsible disclosure process outlined in our Security Policy:
- Local: SECURITY.md
- Online: https://docs.spellware.dev/#/security
Content Attribution
Section titled “Content Attribution”The review content processed by this Application originates from freeCodeCamp.org and is subject to freeCodeCamp’s licensing terms. This tool is an unofficial aggregator and is not endorsed by or affiliated with freeCodeCamp.org.
Users of the generated PDF should respect freeCodeCamp’s intellectual property rights and use the content for personal educational purposes only.
Disclaimer of Warranty
Section titled “Disclaimer of Warranty”THE APPLICATION IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. THE MAINTAINERS MAKE NO WARRANTY THAT:
- The generated PDF will be error-free or complete
- The content will be current or up-to-date with the latest freeCodeCamp curriculum
- The Application will function without interruption
Users should always refer to the official freeCodeCamp website for the most accurate and current curriculum information.
4. Contributing Documentation
Section titled “4. Contributing Documentation”This section is for documentation related to contributing to the Application’s codebase.
Getting Started
Section titled “Getting Started”We welcome contributions to the freeCodeCamp Review Generator! Before contributing, please review:
- Contributing Guidelines: https://docs.spellware.dev/#/contributing
- Local reference: CONTRIBUTING.md
- Code of Conduct: https://docs.spellware.dev/#/coc
- Local reference: CODE_OF_CONDUCT.md
Ways to Contribute
Section titled “Ways to Contribute”1. Report Bugs
Section titled “1. Report Bugs”If you encounter a bug, please post in the #bug-reports forum channel on our Discord community with:
- Clear description of the problem
- Steps to reproduce
- Expected vs. actual behaviour
- Your environment (OS, Node.js version, pnpm version)
- Any relevant error messages or logs
2. Suggest Enhancements
Section titled “2. Suggest Enhancements”We appreciate feature requests and enhancement suggestions! Please post in the #feature-requests forum channel on our Discord community describing:
- The problem you’re trying to solve
- Your proposed solution
- Any alternative approaches you’ve considered
- How this would benefit other users
3. Submit Pull Requests
Section titled “3. Submit Pull Requests”Ready to contribute code? Follow these steps:
-
Fork and Clone
Terminal window git clone <your-fork-url>cd fcc-review-generator -
Create a Branch
Terminal window git checkout -b feature/your-feature-name -
Make Changes
- Follow existing code style and patterns
- Update relevant documentation
- Ensure TypeScript types are correct
- Test your changes thoroughly
-
Run Quality Checks
Terminal window pnpm lint # Check code stylepnpm build # Ensure TypeScript compilespnpm start # Test PDF generation -
Commit Changes
Terminal window git add .git commit -m "feat: description of your changes"Follow conventional commit message format:
feat:for new featuresfix:for bug fixesdocs:for documentation changesrefactor:for code refactoringchore:for maintenance tasks
-
Push and Create PR
Terminal window git push origin feature/your-feature-nameThen open a Pull Request on GitHub with a clear description of your changes.
Code Style Guidelines
Section titled “Code Style Guidelines”- TypeScript: Use strict type checking; avoid
anytypes - Formatting: Follow the ESLint configuration (
@nhcarrigan/eslint-config) - Naming: Use descriptive variable and function names
- Comments: Include JSDoc comments for exported functions
- Error Handling: Use try-catch blocks and provide meaningful error messages
Project Conventions
Section titled “Project Conventions”Copyright Headers
Section titled “Copyright Headers”All source files should include the copyright header:
/** * @copyright SpellWare * @license Naomi's Public Licence * @author Naomi Carrigan */File Organisation
Section titled “File Organisation”- Place configuration in
src/config/ - Keep utility functions modular and focused
- Use ES modules (import/export)
- Maintain clear separation of concerns
TypeScript Configuration
Section titled “TypeScript Configuration”The project uses strict TypeScript settings:
strict: true- Target: ES2022
- Module: ESNext
- No implicit any types
Testing
Section titled “Testing”Currently, the project does not have an automated test suite. Contributions that add testing infrastructure are welcome! Potential testing improvements:
- Unit tests for file processing functions
- Integration tests for PDF generation
- Snapshot tests for output consistency
- CI/CD pipeline integration
Development Workflow
Section titled “Development Workflow”- Install dependencies:
pnpm install - Make changes to source files in
src/ - Test locally:
pnpm startto verify PDF generation - Check for errors:
pnpm lintandpnpm build - Commit and push your changes
- Create Pull Request for review
Review Process
Section titled “Review Process”Pull requests will be reviewed by project maintainers. The review process includes:
- Code quality and style verification
- Functionality testing
- Documentation completeness
- Alignment with project goals
Please be patient during the review process and be open to feedback and requested changes.
Communication
Section titled “Communication”For questions, discussions, or help with contributions:
- Discord Forum: Post in the #bug-reports or #feature-requests forum channels on our Discord community
- Pull Requests: For code contributions and discussions
- Discord: Join the community at https://chat.spellware.dev
- Email: [email protected] for private inquiries
Recognition
Section titled “Recognition”All contributors will be recognised for their contributions. Significant contributions may result in being listed in a CONTRIBUTORS file or project documentation.
License for Contributions
Section titled “License for Contributions”By contributing to this project, you agree that your contributions will be licensed under the same license as the project (Naomi’s Public Licence). You confirm that:
- You have the right to submit the contribution
- Your contribution is your original work or properly attributed
- You understand the contribution will be publicly available
Thank you for your interest in contributing to the freeCodeCamp Review Generator! Your contributions help make this tool better for everyone in the learning community.