Setup Instructions

GitHub

Follow these steps to set up your own FIRST TeamMatch instance for your state or region.

Prerequisites

  • • Node.js 18+ and npm
  • • A Firebase account (free tier works)
  • • A GitHub account (for cloning the repository)
  • • Basic knowledge of command line and web development

1Clone and Install

Clone the repository and install dependencies:

$ git clone https://github.com/your-org/first-teammatch.git
$ cd first-teammatch
$ npm install

2Configure Your Instance

Copy the environment template and customize it:

$ cp env-template.txt .env.local

Open .env.local and customize the following:

# State/Region Information
NEXT_PUBLIC_STATE_NAME=YourState
NEXT_PUBLIC_STATE_ABBREVIATION=XX
NEXT_PUBLIC_REGION_NAME=YourState
# Organization Information
NEXT_PUBLIC_ORG_NAME=Your Team Name
NEXT_PUBLIC_ORG_LOCATION=City, State
NEXT_PUBLIC_ORG_WEBSITE=https://your-team-website.org
NEXT_PUBLIC_ORG_EMAIL=your-email@example.com
# Contact & Branding
NEXT_PUBLIC_CONTACT_EMAIL=your-email@example.com
NEXT_PUBLIC_APP_NAME=FIRST TeamMatch YourState
NEXT_PUBLIC_APP_DESCRIPTION=Connecting students...

3Set Up Database

Create Firebase Project

  1. Go to Firebase Console
  2. Click "Add project" and enter a project name
  3. Follow the setup wizard (Google Analytics is optional)

Enable Authentication

  1. Go to Authentication → Get started
  2. Click Sign-in method tab
  3. Enable Email/Password provider
  4. Click Save

Create Firestore Database

  1. Go to Firestore Database → Create database
  2. Choose Start in production mode
  3. Select a location closest to your users
  4. Click Enable
  5. Go to Rules tab, replace with rules from firestore.rules in this repository, click Publish

Set Up Firebase Storage

  1. Go to Storage → Get started
  2. Choose Start in production mode
  3. Use the same location as your Firestore database
  4. Click Done
  5. Go to Rules tab, replace with rules from storage.rules in this repository, click Publish

Get Firebase Configuration

  1. Go to Project Settings (gear icon) → Your apps
  2. Click the Web icon to add a web app
  3. Register your app (nickname is optional)
  4. Copy the Firebase configuration values
  5. Add them to your .env.local file
NEXT_PUBLIC_FIREBASE_API_KEY=your-api-key-here
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project-id.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id
NEXT_PUBLIC_FIREBASE_APP_ID=your-app-id

4Test Locally

Start the development server:

$ npm run dev

Open http://localhost:3000 in your browser. You should see your customized homepage.

5Create Your First Admin Account

  1. Register a new team account through the app (use "I'm a Team" button)
  2. Use the admin management script to promote them to admin:
    $ npm run manage:admins -- add your-email@example.com

Or manually in Firebase Console: Go to Firestore Database, create a document in the admins collection with the user's UID as the document ID, and add an email field.

6Deploy Your Instance

Deploy to Vercel (Recommended)

  1. Push your code to GitHub
  2. Go to Vercel and sign in with GitHub
  3. Click "Add New Project" and import your repository
  4. Add ALL environment variables from your .env.local file
  5. Click "Deploy"

Other Deployment Options

The app can be deployed to any platform that supports Next.js:

  • AWS Amplify
  • Netlify
  • Railway
  • Your own server (build with npm run build and run with npm start)

Security Checklist

Click each item to check it off as you complete it. (This checklist resets when you reload the page.)

  • Firestore security rules are published
  • Storage security rules are published
  • Admin accounts are properly set up
  • Environment variables are set in production
  • Firebase Authentication is enabled
  • You've tested the registration flow
  • You've tested the admin dashboard

Need Help?

For questions or issues, contact the original developers:

Email