Contributing Guide
Relevant source files
The following files were used as context for generating this wiki page:Welcome to the CyberPath contribution guide. This document provides all the necessary information for developers and community members who wish to contribute to the project. Contributions are welcome, whether they are new features, bug fixes, or additions to the cybersecurity certification database.
The primary goal of CyberPath is to provide accessible resources and tools to help individuals navigate the world of cybersecurity certification and training. Community contributions, especially adding new certifications and training programs, are highly encouraged to help others in their cybersecurity journey.
Sources: README.md:3-6, README.md:19-22, CONTRIBUTING.md:3-5
Getting Started: Local Setup
Before you can contribute, you need to set up the project on your local machine. The project requires pnpm for dependency management.
-
Fork & Clone: First, fork the repository on GitHub to your own account. Then, clone your fork locally:
git clone https://github.com/YOUR_USERNAME/cyberpath.git cd cyberpathSources: CONTRIBUTING.md:9, README.md:29-32
-
Install Dependencies: Navigate to the project directory and install the required dependencies using
pnpm.pnpm installSources: README.md:33-36
-
Run Development Server: Start the local development server.
pnpm run devThe application will be accessible at
http://localhost:4321.Sources: README.md:42-46
Project Scripts
The package.json file defines several scripts for common development tasks.
| Script | Description |
|---|---|
dev | Starts the Astro development server. |
start | An alias for the dev script. |
build | Runs astro check, builds the project for production, disables the dev toolbar, installs the Chrome Puppeteer browser, and runs the screenshot script. |
preview | Starts a local server to preview the production build. |
astro | Provides access to the Astro CLI. |
Sources: package.json:5-11
The build process includes a script to take a screenshot of the database page for promotional or documentation purposes.
This diagram shows the steps executed by the pnpm run build command.
Sources: package.json:7, scripts/screenshot.js
Contribution Workflow
All contributions should follow a standard Git workflow to ensure code quality and maintainability.
This flowchart illustrates the required steps for making a contribution.
Sources: CONTRIBUTING.md:7-27
Key points to remember:
- Use descriptive branch names (e.g.,
feature/YourFeatureName). - Write clear and concise commit messages.
- Provide a detailed description in your pull request.
- Be prepared for feedback and potential adjustments during the review process.
Sources: CONTRIBUTING.md:10-12, CONTRIBUTING.md:18-20, CONTRIBUTING.md:22-25, CONTRIBUTING.md:33-35
How to Contribute Content
A major way to contribute to CyberPath is by adding or updating cybersecurity certifications. The platform is designed to make this process straightforward.
Certification Data Structure
Certifications are managed as Markdown files with frontmatter in the src/content/certifications/ directory. The structure of this data is defined by a Zod schema in src/content.config.ts.
When adding a new certification, you must create a new .md or .mdx file in that directory and include the following fields in the frontmatter:
| Field | Type | Description | Required |
|---|---|---|---|
title | string | The full title of the certification. | Yes |
acronym | string | The official acronym for the certification. | Yes |
last_updated_at | date | The date the certification information was last updated. | Yes |
image | image() (Astro) | A path to the certification's logo or relevant image. | Yes |
reference | string (URL) | A URL to the official certification page. | Yes |
aliases | array(string) | Optional alternative names or acronyms. | No |
draft | boolean | Set to true to mark the entry as a draft. Defaults to false. | No |
career_paths | array(enum) | An array of career paths this certification is relevant for. See src/lib/career-paths.ts. | Yes |
price | string | The price of the certification exam or materials. | Yes |
currency | string | The currency for the price (e.g., "USD"). | Yes |
Sources: src/content.config.ts:6-19
Example Certification Frontmatter
Here is an example of the Zod schema definition for the certifications collection.
// src/content.config.ts
const certifications = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: "./src/content/certifications" }),
schema: ({image}) =>
z.object({
title: z.string(),
acronym: z.string(),
last_updated_at: z.date(),
image: image(),
reference: z.string(),
aliases: z.array(z.string()).optional(),
draft: z.boolean().default(false),
career_paths: z.array(z.enum(CareerPathsList)),
price: z.string(),
currency: z.string(),
}),
});
Sources: src/content.config.ts:6-19
The body of the Markdown file should contain a detailed description of the certification.
Project Architecture & Tech Stack
The project is built with Astro and utilizes several key technologies and integrations. Understanding the stack is helpful for more complex contributions.
- Framework: Astro
- UI Components: React (
@astrojs/react) - Styling: Tailwind CSS (
@astrojs/tailwind) - Content: MDX (
@astrojs/mdx) for content collections. - Type Checking: TypeScript (
astro check) - Error Monitoring: Sentry (
@sentry/astro), enabled in development. - Debugging: Spotlight.js (
@spotlightjs/astro)
Sources: package.json:13-28, astro.config.ts:4-24
Legal & Community Guidelines
License
CyberPath is licensed under a custom license detailed in LICENSE.md. Key points for contributors include:
- The work is granted for private use only.
- Commercial use is prohibited without written permission from the licensor, Emanuele Balsamo.
- Redistribution and rebranding are strictly prohibited.
- The software is provided "AS IS" without warranty.
It is crucial to read and understand the full LICENSE.md file before contributing.
Sources: LICENSE.md, README.md:48-50
Code of Conduct
All interactions within the CyberPath community must adhere to the Code of Conduct. Please ensure you read and follow it.
Sources: CONTRIBUTING.md:29-31
Conclusion
Thank you for your interest in contributing to CyberPath. Your efforts help build a valuable resource for the cybersecurity community. By following these guidelines, you can ensure a smooth and effective collaboration.
Sources: CONTRIBUTING.md:40-42