Skip to content
Nano-AIPublic

About

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Contributors Forks Stargazers Issues


mixr logo

mixr

The campus organizer you text. Say what you're into; it finds your people and plans the meetup.
Read the design spec »

Try it · View demo · Report bug · Request feature

Table of contents
  1. About the project
  2. Getting started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About the project

mixr cover

mixr is an iMessage agent for University of Washington students. You text it what you're into, in plain words. It finds people who'd click, gets you into events other students host, and learns from what you say yes to. There are no forms and no app to install: sign up at joinmixr.club, then everything happens over iMessage.

joinmixr.club landing page

The landing page plays a sample conversation, then asks for your number and hands you your own mixr line to text.

Features

  • iMessage agent on Photon Spectrum. Texts arrive over Photon's gRPC event stream; replies go out through a durable outbox with retries and dedupe.
  • Onboarding without the LLM. Consent (reply YES), then full name, then an @uw.edu email and a 6-digit code. The code arrives in a branded HTML email with a plain-text alternative.
  • Claude Haiku tool-calling agent. After verification the agent takes a braindump, keeps the profile current, finds people, hosts and joins events, and handles intros. Read-only tool calls in one turn run in parallel.
  • Hybrid matching. pgvector recall plus BM25, fused with reciprocal rank fusion, then a Claude rerank. Blocks and special requests are enforced in code before ranking.
  • Events. Students host events by text. mixr seeds a target profile with HyDE, drifts it toward the people who say yes (Rocchio), and invites in hidden rounds until the event fills.
  • UW campus events. A daily pull of UW's public calendar feed. Ask "anything going on this week?" and mixr adds the UW events that fit, ranked by what you asked or by your interests, one per line.
  • Add to Google Calendar. Joining an event, hosting one, or saying you're going to a UW event gets an "add it to your calendar" link with the title, time and place filled in.
  • Intros with double opt-in. A number is shared only when both people agree, and each side gets the other's contact card.
  • Native iMessage touches. mixr's contact card after verification, Share Name and Photo, confetti on a confirmed seat, tapbacks instead of filler replies, inline replies that thread, and a joinmixr.club link preview on HELP.
  • Per-person rate limit. 30 texts an hour. One notice, then quiet until the hour rolls over. STOP, START and HELP always work.
  • React dashboard. Act as any user, watch matching traces, see every profile on a 2D vector map, and fast-forward the demo clock.
  • Eval harness. npm run eval compares two revisions on retrieval, reply quality, latency and tokens.

(back to top)

Architecture

One Node 24 process on polarcrest with an embedded Postgres (PGlite + pgvector). Texts arrive over Photon's event stream; everything else runs in one server.

flowchart LR
    phone["iPhone, iMessage"] <--> photon["Photon Spectrum gRPC"]
    site["joinmixr.club on Vercel"] -->|POST /join| http
    photon <--> messaging
    subgraph server["Node server, src/server.ts :8787"]
        http["http: /join, /health, /dashboard"]
        messaging["messaging: pipeline, onboarding, STOP/START"]
        agent["agent: Claude tool loop"]
        matching["matching: hybrid recall + rerank"]
        events["events: HyDE, Rocchio, invite rounds"]
        jobs["jobs: rounds, closes, retries"]
        transport["transport: log + outbox"]
        db[("PGlite + pgvector")]
        messaging --> agent
        agent --> matching
        agent --> events
        events --> matching
        jobs --> events
        agent --> transport
        transport --> messaging
        matching --> db
        events --> db
        transport --> db
    end
    agent -.-> anthropic["Anthropic: Claude Haiku"]
    matching -.-> anthropic
    matching -.-> openai["OpenAI: text-embedding-3-large"]
    dash["Dashboard, React"] -->|/api| http
Loading

