Getting Started
Relevant source files
The following files were used as context for generating this wiki page:Welcome to CyberPath (CertDb), a project dedicated to providing accessible resources, tools, and a comprehensive database of cybersecurity certifications and training programs. This guide will walk you through setting up the project locally, understanding its structure, and making your first contribution. The primary goal of CyberPath is to empower individuals and organizations in their cybersecurity journey.
The project features a public database of cybersecurity certifications, searchable by various criteria, and encourages community contributions to keep the resources current and comprehensive. While local installation is possible, the recommended way to use the platform is via the official website, which is always up-to-date.
Sources: README.md:3-19
Installation
To run the CyberPath platform locally, you must have pnpm installed. The following steps will guide you through the setup process.
- Clone the repository:
git clone https://github.com/ebalo55/cyberpath.git - Navigate into the directory:
cd cyberpath - Install dependencies:
pnpm install
Sources: README.md:26-39
Usage
After a successful installation, you can start the local development server.
- Run the development server:
pnpm run dev - Access the application:
Open your web browser and navigate tohttp://localhost:4321.
Sources: README.md:44-52, package.json:5
Project Structure & Technology
CyberPath is built using the Astro web framework. It integrates several key technologies to deliver a modern, reactive user experience.
Sources: package.json:13, astro.config.ts
Core Technologies
The project relies on the following primary dependencies:
| Technology | Version | Purpose |
|---|---|---|
astro | ^5.8.0 | The core web framework. |
@astrojs/react | ^4.3.0 | Integration for using React components. |
@astrojs/tailwind | ^6.0.2 | Integration for Tailwind CSS. |
@astrojs/mdx | ^4.3.0 | Integration for MDX (Markdown with JSX). |
react | ^18.3.1 | A JavaScript library for building user interfaces. |
tailwindcss | ^3.4.17 | A utility-first CSS framework. |
fuse.js | ^7.1.0 | A powerful, lightweight fuzzy-search library. |
puppeteer | ^23.11.1 | A Node.js library for controlling headless Chrome. |
Sources: package.json:11-25, package.json:30-34
Astro Configuration
The Astro configuration file, astro.config.ts, defines the site's behavior, integrations, and build settings.
// astro.config.ts
export default defineConfig({
site: "https://certdb.cyberpath-hq.com",
base: `/`,
trailingSlash: `ignore`,
integrations: [
tailwind({
nesting: true,
}),
react(),
sitemap(),
mdx({
extendMarkdownConfig: true,
gfm: true,
}),
],
build: {
assets: "assets",
},
output: "static",
});
Key configurations include:
site: The base URL for the production site, used for sitemap generation and SEO.integrations: The project usestailwind,react,sitemap, andmdx.output: The site is generated asstaticHTML, CSS, and JavaScript files.
Sources: astro.config.ts:10-29
Project Scripts
Several scripts are defined in package.json to automate development and build tasks.
| Script | Description |
|---|---|
dev | Starts the Astro development server. An alias for astro dev. |
start | Also starts the Astro development server. |
build | Checks types, builds the static site, disables the dev toolbar, installs Chrome via Puppeteer, and runs the screenshot.js script. |
preview | Serves the built static site locally for previewing. |
astro | Provides direct access to the Astro CLI. |
Sources: package.json:4-9, scripts/screenshot.js:3-7
The build script includes a step to take a screenshot of the database page for promotional or documentation purposes. This process is illustrated below.
This diagram shows the flow of the build script's screenshot generation step.
Sources: package.json:7, scripts/screenshot.js
Data Model
The core data of the application revolves around cybersecurity certifications. The schema for this data is defined in src/content.config.ts using Astro's content collections feature.
Certifications Collection
The certifications collection defines the structure for each certification document.
This diagram illustrates the entity relationship for the certifications schema.
The schema fields are as follows:
| Field | Type | Description |
|---|---|---|
title | string | The full title of the certification. |
acronym | string | The acronym for the certification. |
last_updated_at | date | The date the certification information was last updated. |
image | image() | An optimized image for the certification. |
reference | string | A URL to the official certification page. |
aliases | array(string) | (Optional) Alternative names or acronyms. |
draft | boolean | A flag to mark the entry as a draft (defaults to false). |
career_paths | array(enum) | An array of associated career paths from a predefined list. |
price | string | The price of the certification. |
currency | string | The currency for the price. |
Sources: src/content.config.ts:6-21
Career Paths
Career paths are a central concept for categorizing certifications. They are defined as a constant array in src/lib/career-paths.ts.
// src/lib/career-paths.ts
export const CareerPathsList = [
CAREER_PATH_SPECIAL_HIDDEN,
"Blue Team Specialist",
"Cloud Security Specialist",
"Cybersecurity Manager",
"Malware Developer",
"OSINT Specialist",
"Penetration Tester",
"Red Team Specialist",
"Risk Management Specialist",
"Security Operations Specialist",
"Threat Hunter",
] as const;
Each career path has an associated description and image. A special __HIDDEN__ path is used internally.
Sources: src/lib/career-paths.ts:15-28
Contributing
Contributions are welcome and encouraged. The process for contributing is standardized to ensure a smooth workflow.
Sources: CONTRIBUTING.md:3-5
Contribution Flow
This diagram outlines the steps for contributing code or content to the project.
Sources: CONTRIBUTING.md:7-24
Contribution Steps
- Fork the Repository: Create a personal copy of the project on your GitHub account.
- Create a Branch: Make a new branch for your feature or fix (e.g.,
feature/YourFeatureName). - Make Changes: Implement your code or content updates.
- Commit Changes: Use a clear and descriptive commit message.
- Push Changes: Push the branch to your forked repository.
- Open a Pull Request: Submit a PR to the main CyberPath repository with a detailed description of your work.
Sources: CONTRIBUTING.md:7-24