Directory Overview
The Resume Builder follows a feature-based organization within thesrc/ directory:
Root Files
router.tsx
Router configuration and setup:types.ts
Core type definitions for the application (100 lines):ResumeData: Main data structurePersonalInfo,Experience,Education,Skill,Project: Resume sectionsCustomSection,CustomSectionItem: User-defined sectionsSectionId: Valid section identifiersResumeTemplate: Template variant typeinitialResumeData: Default empty resume state
routeTree.gen.ts
Generated at build time from files in theroutes/ directory.
Components Directory
Thecomponents/ directory is organized by feature area.
Editor Components
components/Editor/ contains form components for editing resume sections:
Preview Components
components/Preview/ renders the live resume preview:
- Preview.tsx: Main preview container component
- SectionRenderer.tsx: Renders individual resume sections
useResume() context and display formatted output.
ResumeRenderer Components
components/ResumeRenderer/ contains the template rendering engine:
Core Renderers
- UniversalRenderer.tsx: Template-agnostic rendering engine that applies template configurations
- SectionRenderer.tsx: Routes to appropriate section component based on section type
Section Components
components/ResumeRenderer/sections/ contains specialized renderers:
- HeaderSection.tsx: Personal information header
- ExperienceSection.tsx: Work experience timeline
- EducationSection.tsx: Educational background
- SkillsSection.tsx: Skills list/grid
- ProjectsSection.tsx: Project showcases
- CustomSection.tsx: Custom user-defined sections
UI Components
components/ui/ contains reusable UI primitives:
- Button.tsx: Styled button component with icon support
- Card.tsx: Container component with optional title
- Input.tsx: Form input and textarea components
Top-Level Components
Components incomponents/ root:
- ExportButton.tsx: Exports resume data as JSON
- ImportButton.tsx: Imports resume data from JSON file
- SectionOrderEditor.tsx: Drag-and-drop section reordering (uses @dnd-kit)
- TemplateSelector.tsx: Template switching UI
- TemplateGenerator.tsx: Template creation utilities
Hooks Directory
hooks/ contains custom React hooks:
useResume.tsx
Lines: 337 The primary state management hook providing:ResumeProvider: Context provider componentuseResume(): Hook to access resume state and methods- CRUD operations for all resume sections
- LocalStorage persistence
- Template selection
useCustomTemplates.tsx
Manages custom template creation and storage:- Template generation from user styles
- Custom template persistence
- Template validation
Routes Directory
routes/ contains file-based route definitions for TanStack Router:
__root.tsx
Lines: 70 Root route component defining:- HTML document structure
- Meta tags and SEO
- Stylesheet links
- TanStack DevTools integration
- Global layout wrapper
index.tsx
Lines: 238 Main application route (/) containing:
ResumeProviderwrapper- Split-view layout (Editor + Preview)
- Responsive design with mobile modal
- Print optimization
- Export/Import buttons
Templates Directory
templates/ contains JSON configuration files defining resume visual styles:
classic.json
modern.json
Contemporary design with bold accents and modern typography.minimal.json
Clean, minimalist style with ample whitespace.You can add new templates by creating additional JSON files following this structure—no code changes required.
Data Directory
data/ contains static data and fixtures:
- demo.punk-songs.ts: Demo/example data (possibly for testing or showcasing)
Types Directory
types/ contains additional TypeScript definitions:
- template.ts: Template-specific type definitions and interfaces
types.ts for better organization.
File Naming Conventions
The codebase follows these naming patterns:Components
- PascalCase.tsx: React components (e.g.,
PersonalInfoForm.tsx) - One component per file
- File name matches component name
Hooks
- camelCase.tsx: Custom hooks prefixed with
use(e.g.,useResume.tsx) - Hook name matches file name
Routes
- kebab-case.tsx or __special.tsx: Route files
__root.tsx: Special root routeindex.tsx: Index route (/)
Types
- kebab-case.ts: Type definition files (e.g.,
template.ts) - May contain multiple related types
Configuration
- kebab-case.json: Configuration files (e.g.,
classic.json) - Lowercase with hyphens
Key Directories Explained
components/Editor/
components/Editor/
Contains all form components for editing resume data. Each component manages a specific section of the resume (personal info, experience, education, etc.) and uses the
useResume() hook to update state.Pattern: Form components accept no props—they read and write directly to context.components/ResumeRenderer/
components/ResumeRenderer/
The rendering engine that transforms resume data into formatted output. The
UniversalRenderer applies template configurations, while section components handle the presentation of each data type.Pattern: Renderer components accept data as props and apply styling based on the selected template.templates/
templates/
Template configuration files that define the visual appearance of resumes. Each template is a JSON file with theme, layout, and structure definitions.Pattern: Templates are data-driven—no code changes needed to add new templates.
routes/
routes/
File-based routing powered by TanStack Router. The
__root.tsx defines the document shell, while index.tsx contains the main application.Pattern: File structure maps to URL routes (e.g., routes/about.tsx → /about).Build Artifacts
These files are generated during build and should not be edited:routeTree.gen.ts: Generated route treedist/: Production build output (not in src/).vinxi/: Build cache (not in src/)
Import Patterns
Common import patterns throughout the codebase:Next Steps
Architecture
Understand the overall architecture
Tech Stack
Explore the technologies used

