How brocodeadi/hackforge works
Purpose and Deployment
HackForge is a Windows-oriented Electron desktop workspace combining hackathon discovery with team project execution. The Electron shell owns application lifecycle, single-instance behavior, custom local protocol handling, and backend startup; the React SPA is the renderer; a local Node/Express service exposes domain APIs.
• electron/main.js
• electron/preload.js
• src/server.js
Renderer Entry and Workspace Boundary
The frontend is a Vite React application with a mode selector separating Fetcher and Manager experiences. Shared layout, identity/profile state, API access, and visual shell components provide cross-mode concerns rather than duplicating them per subsystem.
• frontend/src/main.jsx
• frontend/src/App.jsx
• frontend/src/shared/layout/ModeLayout.jsx
Discovery Ingestion Pipeline
The catalog pipeline obtains opportunities from Devpost, MLH, Hack Club, feeds, and HTML sources through adapter abstractions. It normalizes and validates source data, deduplicates records, then persists a catalog snapshot. This is the boundary between unreliable external source formats and the application’s canonical hackathon model.
• src/services/ingestion/IngestionEngine.js
• src/services/ingestion/adapters/BaseSourceAdapter.js
• src/services/ingestion/deduplicator.js
Catalog API and Discovery UI
Hackathon routes expose catalog search/filter/detail behavior to Fetcher pages. The UI presents exploration, saved opportunities, profile-driven discovery, and alerts; shared API and local saved-store utilities bridge renderer state to backend/profile-specific persistence.
• src/routes/hackathons.js
• frontend/src/fetcher/pages/ExplorePage.jsx
• frontend/src/shared/lib/api.js
Fit and Recommendation Engine
Recommendations score normalized hackathons against user skills, technology preferences, interests, experience, eligibility, and travel constraints. Semantic analysis/cache support richer matching while keeping recommendation computation behind a service boundary; recommendation routes are the HTTP-facing adapter.
• src/services/fit/HackathonFitEngine.js
• src/services/fit/SemanticAnalyzer.js
• src/routes/recommendations.js
Alerts and Change Detection
The notifications subsystem compares catalog changes, evaluates discovery/update/deadline rules against preferences, records notification events, and delivers through pluggable in-app or email providers. It is decoupled from ingestion through stored catalog state and notification-domain stores.
• src/services/notifications/AlertEngine.js
• src/services/notifications/RuleEvaluator.js
• src/services/notifications/providers/EmailNotificationProvider.js
Manager Domain and AI Planning
Manager APIs govern projects, members/roles, tasks, review transitions, and generated plans. Role authority (CAPTAIN, ADMIN, MEMBER) is enforced in domain services; the four-stage task flow supports review feedback. Plan generation uses OpenRouter when configured and deterministic templates otherwise, preserving generation provenance for the UI.
• src/routes/managerCore.js
• src/services/manager/taskFlowService.js
• src/services/manager/planGenerator.js
Persistence and External Dependencies
Application state is local JSON snapshot storage with repository/store abstractions and atomic-write intent. Material external dependencies are hackathon source websites/feeds, optional OpenRouter AI API, and optional email delivery; the desktop backend is launched locally rather than hosted infrastructure.
• src/services/storage/CatalogStore.js
• src/services/storage/HackathonRepository.js
• src/services/ai/OpenRouterProvider.js
Main entry points: api.js Renderer API client · AlertEngine.js Alert engine · HackathonFitEngine.js Fit engine · managerCore.js Manager API
Components 26
Desktop Runtime
- Electron shell · Owns lifecycle, local protocol, single-instance behavior, and backend startup.
electron/main.js - Preload bridge
electron/preload.js - Local Express API · Locally launched API host for discovery and manager domains.
src/server.js
React Renderer
- Vite entry
frontend/src/main.jsx - Workspace app · Selects Fetcher or Manager workspace mode.
frontend/src/App.jsx - Mode layout · Provides shared workspace layout and cross-mode shell concerns.
frontend/src/shared/layout/ModeLayout.jsx - Fetcher exploration · Explores catalog results and saved opportunities.
frontend/src/fetcher/pages/ExplorePage.jsx - Renderer API client
frontend/src/shared/lib/api.js
Discovery Backend
- Ingestion engine · Orchestrates canonical catalog ingestion from unreliable sources.
src/services/ingestion/IngestionEngine.js - Source adapters · Adapts Devpost, MLH, Hack Club, feeds, and HTML sources.
src/services/ingestion/adapters/BaseSourceAdapter.js - Catalog deduplicator · Removes duplicate normalized opportunity records.
src/services/ingestion/deduplicator.js - Catalog store · Persists catalog snapshots with atomic-write intent.
src/services/storage/CatalogStore.js - Hackathon repository · Provides canonical catalog access to domain consumers.
src/services/storage/HackathonRepository.js - Hackathon API · Exposes catalog search, filtering, and detail endpoints.
src/routes/hackathons.js - Fit engine · Scores opportunities against profile, eligibility, and travel constraints.
src/services/fit/HackathonFitEngine.js - Semantic analyzer · Provides cached semantic analysis for richer fit matching.
src/services/fit/SemanticAnalyzer.js - Recommendation API
src/routes/recommendations.js - Alert engine · Detects catalog changes and records or delivers eligible alerts.
src/services/notifications/AlertEngine.js - Alert rules · Evaluates discovery, update, and deadline rules against preferences.
src/services/notifications/RuleEvaluator.js - Email provider
src/services/notifications/providers/EmailNotificationProvider.js
Manager Backend
- Manager API · Governs projects, members, roles, tasks, reviews, and plans.
src/routes/managerCore.js - Task flow service · Enforces four-stage task and review-feedback transitions.
src/services/manager/taskFlowService.js - Plan generator · Uses OpenRouter when available and deterministic templates otherwise.
src/services/manager/planGenerator.js
External Dependencies
- OpenRouter API
src/services/ai/OpenRouterProvider.js - Hackathon sources
- Email delivery
Connections 26
- Electron shell → Local Express API: starts local backend
- Electron shell → Preload bridge: loads
- Preload bridge → Vite entry: bridges desktop APIs
- Vite entry → Workspace app: renders
- Workspace app → Mode layout: uses
- Mode layout → Fetcher exploration: hosts Fetcher mode
- Fetcher exploration → Renderer API client: queries through
- Renderer API client → Hackathon API: catalog HTTP
- Renderer API client → Recommendation API: recommendation HTTP
- Renderer API client → Manager API: manager HTTP
- Source adapters → Hackathon sources: fetches
- Ingestion engine → Source adapters: orchestrates
- Ingestion engine → Catalog deduplicator: normalizes and deduplicates
- Catalog deduplicator → Catalog store: writes snapshot
- Catalog store → Hackathon repository: backs
- Hackathon API → Hackathon repository: searches catalog
- Recommendation API → Fit engine: delegates
- Fit engine → Hackathon repository: scores catalog
- Fit engine → Semantic analyzer: enriches matching
- Alert engine → Catalog store: compares stored changes
- Alert engine → Alert rules: evaluates preferences
- Alert engine → Email provider: delivers alerts
- Email provider → Email delivery: sends
- Manager API → Task flow service: manages tasks and reviews
- Manager API → Plan generator: generates plans
- Plan generator → OpenRouter API: uses when configured