This is a lightweight browser app for setting up a football squad, arranging players on a field, and exporting a lineup image.
- Lets you enter a team name and squad list
- Lets you choose how many players are on the field
- Includes recommended formation options for common small-sided formats, including 9-a-side
- Supports adding custom formations as long as they match the selected player count
- Shows a dedicated management screen with players laid out on a football field
- Lets you move and swap players between field positions and the bench
- Lets you change formation while keeping the squad loaded
- Supports clipboard image copy where the browser allows it
- Includes a feedback form that can email thoughts to the TeamPro inbox
- Saves the latest team setup in local storage so the board persists between refreshes
index.htmlcontains the two-page app shellstyles.csscontains the football field layout and responsive stylingapp.jscontains the team configuration, lineup management, and image export logicserver.jsserves the static appapi/config.jsexposes the public Supabase runtime config for Vercel deploymentsapi/feedback.jssends feedback emails from the Account pagepublic-config.jsis the generated public runtime config consumed by the browserbuild-config.jswrites the public Supabase config file during Vercel buildssupabase-schema.sqlcontains the database schema and public RLS policies for Supabase
npm startThen open http://localhost:3000.
- Create a Supabase project.
- In the Supabase dashboard, open the SQL editor.
- Run the full contents of
supabase-schema.sql. - Copy your project URL and anon key.
Important:
SUPABASE_ANON_KEYis safe to expose to the browser.- Never use the Supabase
service_rolekey in frontend code. - This app uses Supabase as a public database client only. It does not use Supabase Auth.
Local environment variables:
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_ANON_KEY=your-public-anon-key
OPENAI_API_KEY=replace-with-a-new-server-side-openai-key
RESEND_API_KEY=re_xxxxxxxxx
RESEND_FROM_EMAIL=TeamPro <onboarding@resend.dev>
PORT=3000This project is now structured to be pushed to GitHub as a normal repository.
- Create a new empty repository on GitHub.
- In this project folder, run:
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin <your-github-repo-url>
git push -u origin main- If you want to share it publicly in a browser, deploy it after pushing to GitHub using GitHub Pages, Netlify, or Vercel.
This project is ready to deploy on Vercel as:
- static files from the project root
- one Node function at
api/config.js - one generated public config file at
public-config.js
- Push the latest code to GitHub.
- In Vercel, click
Add New->Project. - Import
BrendonJM/Football-App. - Keep the default project settings.
Recommended settings:
- Framework Preset:
Other - Root Directory: project root
- Build Command:
npm run build - Output Directory: leave empty
- Add these environment variables in Vercel Project Settings -> Environment Variables:
SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_ANON_KEY=your-public-anon-key
OPENAI_API_KEY=replace-with-a-new-server-side-openai-key
RESEND_API_KEY=re_xxxxxxxxx
RESEND_FROM_EMAIL=TeamPro <onboarding@resend.dev>- Deploy the project.
- After deploy, open the live URL and confirm:
/public-config.jscontains your Supabase URL and anon key values/api/configreturns your Supabase public config- teams can be created and switched
- a page refresh still shows the same saved teams
If the app shows a Supabase connection warning:
- Open
/public-config.json the deployed site. It should contain real values, not blank strings. - Open
/api/config. It should return JSON with non-emptysupabaseUrlandsupabaseAnonKey. - In Supabase, confirm:
supabase-schema.sqlhas been run successfully- the
teamstable exists - the public RLS policies from
supabase-schema.sqlwere created
- If the schema changed after an earlier deploy, redeploy on Vercel after updating env vars.
If you prefer CLI:
vercelOr from anywhere:
vercel --cwd "/Users/brendonmoore/Documents/New project"Then add the same environment variables in Vercel and redeploy if needed.
- Team data is currently stored in browser
localStorage, so saved teams are local to each user's device. - Team data is now synced to Supabase when the Supabase environment variables are configured. The browser still keeps a local cached copy for resilience.
- The app does not use Supabase authentication. It reads and writes directly to the
teamstable using the public anon key. - Image copy may not work from
file://or restricted in-app browsers. Running fromhttp://localhostor a hostedhttps://site is more reliable.
- Save multiple teams instead of a single local roster.
- Add named positional templates like left wing or centre back.
- Add match-day notes, captains, and substitutes rotation tracking.
- Add a printable PDF team sheet layout.