Simplest
Single-browser mode
Run only the web app with no Supabase variables. Games stay in that browser’s local storage, so there is no account system or cross-device sync.
- Requires
- Node.js 22+
- Start with
- npm run dev:app
Open source · MIT licensed
Mainpot can run privately in one browser, as a complete local stack, or as a shared deployment connected to infrastructure you control.
Self-hosting gives you control over where the application and game records live. It also makes you responsible for security, availability, backups, and upgrades when other people depend on the instance.
Choose a model
All three options use the same Mainpot interface. The difference is where data is stored and whether the game can synchronize across devices.
Simplest
Run only the web app with no Supabase variables. Games stay in that browser’s local storage, so there is no account system or cross-device sync.
Fully local
Run Mainpot with the bundled Supabase development stack for PostgreSQL, authentication, Realtime, and a local email inbox.
Shared instance
Host the Next.js application and connect it to a Supabase project you control for accounts, shared rooms, and live multi-device updates.
What runs where
Mainpot’s web layer renders the room and settlement workflow. Supabase provides shared persistence, identity, authorization, and live updates. Payment transfers stay outside the application.
In single-browser mode, local storage replaces the shared data layer. That is useful for a private test or one-device game, but it is not a server deployment.
Players
Phones and browsers
Mainpot
Next.js web application
Data layer
Supabase or local storage
Mainpot calculates who should pay whom. The actual payment happens separately using whatever method the table chooses.
Local quick start
The default development command starts both the application and its local Supabase services. The first run downloads the required container images and applies the database migrations.
git clone https://github.com/AnuragGowda/mainpot.git
cd mainpot
npm install
npm run devOn macOS, the project uses OrbStack. Other platforms can use a compatible Docker runtime. No hosted Supabase account is required for the local stack.
Production reality
Use a production Supabase project or a hardened PostgreSQL and Supabase deployment.
Apply the schema and migrations in order, then verify row-level security policies.
Serve the application over HTTPS and configure authentication redirects for its real domain.
Back up the database, monitor the health endpoint, and plan how updates will be applied.
Keep service-role credentials out of the browser and separate production from development.
Do not expose the bundled local Supabase development stack directly to the public internet.
Questions
Yes. Mainpot is published under the MIT License. You can inspect, run, modify, and deploy the source subject to that license.
Yes, in single-browser mode. Without Supabase environment variables, Mainpot stores game data in that browser’s local storage. That mode does not provide accounts, Realtime, or cross-device synchronization.
Docker is required for the bundled local Supabase stack. It is not required for single-browser mode, and a hosted deployment can use a managed Supabase project instead of local containers.
Yes. The repository includes a Node-based production service example. If other devices will connect, you are responsible for HTTPS, network access, authentication redirects, database security, backups, and updates.
No. Mainpot records the ledger and suggests settlement transfers. It does not hold funds, send money, or connect directly to a bank account.
No. The bundled Supabase stack is designed for local development. An internet-facing instance needs a production database, reviewed row-level security, HTTPS, backups, monitoring, and correctly configured authentication URLs.
Ready to inspect the stack?
Review the code, license, database migrations, and production checklist before deciding how you want to run Mainpot.