Under the hood: one Node process, one embedded Postgres

  • Two pools that never meet. Demo: the 50 seeded students plus numbers created in the dashboard, on a simulated clock you fast-forward; nothing is ever delivered. Real: people who joined through the website, on wall-clock time, delivered over iMessage.
  • Models. Claude claude-haiku-5-5 for the agent and the matching pipeline, with a daily cap (CLAUDE_DAILY_REQUEST_LIMIT, default 1000). OpenAI text-embedding-3-large for embeddings only, cached by text.
  • Code map. src/messaging/ (Photon, inbound pipeline, onboarding), src/agent/, src/matching/, src/events/, src/relay/ (intros), src/requirements/ (blocks and special requests), src/profiles/, src/transport/, src/jobs/, src/http/, src/db/. Outside src/: web/ (dashboard), landing/ (joinmixr.club), scripts/, deploy/, test/, fixtures/. The full map is in CONTRIBUTING.md.

(back to top)

Photon version (note for reviewers)

mixr is built on Photon 2.0 (Spectrum), the version the DubHacks Photon track requires ("must be built on Photon 2.0 and live on at least one Photon channel"). In the code:

  • spectrum-ts 12.11 with its iMessage provider: core.Spectrum({ projectId, projectSecret, providers: [imessage.config()] }) in src/messaging/photon.ts.
  • Sign-ups go through the Spectrum REST API (https://spectrum.photon.codes, project-scoped Basic auth) in src/messaging/photon-api.ts, which registers each number on the project's shared iMessage line.
  • Nothing uses the Photon 1.0 iMessage SDK directly or a 1.0 line's address and token.

The constraint we ran into: Photon 2.0 Free allows 10 registered users per project (Pro: 100). During the hackathon, Photon's sponsor team answered our "we need more than 10 people" question by offering a free month of a Photon 1.0 iMessage Pro line (promo code HACKWITHPHOTON). That offer applies to Photon 1.0, not 2.0, so we did not switch: moving to 1.0 would take mixr off the version the track is judged on. We stayed on 2.0 and kept the 10-user cap for the live pilot. The 50 demo students in the dashboard run in a separate pool that never sends a real text and uses no Photon slots.

If mixr needs more than 10 real users, the path is a Photon 2.0 Pro plan on the same project (no code change). A 1.0 Pro line is the fallback if 2.0 Pro isn't available: Spectrum's iMessage provider can also take a dedicated line's address and token, which would be a config change in src/messaging/photon.ts.

Privacy and consent

  • Opt-in only: people join through the site and text first. No directory scraping. (WELCOME_TEXT=on tries one welcome text right after a join, but Photon didn't deliver it to a number that hadn't texted the line in our test, so keep it off.)
  • Texts to other people use first names. A full name and phone number are shared only when both sides of an intro agree.
  • STOP is honored immediately and suppresses anything queued. START resumes.
  • A verified @uw.edu email proves inbox access, not enrollment. Codes are hashed, never stored or logged.
  • Blocks and special requests are enforced in code before ranking. No filtering by gender or protected traits.

(back to top)

Built with

  • TypeScript
  • Node.js
  • Hono
  • PGlite
  • pgvector
  • Anthropic Claude
  • OpenAI
  • Photon iMessage
  • React
  • Vite
  • Vitest
  • anime.js
  • WebGL
  • Vercel
  • Cloudflare

(back to top)

Getting started

You can run all of mixr on a laptop with no iMessage at all: TRANSPORT=sim keeps delivery inside the dashboard, and MIXR_FAKE=1 swaps in a fake LLM and fake embeddings so no keys are needed.

Prerequisites

  • Node 24 (see .nvmrc)
    nvm use
  • Python 3, only to serve the landing page locally
  • Optional keys, depending on what you want to run:
    • ANTHROPIC_API_KEY for the agent and the matching pipeline
    • OPENAI_API_KEY for embeddings
    • PROJECT_ID and PROJECT_SECRET for Photon iMessage (production only)
    • GMAIL_USER and GMAIL_APP_PASSWORD, or RESEND_API_KEY and EMAIL_FROM, for UW email codes

Installation

  1. Clone the repo
    git clone https://github.com/Nano-AI/mixr.git
    cd mixr
  2. Install the server and dashboard packages
    npm install && (cd web && npm install)
  3. Create your env file and set only what you need
    cp .env.example .env
    Setting What it does
    MIXR_FAKE=1 Fully offline: fake LLM and embeddings, no keys.
    TRANSPORT=sim Keep this locally (.env.example says photon). Nothing is delivered; you text as anyone from the dashboard.
    PIPELINE_LLM=off The agent stays on Claude; matching becomes vector-only.
    ANTHROPIC_MODEL, CLAUDE_DAILY_REQUEST_LIMIT Model for the agent and pipeline, and the hard daily cap on requests.
    EMBEDDING_MODEL, EMBEDDING_DIMS OpenAI embedding model and vector size.
    EMAIL_PROVIDER gmail or resend for verification codes.
    JOIN_ORIGINS CORS origins allowed to call POST /join.
    WELCOME_TEXT on = try to text first: one welcome (the opt-in ask) right after a website join. Off by default; didn't deliver on our Photon line.
    DEV_JOIN_NUMBER With TRANSPORT=sim, the number /join hands out.
    ADMIN_TOKEN Dashboard login. Optional locally, required in production.
    UW_CALENDAR Daily snapshot of UW's public events calendar into uw-calendar/ next to DB_DIR (on in production). discover_events shows real users the ones on now or in the next two weeks from the newest snapshot as campus_events (see "Campus events"); npm run import:uw-events loads them into the demo pool.
    PORT, HOST, DB_DIR, PUBLIC_URL, TZ Runtime settings.
  4. Seed the 50 demo students (embeddings only, cached by text; free with MIXR_FAKE=1)
    npm run seed
  5. Start the server and dashboard
    npm run dev   # server http://localhost:8787 + dashboard http://localhost:5173
  6. Optionally serve the landing page; add ?mock=ok to click through without a server
    python3 -m http.server -d landing 4321
  7. Run the tests, which are offline (fake LLM and embeddings, in-memory DB)
    npm test
    npm run typecheck
    (cd web && npx tsc --noEmit)

PGlite allows one process per database, so run npm run seed while npm run dev is stopped, or press Seed in the dashboard's top bar.

(back to top)

Usage

How it works: say what you're into, it finds your people and plans the meetup

Once someone is verified, they just text. "pickup soccer mostly, also need people to study for 332 with" becomes a profile. mixr finds people into the same thing, proposes a real time and a public campus place, and confirms once enough people say yes. Students can also host their own events by text, and mixr fills them.

How people join

  1. On joinmixr.club they enter their phone number. The server registers it with Photon (iMessage shared line), which assigns them their own mixr number.
  2. The site shows that number with a "text mixr" button and a contact card. They text first.
  3. Over iMessage: opt in with YES, then full name, then @uw.edu email, then the 6-digit code. After that the agent takes the braindump.
sequenceDiagram
    actor U as Student
    participant W as joinmixr.club
    participant S as mixr server
    participant P as Photon
    participant E as UW inbox
    U->>W: enters phone number
    W->>S: POST /join
    S->>P: register the number
    P-->>S: assigned mixr line
    S-->>W: mixr number
    W-->>U: number, text mixr button, contact card
    U->>P: texts mixr first
    P->>S: inbound text
    S-->>U: consent, reply YES
    U->>S: YES
    S-->>U: full name?
    U->>S: first and last name
    S-->>U: UW email?
    U->>S: [email protected]
    S->>E: branded email with a 6-digit code
    U->>S: code
    S-->>U: verified, mixr's contact card
    U->>S: braindump of interests
    S->>S: canonical profile + embedding
    S-->>U: matches, events, intros
Loading

Photon Free allows 10 registered users per project (Pro: 100). Every number entered on the site uses a slot, so don't test /join in production with throwaway numbers.

(back to top)

How matching works

Every person is one vector: the embedding of their canonical profile text. People searches and event invites go through the same pipeline.

flowchart TD
    q["Ask text + profile or event vector"] --> hf["Hard filters in SQL: blocks, STOP, snoozed, pool"]
    hf --> vec["pgvector cosine ranking"]
    hf --> bm["BM25 over profile text"]
    vec --> rrf["Reciprocal rank fusion"]
    bm --> rrf
    rrf --> top["Top 40"]
    top --> rr["Claude rerank + must/prefer rule checks"]
    rr --> people["People picks"]
    rr --> rounds["Event invite rounds"]
    rounds -->|"yes / no replies"| drift["Rocchio drift of the event vector"]
    drift --> q
Loading
  • Recall. pgvector cosine over active users, plus BM25 over the same rows when there is ask text, fused with RRF (k = 60). BM25 catches exact terms embeddings blur, like course numbers or ratings. It runs in process today; past about 10k users it should move to SQL full-text.
  • Hard filters. Blocks, people who texted STOP, snoozed users and the other pool are removed in SQL before ranking, so the reranker never sees them.
  • Rerank. Claude orders the top 40 and returns a pass/fail/unknown verdict for each special request. Code keeps only explicit passes on must rules and orders by prefer passes. With PIPELINE_LLM=off the vector order is used.
  • Events. The first round recalls on a HyDE target profile written from the event. Each later round recalls on the drifted vector plus an exploration buffer on the original, sizes itself from the observed yes-rate, and stops an hour before start.

(back to top)

Campus events

Source: UW's public "UW Seattle Campus Events" iCalendar feed (https://www.trumba.com/calendars/sea_campus.ics, the same one its Subscribe page offers). With UW_CALENDAR on, the server pulls it once a day and saves a dated, PII-scrubbed copy in uw-calendar/. Searches read the newest copy and never hit UW live.

  • What counts. Events on right now or starting in the next 14 days, including all-day and multi-day ones (a weekend hackathon). Closures, deadlines, staff trainings and online-only events are left out. One per title, so a weekly series shows once.
  • Ranking. With an ask ("any hackathons?"), the embedding ranking is fused (RRF) with BM25 over title and description, counting only words rare in the feed. With no ask, events are ranked against the student's profile embedding; with no profile, soonest first. Up to 8 go to the agent, which mentions the ones that fit.
  • No RSVPs. mixr doesn't host UW's events, so it gives the details link and, if they're going, a Google Calendar link. Demo users get these as imported demo-pool events instead (npm run import:uw-events).

(back to top)

The dashboard

At /dashboard (login with ADMIN_TOKEN). Tabs for events, users, traces and a 2D map of every profile vector. You can open a phone pane and act as any user, inspect each matching step, and fast-forward the demo clock. Acting as a real user keeps mixr's replies to them in the dashboard and sends nothing to their phone; everything else is real. POST /api/admin/send sends an operator message to one real user and returns the delivery record.

Scripts

Command What it does
npm run dev Server with reload plus the dashboard dev server.
npm start Production server.
npm run seed Seed the 50 demo students from fixtures/seed-users.json.
npm run import:uw-events Load upcoming UW calendar events into the demo pool as events hosted by a demo "UW Events" user.
scripts/demo/clip.sh <raw> <name> Trim a screen recording into a deck clip (mp4, webm, poster). The deck itself is in demo/deck/ (see its README).
npm run eval -- --base origin/main --head HEAD Check out both revisions into temporary worktrees, run each against its own throwaway DB, and write a before/after report on retrieval, reply quality, latency and tokens to scripts/eval/out/report.md. Keys come from .env.eval, never .env; --offline uses fakes.
node --import tsx scripts/reset-real.ts --yes Delete every real user from the DB and every registration on the Photon project. Demo users stay. Stop the server first.
node --import tsx scripts/delete-user.ts +15555550123 --yes Delete one real user and their data from the DB. Photon is untouched. Stop the server first.

Deploy

Merging to main deploys it. Every 2 minutes mixr-autodeploy.timer on polarcrest checks main for a new commit, runs the tests, typecheck and dashboard build on the box, and only then switches releases and restarts. If /health doesn't answer within 45s it goes back to the previous release. A failing commit never goes live. CI (.github/workflows/ci.yml) runs the same checks on every PR. Vercel deploys landing/ from main to joinmixr.club.

scripts/deploy.sh               # deploy main now (also installs/updates auto-deploy)
scripts/deploy.sh integration   # another branch; auto-deploy leaves it up until main gets a new commit
scripts/deploy.sh --rollback    # previous release; auto-deploy waits for the next commit on main
FORCE=1 scripts/deploy.sh       # rebuild a live commit or retry a failed one
  • Releases. deploy/release.sh builds tarball releases in ~/mixr-releases (3 kept); ~/mixr points at the live one. History: ~/mixr-data/deploys.log. Pause auto-deploy with touch ~/mixr-data/autodeploy.paused.
  • systemd. User service mixr (deploy/mixr.service): Restart=always, starts at boot (lingering), 4 GB cap. mixr-health.timer restarts it if /health fails twice.
  • Data and secrets. Secrets in ~/mixr-data/mixr.env (mode 600, never in git). Database in ~/mixr-data/pglite. Nightly snapshots in ~/mixr-data/backups (7 kept). Deploys never touch ~/mixr-data.
  • Logs. journalctl --user -u mixr -f, and journalctl --user -u mixr-autodeploy for auto-deploy.
  • Public URL. https://api.joinmixr.club, a Cloudflare for SaaS custom hostname that routes through the Cloudflare tunnel to localhost:8787.
  • Later. Railway is an option (docs/deploy/railway.md); today it's the monolith.
  • Schema changes stay additive. A rollback runs older code on the same database.

(back to top)

Roadmap

  • iMessage over Photon Spectrum, with a durable outbox, retries and dedupe
  • Website signup that assigns each person their own mixr line
  • Onboarding: consent, full name, @uw.edu email code
  • Branded HTML verification email
  • Claude Haiku tool-calling agent with a daily request cap
  • Hybrid matching: pgvector + BM25, RRF, Claude rerank
  • Blocks and special requests enforced before ranking
  • Hosted events with HyDE seeding, Rocchio drift and hidden invite rounds
  • Intros with double opt-in and contact cards
  • Native iMessage touches: contact cards, confetti, tapbacks, link previews, inline replies
  • Per-person rate limit of 30 texts an hour
  • React dashboard with traces and a vector map
  • npm run eval before/after harness
  • Auto-deploy from main with tests as the gate and automatic rollback
  • UW campus calendar: daily pull, archive, and campus events in search
  • Add-to-Google-Calendar links
  • Resend sending domain for verification email
  • Polls
  • Rolling conversation summaries for long-time users
  • Photon 2.0 Pro plan to go past 10 real users (see "Photon version" above)
  • BM25 at scale: SQL full-text past about 10k users
  • Test verification email delivery to Outlook inboxes
  • Live multi-phone run-through
  • Apple Calendar (.ics) links for iPhone
  • Voice braindumps
  • Native group chats for confirmed events

See the open issues for the full list of proposed features and known issues.

(back to top)

Contributing

Contributions are welcome. main deploys itself to production, so every change goes through a pull request.

  1. Branch off main (git checkout -b feature/your-change)
  2. Make your change. Keep tests offline: never call real Claude, OpenAI or Photon from a test; use MIXR_FAKE and injected fetches.
  3. Run npm test, npm run typecheck and (cd web && npx tsc --noEmit)
  4. Commit and push your branch (git push origin feature/your-change)
  5. Open a pull request. CI must pass.
  6. Once merged, polarcrest picks up the new commit on main within about 2 minutes, runs the checks on the box and goes live, or rolls back if /health fails.

Never commit secrets, and keep schema changes additive. The full workflow and ops cheatsheet are in CONTRIBUTING.md.

Top contributors

contrib.rocks image

(back to top)

License

No license yet; all rights reserved by the authors.

(back to top)

Contact

mixr team: [email protected]

Website: https://joinmixr.club

Project link: https://github.com/Nano-AI/mixr

(back to top)

Acknowledgments

(back to top)

About

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages