Skip to content

Repository files navigation

FactorRush

FactorRush is an invite-only party game prototype inspired by the room flow of Gartic Phone, but focused on fast number challenges instead of drawing prompts.

This first pass ships two rough game modes:

  • Prime Factor Sprint: players race to break a target number into prime factors.
  • Decimal / Binary Blitz: players race to convert decimal to binary or binary back to decimal.
  • Mid-match joins enter as spectators and can take a player seat from the lobby later.

There is no database, no login, and no public matchmaking. Rooms live entirely in server memory and are shared by link.

Stack

  • Monorepo with npm workspaces
  • apps/web: Next.js App Router frontend
  • apps/server: Express + Socket.IO realtime server
  • packages/shared: shared types, challenge generation, validation, and scoring helpers

Quick Start

npm install
npm run dev

That starts:

  • the shared package in watch mode
  • the realtime server on http://localhost:3001
  • the web app on http://localhost:3000

Build

npm run build

To run the production server after building:

npm run start --workspace @factorrush/server
npm run start --workspace @factorrush/web

In the current setup, the Next frontend and Socket.IO server run as separate processes.

Dev Smoke Test

Run the dev servers first:

npm run dev

Then, in a second terminal:

npm run smoke:dev

The smoke test checks the realtime room flow:

  • room creation
  • player join
  • spectator join during a live match
  • game start
  • correct answer submission
  • round end

Current Prototype Rules

  • The host creates a room and shares the generated invite link.
  • Anyone with the link can join by entering a nickname.
  • If the match is already running, new arrivals join as spectators first.
  • The host chooses the mode, round count, and round timer in the lobby.
  • Every round generates one challenge for the whole room.
  • Correct answers score points, and earlier correct answers score more.
  • When the timer ends, or all connected players answer correctly, the round reveals the answer.
  • The host advances to the next round manually.

Notes

  • Room state is in-memory only, so rooms disappear when the server restarts.
  • Reconnect is supported in a rough way through local browser storage.
  • The gameplay rules are intentionally modular so scoring, round flow, and challenge generation can be refined later.
  • Local development still runs as separate Next.js and Socket.IO processes.
  • Production is currently served from the home server through Docker + Traefik.
  • By default, the frontend connects to the realtime server at http://localhost:3001.
  • You can override the frontend target with NEXT_PUBLIC_SERVER_URL.

Korean Developer Docs

  • Codebase guide: docs/architecture-ko.md
  • Socket API spec: docs/socket-api-ko.md
  • Oracle/systemd deployment guide: docs/deployment-github-actions-ko.md
  • Home server Docker deployment guide: docs/deployment-home-server-ko.md
  • Final operations handoff: docs/service-handoff-ko.md

About

a game for students who are not participating to lecture.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages