HandbookBeyond school25b

Internships marketplace.

A two-way marketplace: YESS vets partner companies, companies post via revocable magic links, schools buy slots and choose allocation rules, students apply, and every placement closes with a supervisor evaluation.

  • 3actors
  • 5tables
  • 12surfaces
  • ≈9 minto read

The problem#

Schools want to send their students into real workplaces. Companies want trained interns from credible schools. Most platforms solve one side and force the other to live on email and LinkedIn. The friction compounds: companies post in fifty places, schools spam-spray applications nobody curated, and nobody knows which placements actually completed.

And when companies do get a portal in other systems, the price is a full user account inside the school's identity namespace — which the school's security team will never approve.

How YESS handles it#

YESS internships is a two-way curated marketplace where YESS is the broker. There are three actors and one source of truth.

  • YESS super-admin vets partner companies, posts platform-level opportunities, sells slots cross-tenant to subscriber schools, and moderates anything companies submit themselves.
  • Partner companies access their own portal via a magic link — no Supabase Auth account, no password, no user-namespace pollution. The link is the credential; revoking it bricks access immediately.
  • Schools purchase slots per opportunity, choose the allocation method (merit / first-come / student-paid / admin-assigned / hybrid), and review their students' applications. Students at a paid-in school browse, apply, accept or decline offers, and after the placement upload their reflection.

Moderation queue#

Every company-submitted opportunity lands in /dashboard/internships/admin/moderation. The YESS team gets a notification (fanout to every user holding internships.moderate) and reviews: title, description, requirements, slots, deadline, eligibility, company verification status, and token provenance.

Three actions: approve flips it to approved + sets status='active' so schools see it immediately; request changes returns it to the company with notes and keeps it hidden from students; reject kills it with feedback. Every action is captured in audit_logs under internships.opportunity.

Schools pay, students apply#

The cross-tenant economics:

  1. A school's admin browses approved opportunities and asks YESS to sell them slots, or YESS reaches out proactively.
  2. YESS super-admin executes useSellSlots() — inserts a row into school_opportunity_slots with a price per slot and a payment status (paid / free / pending).
  3. The school admin picks the allocation method from /dashboard/internships/settings. This is the lever for "make students pay" or "use slots as motivation reward."
  4. Students browse /dashboard/internships, see only opportunities their school has paid slots for, and apply. The enforce_slot_purchase() trigger validates eligibility on every application INSERT — if the school didn't pay, the application is rejected with 42501.
  5. Application flows through the company state machine, then into the placement lifecycle.

Complete it too#

Most platforms stop at "accepted." YESS marks the placement window, watches the company supervisor's evaluation come in, and closes the loop with a score, document, and notification.

After acceptance, the application carries:

  • placement_start_date and placement_end_date (scheduled window)
  • completion_status:not_startedin_progress (auto-set when status='accepted' and start_date has passed) → completed / terminated_early / no_show
  • supervisor_evaluation_score, supervisor_evaluation_url, supervisor_notes (submitted by the company)
  • student_reflection_url, student_reflection_notes (student uploads post-placement)
  • certificate_url, certificate_generated_at (school-issued, ties into the C12 certificate engine)

Completion fires another notification. The school sees who actually finished where. The student carries the evaluation document into their alumni profile when they graduate.

Where this connects

What makes this elite

  1. 01

    Magic-link portal, no user-namespace pollution

    Companies don't get auth.users rows. Instant revocation, forensic use_count + last_used_at per token, scope-gated RPCs. The same pattern works for any future external-partner integration.

  2. 02

    Cryptographic tokens

    256 bits of entropy via gen_random_bytes(32), prefixed yic_ for log distinguishability. Internal resolver checks revoke + expiry + scope on every call.

  3. 03

    PII-safe by default

    Company sees student name + school + country, never email / phone / address. Student PII never leaves the school's tenant.

  4. 04

    Moderation is RLS-level

    The public SELECT policy on internship_opportunities requires moderation_status='approved'. No UI workaround can bypass it.

  5. 05

    Slot-purchase trigger is the federation door

    No slot, no application, full stop. The trigger raises 42501 with a precise reason so the UI can show the student exactly what's missing.

  6. 06

    Lifecycle to completion

    Most platforms stop at 'accepted'. We mark 'completed' with a supervisor score and keep the record in the student's transcript.

  7. 07

    End-to-end audit

    Every token mint, revoke, opportunity state change, payment, and application transition lands in audit_logs under internships.*.

  8. 08

    Auto-housekeeping

    pg_cron sweeps daily at 03:15 UTC to mark expired tokens revoked. The UI status is always honest.