Spaces:
Build error
Build error
| title: Matching Tool | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: docker | |
| pinned: false | |
| # Staffinc Client-Fit Matching & Briefing Tool MVP | |
| This is a full-stack monorepo MVP built to optimize Staffinc's recruitment funnel and B2B client conversion rate. | |
| ## π Problem Context | |
| Staffinc candidates pass internal recruiter screenings but historically face a low client-stage interview acceptance rate of **~25% (1 out of 4)**. Rejection reasons are typically subjective (e.g., "didn't show up well," "communication vibe mismatch"). | |
| This B2B tool: | |
| 1. **Profiles Clients by Vibe**: Standardizes expectations into "Consulting/Corporate" or "Startup/Scrappy" archetypes with minimum competency thresholds (using the Behavioral Anchored Rating Scale, BARS). | |
| 2. **Standardizes Vetting**: Recruiters score candidates (1-5) against these specific client thresholds with live behavioral guidance to remove subjectivity. | |
| 3. **Automates Coaching Briefs**: Instantly generates a printable candidate prep guide mapping gaps, practice questions, and tailored coaching tips. | |
| 4. **Logs Outcomes**: Closes the feedback loop by recording final decisions and updating live conversion analytics. | |
| --- | |
| ## π οΈ Tech Stack | |
| - **Backend**: FastAPI (Python 3.11) + SQLAlchemy + SQLite | |
| - **Frontend**: React + Vite + Vanilla CSS | |
| - **Data Generation**: Faker (for mock analytics & sandbox seeding) | |
| --- | |
| ## π Project Structure | |
| ```text | |
| staffinc/ | |
| βββ backend/ | |
| β βββ app/ | |
| β β βββ database.py # SQLite connection and session local | |
| β β βββ models.py # SQLAlchemy ORM models (Client, Candidate, Score, Feedback) | |
| β β βββ schemas.py # Pydantic v2 validation schemas | |
| β β βββ crud.py # Database CRUD & mismatch checking | |
| β β βββ seed.py # Static BARS questions and default anchors | |
| β β βββ seed_dummy.py # Script to generate realistic mock data | |
| β β βββ brief_generator.py# Gap analysis and strategy brief builder | |
| β β βββ main.py # REST endpoints and static file mount | |
| β βββ requirements.txt | |
| βββ frontend/ | |
| β βββ src/ | |
| β β βββ components/ # Shared UI (Navbar, ScoreSlider, MismatchAlert) | |
| β β βββ pages/ # Page templates (ClientSetup, CandidateScoring, BriefPreview, FeedbackForm) | |
| β β βββ App.jsx # Client router | |
| β β βββ main.jsx # React entry point | |
| β βββ package.json | |
| β βββ vite.config.js | |
| βββ README.md | |
| ``` | |
| --- | |
| ## π Getting Started | |
| ### 1. Environment Setup | |
| Make sure you have Anaconda or Miniconda installed, then create and activate the environment: | |
| ```bash | |
| # Create the conda environment | |
| conda create -n daftar-kerja python=3.11 -y | |
| # Activate the environment | |
| conda activate daftar-kerja | |
| ``` | |
| ### 2. Backend Installation & Seeding | |
| ```bash | |
| # Navigate to backend | |
| cd backend | |
| # Install dependencies | |
| pip install -r requirements.txt | |
| pip install faker | |
| # Seed the database with realistic dummy data | |
| python -m app.seed_dummy | |
| ``` | |
| ### 3. Frontend Installation | |
| ```bash | |
| # Navigate to frontend (from project root) | |
| cd ../frontend | |
| # Install node dependencies | |
| npm install | |
| ``` | |
| --- | |
| ## π» Running the Application | |
| ### Option A: Unified Service (Production Build) | |
| Build the React frontend assets, and let FastAPI serve both the API and the static site: | |
| ```bash | |
| # 1. Build frontend (generates frontend/dist/) | |
| cd frontend | |
| npm run build | |
| # 2. Run backend (serves API and front-end on http://127.0.0.1:8000) | |
| cd ../backend | |
| uvicorn app.main:app --host 127.0.0.1 --port 8000 | |
| ``` | |
| ### Option B: Split Development Server | |
| Run Vite's dev server with Hot Module Replacement alongside the FastAPI dev server: | |
| ```bash | |
| # Run backend (dev reload) | |
| cd backend | |
| uvicorn app.main:app --host 127.0.0.1 --port 8000 --reload | |
| # Run frontend dev server (in a separate terminal) | |
| cd frontend | |
| npm run dev | |
| ``` | |
| *(Vite is configured to automatically proxy `/api` calls to the backend running at port 8000).* | |
| --- | |
| ## π§ͺ E2E Verification Script | |
| To test the full B2B matching and briefing cycle programmatically, run: | |
| ```bash | |
| python -m urllib.request -e http://127.0.0.1:8000/api/stats | |
| ``` | |
| Or use our custom verification test script: | |
| ```bash | |
| # Verify client creation, vetting, brief generation, and dashboard logging | |
| python -m app.verify_e2e | |
| ``` | |