Feature: Career Paths
Relevant source files
The following files were used as context for generating this wiki page:The Career Paths feature provides a structured way to categorize and browse cybersecurity certifications based on specific professional roles. It allows users to discover relevant certifications by filtering the main database according to predefined career tracks, such as "Penetration Tester" or "Cloud Security Specialist". This feature is a core component of the platform's navigation and data filtering capabilities, helping users find information to advance their careers.
Sources: README.md:16-18, src/lib/career-paths.ts
Data Model and Definitions
The foundation of the Career Paths feature is a set of predefined data structures that define the available paths and their associated metadata.
Sources: src/lib/career-paths.ts
Career Path List
A constant array CareerPathsList defines all valid career path names available in the system. This list is used for type safety and validation throughout the application, particularly in the content schema. A special hidden path, __HIDDEN__, is included for internal use, such as rendering placeholders, and is filtered out from user-facing lists and static path generation.
Sources: src/lib/career-paths.ts:15-30, src/pages/career-paths/[path]/data.json.ts:16-18
// src/lib/career-paths.ts:15-30
export const CAREER_PATH_SPECIAL_HIDDEN = "__HIDDEN__" as const;
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;
Career Path Metadata
The CareerPathsData object maps each career path name from CareerPathsList to an object containing its description, an associated image, and an attribution link for the image. This data is used to populate the individual career path pages with rich content.
The diagram below illustrates the structure of the CareerPathsData object.
This diagram shows the key-value structure for each career path's metadata.
Sources: src/lib/career-paths.ts:35-108
Available Career Paths
The following table lists the career paths defined in the system and their descriptions.
| Career Path Name | Description |
|---|---|
| Blue Team Specialist | Defends an organization’s networks and systems against cyberattacks. They specialize in incident response, digital forensics, and continuous monitoring of systems for vulnerabilities. |
| Cloud Security Specialist | Responsible for designing and implementing security measures to protect cloud-based infrastructure and data. |
| Cybersecurity Manager | Leads and manages cybersecurity teams and strategies, overseeing the implementation of security policies, projects, and incident response. |
| Malware Developer | Develops and tests exploits to identify vulnerabilities in systems, software, or hardware. |
| OSINT Specialist | Specializes in gathering and analyzing publicly available information (Open-Source Intelligence) to identify potential threats, vulnerabilities, or targets. |
| Penetration Tester | Conducts authorized simulated cyberattacks to identify vulnerabilities in systems, networks, and applications. |
| Red Team Specialist | Performs offensive security testing, simulating advanced cyberattacks to identify and exploit vulnerabilities. |
| Risk Management Specialist | Identifies, assesses, and prioritizes potential security risks to an organization’s assets. |
| Security Operations Specialist | Manages the daily operations of an organization’s security infrastructure. They oversee the implementation of security policies, secure system development, and compliance with regulations. |
| Threat Hunter | Actively searches for hidden and advanced threats within an organization’s environment. |
Sources: src/lib/career-paths.ts:45-108
Content Schema Integration
Career paths are linked to certifications through the content collection schema. Each certification document can be tagged with one or more career paths, establishing a many-to-many relationship.
The diagram below shows the relationship between the certifications collection and the CareerPathsList.
This ER diagram illustrates that a certification can be associated with multiple career paths.
Sources: src/content.config.ts:4-23
Certification Schema
The certifications collection, defined in src/content.config.ts, uses a Zod schema to validate its frontmatter. The career_paths field is defined as an array of strings, where each string must be one of the values from the CareerPathsList enum. This ensures data integrity and consistency.
// src/content.config.ts:8-18
const certifications = defineCollection({
// ...
schema: ({image}) =>
z.object({
// ...
career_paths: z.array(z.enum(CareerPathsList)),
// ...
}),
});
Sources: src/content.config.ts:8-18
API Endpoints
A set of dynamic API endpoints is generated to serve certification data filtered by each career path. These endpoints are used by the frontend to display the relevant list of certifications on career path-specific pages.
Sources: src/pages/career-paths/[path]/data.json.ts, src/pages/career-paths/[path]/data-index.json.ts
Static Path Generation
Astro's static site generation capabilities are used to create a unique URL for each career path. The getStaticPaths function in data.json.ts iterates over CareerPathsList, filters out the __HIDDEN__ entry, and converts each path name into a URL-friendly kebab-case slug (e.g., "Penetration Tester" becomes penetration-tester).
// src/pages/career-paths/[path]/data.json.ts:15-27
export function getStaticPaths() {
const career_paths: CareerPathCollection = CareerPathsList.filter((entry) => {
return entry !== CAREER_PATH_SPECIAL_HIDDEN;
});
const kebab_career_paths = career_paths.map((career_path) => {
return dash(career_path);
});
return kebab_career_paths.map((path) => ({
params: {
path,
},
}));
}
Sources: src/pages/career-paths/[path]/data.json.ts:15-27
API Endpoint Details
| Endpoint | Method | Description |
|---|---|---|
/career-paths/[path]/data.json | GET | Returns a JSON array of all certification metadata where the career_paths array includes the specified path. The [path] parameter is the kebab-cased career path name. |
/career-paths/[path]/data-index.json | GET | Returns a pre-computed Fuse.js search index for the certifications related to the specified career path. This is used for client-side searching. |
Sources: src/pages/career-paths/[path]/data.json.ts:43-47, src/pages/career-paths/[path]/data-index.json.ts:15-22
Data Fetching Flow
The GET handler for the data.json endpoint follows these steps:
- A lookup table is created to map kebab-case URL slugs back to their original career path names.
- The
getCertificationMetadatafunction is called with a filter predicate. - The predicate checks if a certification's
career_pathsarray includes the career path name corresponding to the request'spathparameter. - The filtered list of certifications is returned as a JSON response.
The following flowchart visualizes this process.
This flowchart shows the logic for handling a request to the career path data API endpoint.
Frontend Rendering
On the frontend, the ReactiveDatatable component is responsible for fetching and displaying the certification data for a specific career path.
Data Table Component
The ReactiveDatatable component is configured with a base_url prop, which is set to the specific career path URL (e.g., /career-paths/penetration-tester). On load, it fetches both the data from /data.json and the search index from /data-index.json to populate the table and enable searching.
The following sequence diagram shows the interaction between the client and the API endpoints when a user visits a career path page.
This sequence diagram illustrates the data fetching process for the career path page.
Sources: src/components/astro/database/reactive-datatable.tsx:49-52, src/components/astro/database/reactive-datatable.tsx:181-184
Career Path Column
Within the data table, the ColCertificationPath component is used to render the list of career paths associated with each certification. It iterates over the career_paths array and displays each path in an unordered list.
// src/components/astro/database/records-table/col-certification-path.tsx:6-14
export const ColCertificationPath: FC<Pick<CertificationMetadata, "career_paths">> = ({ career_paths }) => {
return (
<div className="text-xs leading-5 text-gray-500">
<ul>
{
career_paths.map((path) => (
<li key={path}>{ path }</li>
))
}
</ul>
</div>
);
};
Sources: src/components/astro/database/records-table/col-certification-path.tsx