How bh-official/careercraftt works
CareerCraft is an authenticated, AI-assisted job-application workspace. Candidates provide a resume and job description, review match scores and requirement gaps, then generate tailored application and career-preparation material; sessions and application activity support follow-up. The graph separates analysis, generated guidance, and application tracking, with database and AI service layers. Some UI-to-route wiring and dashboard retrieval paths were not shown, so those links are left out or marked unverified rather than inferred.
Main entry points: AnalysisPage.jsx Analysis page · db.js PostgreSQL · AnalysisContext.jsx Analysis state · route.js Match analysis API
Components 32
Analysis workflow
- Analysis page
src/components/AnalysisPage.jsx - Analysis state
src/context/AnalysisContext.jsx - Resume and job inputs
src/components/FileUploader.jsx - Upload endpoint
src/app/api/upload/route.js - Match analysis API
src/app/api/analyze/route.js - Analysis results API
src/app/api/analysis-results/route.js - Match scores
src/components/ScoreCard.jsx - Requirement gaps
src/components/GapList.jsx
Generated guidance
- Cover letter API
src/app/api/cover-letter/route.js - Cover letter records
src/app/api/cover-letters/route.js - Cover letter editor
src/components/CoverLetterEditor.jsx - Optimization API
src/app/api/optimization/route.js - Optimization guidance
src/components/OptimizationTips.jsx - Interview API
src/app/api/interview/route.js - Interview preparation
src/components/InterviewPrep.jsx - Career API
src/app/api/career/route.js - Career development
src/components/CareerDevelopment.jsx
Applications and history
- Application dashboard
src/app/dashboard/page.js - Applications list
src/components/dashboard/ApplicationsSection.jsx - Activity history
src/components/dashboard/ApplicationsHistorySection.jsx - Applications API
src/app/api/applications/route.js - Session API
src/app/api/session/route.js - Sessions API
src/app/api/sessions/route.js - Application events API
src/app/api/application-events/route.js - Event recording
src/lib/applicationEvents.js
Data and integrations
- File parsing
src/lib/fileProcessing.js - AI generation
src/lib/aiService.js - OpenRouter
- Clerk authentication
- User provisioning
src/lib/ensureUserRecord.js - PostgreSQL
src/lib/db.js
Other components
- Candidate
Connections 42
- Candidate → Analysis page: provides inputs
- Analysis page → Resume and job inputs: renders
src/components/AnalysisPage.jsx - Analysis page → Analysis state: uses state
src/components/AnalysisPage.jsx - Analysis page → Match scores: renders
src/components/AnalysisPage.jsx - Analysis page → Requirement gaps: renders
src/components/AnalysisPage.jsx - Analysis state → Match analysis API: requests analysis
- Match analysis API → AI generation: runs analysis
src/app/api/analyze/route.js - Match analysis API → User provisioning: ensures user
src/app/api/analyze/route.js - Match analysis API → PostgreSQL: reads and writes
src/app/api/analyze/route.js - Match analysis API → Event recording: records activity
src/app/api/analyze/route.js - AI generation → OpenRouter: calls model API
src/lib/aiService.js - Candidate → Upload endpoint: uploads files
- Upload endpoint → File parsing: parses files
src/app/api/upload/route.js - Analysis state → Cover letter API: requests letter
- Analysis state → Optimization API: requests tips
- Analysis state → Interview API: requests prep
- Analysis state → Career API: requests guidance
- Cover letter API → AI generation: generates letter
src/app/api/cover-letter/route.js - Optimization API → AI generation: generates tips
src/app/api/optimization/route.js - Interview API → AI generation: generates prep
src/app/api/interview/route.js - Career API → AI generation: generates guidance
src/app/api/career/route.js - Analysis page → Cover letter editor: renders
src/components/AnalysisPage.jsx - Analysis page → Optimization guidance: renders
src/components/AnalysisPage.jsx - Analysis page → Interview preparation: renders
src/components/AnalysisPage.jsx - Analysis page → Career development: renders
src/components/AnalysisPage.jsx - Candidate → Application dashboard: tracks applications
- Application dashboard → Applications list: renders
src/app/dashboard/page.js - Application dashboard → Activity history: renders
src/app/dashboard/page.js - Applications API → PostgreSQL: reads and writes
src/app/api/applications/route.js - Session API → PostgreSQL: reads and writes
src/app/api/session/route.js - Sessions API → PostgreSQL: queries sessions
src/app/api/sessions/route.js - Application events API → PostgreSQL: queries events
src/app/api/application-events/route.js - Applications API → Event recording: records changes
src/app/api/applications/route.js - Session API → Event recording: records changes
src/app/api/session/route.js - Event recording → PostgreSQL: writes events
src/lib/applicationEvents.js - Applications API → Clerk authentication: checks identity
src/app/api/applications/route.js - Session API → Clerk authentication: checks identity
src/app/api/session/route.js - Match analysis API → Clerk authentication: checks identity
src/app/api/analyze/route.js - User provisioning → PostgreSQL: queries records
src/lib/ensureUserRecord.js - Analysis results API → PostgreSQL: reads and writes
src/app/api/analysis-results/route.js - Cover letter API → PostgreSQL: persists letters
src/app/api/cover-letter/route.js - Cover letter records → PostgreSQL: queries letters
src/app/api/cover-letters/route.js