Buttonz is the standalone communication app for the GameForgeStudio ecosystem. It gives GameForgeStudio users a focused place to join shared channels, create chats, send messages, and keep community/team communication separate from the main platform hub.
This project is framed as professional progress: the current app demonstrates the core communication architecture, identity handoff, session flow, database-backed chat model, and full-stack implementation. It is intentionally kept separate from GameForgeStudio so it can evolve as its own product while still using GFS as the identity and navigation layer.
| Layer | Tools |
|---|---|
| Frontend | React 19, TypeScript, Vite, TanStack Query |
| UI | Tailwind CSS, Radix UI primitives, Lucide icons |
| Backend | Node.js, Express 5, TypeScript, Express sessions |
| Data | PostgreSQL, Drizzle ORM, postgres.js |
| Validation | Zod, drizzle-zod, shared TypeScript schemas |
| Build | Vite client build, tsx server runtime |
- Main GameForge channel created automatically for verified users.
- User-created group chats with membership checks.
- Message creation, editing, deletion, and paginated message reads.
- Chat list ordered by recent activity.
- User directory view for GameForgeStudio identities.
- Direct Buttonz login is disabled by design.
- Users are expected to sign in through GameForgeStudio first.
- Buttonz exchanges a short-lived GFS auth code through
GAMEFORGE_API_URLand creates a local Buttonz session. - Client requests use
credentials: "include"so session cookies are included with API calls. - The UI gets return-to-GameForgeStudio behavior from the Buttonz backend's
GAMEFORGE_PUBLIC_URLconfig.
Buttonz is not embedded inside GFS. It is a separate app that GFS launches externally, which keeps communication concerns isolated from the main platform while still preserving ecosystem continuity.
Buttonz uses a focused full-stack TypeScript structure:
client/ React app, Buttonz UI, hooks, query client, public logo assets
server/ Express server, auth/session flow, routes, storage layer, Vite integration
shared/ Drizzle table definitions, Zod insert schemas, shared app types
- React renders a single Buttonz app surface from
client/src/pages/buttonz.tsx. - TanStack Query manages server state for the current user, chats, messages, and users.
- Vite serves the frontend locally on port
5175and proxies/apirequests to the Buttonz backend. - Tailwind and Radix-based components provide a compact chat UI with accessible primitives.
- Express owns authentication code exchange, session creation, chat routes, message routes, and user lookup.
POST /api/auth/gfs-sessionexchanges a GFS-issued code before creating a Buttonz session.- Protected routes require a Buttonz session and chat membership where appropriate.
- Errors are returned through JSON responses with HTTP status codes.
usersstores GameForgeStudio-compatible identity/profile data used by Buttonz.chatsstores main and user-created chat channels.chatMembersconnects users to chats and stores chat roles.messagesstores text messages, timestamps, edit state, and optional replies.
npm installCopy .env.example to .env and fill in values for your local database and GameForgeStudio app.
DATABASE_URL=postgresql://username:password@host/database?sslmode=require
SESSION_SECRET=replace-with-a-long-random-secret
PORT=5001
GAMEFORGE_APP_ID=buttonz
GAMEFORGE_PUBLIC_URL=http://localhost:5173
GAMEFORGE_API_URL=http://localhost:5000
USE_VITE_MIDDLEWARE=falseButtonz expects a PostgreSQL database with the schema defined in shared/schema.ts. It also expects user records compatible with GameForgeStudio identities so GFS session verification can map to a Buttonz user.
For the most predictable development setup, run the backend and frontend separately:
npm run dev:server
npm run dev:clientThe Vite dev server runs on http://localhost:5175 and proxies API traffic to the backend on http://127.0.0.1:5001.
npm run check
npm run buildButtonz is active and in progress. The app currently demonstrates the standalone communication model, GFS session handoff, protected chat APIs, database-backed storage, and a dedicated chat-focused interface.
The next phase is focused on making the app more production-shaped: clearer deployment flow, stronger cross-app authentication strategy, more complete chat UX, and cleaner operational boundaries between Buttonz and GameForgeStudio.
- GameForgeStudio - central GameForgeStudio platform hub.
