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), 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 holds no slot with payment_status in paid/free, the trigger raises an exception (“School has not purchased slots for this opportunity”) and the application never commits.
  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.

Tutorial

Do it step by step#

One placement, end to end, across all three actors — the YESS super-admin who brokers, the partner company on a magic link, and the school whose students apply. Every screen below is a real route; click any chip to open it.

  1. 1

    Super-admin vets the partner company

    On /dashboard/internships/admin/companies click Add company, fill the partner's details, then Verify the card. Only verified companies can be issued a portal link.
  2. 2

    The company posts via its magic link

    The partner opens its revocable link at /c/[token]/post — no account, no password — fills the guided opportunity form, and clicks Submit for review. The opportunity lands moderation_status='pending', invisible to students.

    The token is the credential: 256 bits of entropy, prefixed yic_. Revoking the link bricks access instantly.

  3. 3

    Super-admin approves it in the queue

    On /dashboard/internships/admin/moderation open the Pending tab and click Approve (or bulk-approve a selection). Approval flips it to active so schools can see it; Request changes and Reject send feedback the company reads on its own list.
  4. 4

    Super-admin sells slots to a school

    On /dashboard/internships/admin/sell-slots click New sale, choose the opportunity and school, set the slot count, price, and payment status, then Confirm sale. This is the cross-tenant door — no purchased slot, no application.
  5. 5

    The school chooses how slots are allocated

    The school admin opens /dashboard/internships/settings and, per purchased slot, picks the allocation method — merit / first-come / student-paid / admin-assigned — then Save. Student-paid reveals a price field.
  6. 6

    Students browse and apply

    Students open /dashboard/internships, see only opportunities their school has paid slots for, open one, and click Apply now (or Pay and apply when the slot is student-paid) — uploading a resume URL and any required documents, then Submit application. The enforce_slot_purchase trigger raises an exception and blocks the insert if the school holds no paid/free slot.
  7. 7

    The company runs the lifecycle and closes the loop

    From the /c/[token]/applications list the partner opens a single application (/c/[token]/applications/[id]) to drive the state machine — under_review → interview_scheduled → offer_received — and, after the student accepts, submits the placement evaluation (outcome, score, document). Completion notifies the student and carries into their alumni profile.

Three actors, one source of truth — and every mint, approval, payment, and status change lands in audit_logs under internships.*

Where this connects

What makes this elite

  1. 1

    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. 2

    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. 3

    PII-safe by default

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

  4. 4

    Moderation is RLS-level

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

  5. 5

    Slot-purchase trigger is the federation door

    No slot, no application, full stop. enforce_slot_purchase() runs on every application INSERT and raises a precise exception ('School has not purchased slots for this opportunity') unless the school holds a slot with payment_status in paid/free, so the UI can show the student exactly what's missing.

  6. 6

    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. 7

    End-to-end audit

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

  8. 8

    Auto-housekeeping

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