Skip to main content

Quick Start

Get Gully Sports running locally in under 10 minutes! This guide assumes you have basic development tools installed.

Prerequisites​

Before you begin, ensure you have:

  • Node.js 20+ installed (Download) — use .nvmrc with nvm use if you have nvm
  • npm package manager
  • Git for version control
  • Docker for local PostgreSQL (avoids Supabase free tier pausing)
  • A Supabase project (Create one) — auth only

Installation Steps​

1. Clone the Repository​

git clone https://github.com/your-org/gully-store-consumer-app.git
cd gully-store-consumer-app
nvm use # switches to Node 20 via .nvmrc

2. Install Dependencies​

npm install

This will install all required packages including:

  • Next.js 15
  • React 19
  • Prisma (ORM)
  • Tailwind CSS 4
  • Supabase client
  • Payment SDKs (Intuit & Square)

3. Set Up Environment Variables​

Create a .env file in the root directory:

cp .env.example .env

Add your configuration (minimum required):

# Local PostgreSQL (Docker)
DATABASE_URL="postgresql://postgres:postgres@localhost:54322/gullysports"
DIRECT_URL="postgresql://postgres:postgres@localhost:54322/gullysports"

# Authentication (Supabase — auth only)
NEXT_PUBLIC_SUPABASE_URL="https://your-project.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY="your-anon-key"

# Payment Provider Selection
NEXT_PUBLIC_PAYMENT_PROVIDER=square # or "intuit"
NEXT_PUBLIC_APP_ENVIRONMENT=sandbox # or "production"
tip

See the Environment Variables Guide for complete configuration options.

4. Start the Local Database​

Start a local PostgreSQL Docker container:

npm run db:start   # starts postgres:15 on port 54322

Apply migrations and seed sample data:

npx prisma migrate deploy
npx prisma db seed
View your data

Run npx prisma studio to open a browser-based DB viewer at http://localhost:5555

5. Run the Development Server​

npm run dev

Open http://localhost:3000 in your browser! 🎉

Verify Installation​

Check the Homepage​

  • Homepage should load with navigation
  • You should see "Gully Sports" branding
  • Navigation links should be visible

Test Authentication​

  1. Click "Sign In" in the navigation
  2. Create an account or sign in
  3. Verify you can see your profile

Access Admin Dashboard​

  1. Sign in to the app at least once so your User row is created.
  2. Promote yourself in the DB:
    UPDATE "User" SET role = 'ADMIN' WHERE email = 'you@example.com';
    (Or open npx prisma studio and edit the row.)
  3. Navigate to /admin — you should now see the admin dashboard.

Next Steps​

Now that you're running locally, here's what to do next:

Configure Your Payment Provider​

Choose between Intuit QuickBooks or Square and set up payment processing:

Set Up Product Images​

Configure Vercel Blob for product image uploads:

BLOB_READ_WRITE_TOKEN="your-vercel-blob-token"

See Product Images Feature for details.

Customize Your Business Info​

Update business information in your .env.local:

NEXT_PUBLIC_BUSINESS_NAME="Your Business Name"
NEXT_PUBLIC_CONTACT_EMAIL="contact@yourbusiness.com"
NEXT_PUBLIC_CONTACT_PHONE="+1 (555) 123-4567"
NEXT_PUBLIC_BUSINESS_LOCATION="Your City, State"
NEXT_PUBLIC_SITE_URL="https://yourdomain.com"

Explore Feature Flags​

Control which features are enabled:

# Enable lane rental features
NEXT_PUBLIC_ENABLE_LANE_RENTAL=true

# Switch payment provider
NEXT_PUBLIC_PAYMENT_PROVIDER=square

Learn more in the Feature Flags Guide.

Common Issues​

Database Connection Failed​

  • Make sure Docker is running and the container started: npm run db:start
  • Verify DATABASE_URL points to localhost:54322
  • Check the container is up: docker ps | grep gully-local-db

Authentication Not Working​

  • Verify your Supabase project URL and keys
  • Check that email confirmation is disabled (or set up SMTP)
  • Ensure redirect URLs are configured in Supabase dashboard

Admin Access Denied​

  • Confirm your User.role is 'ADMIN' in the database (run SELECT email, role FROM "User" to check)
  • Sign out and sign back in if you just changed the role
  • Verify you're signed in with the correct account

Getting Help​


Congratulations! 🎉 You now have Gully Sports running locally. Continue to the Installation Guide for more detailed information.