A comprehensive full-stack application for managing bands, events, venues, and members. Built with modern technologies and deployed to production.
- Frontend: https://bandmanager.tcbarzyk.dev
 - Backend API: https://bandmanager.api.tcbarzyk.dev
 
- Create and manage multiple bands
 - Invite members with join codes
 - Role-based permissions (admin, member)
 - Band member management
 
- Schedule band performances and rehearsals
 - Track event details (date, time, description)
 - Link events to specific venues
 - Event CRUD operations for band members
 
- Create and manage performance venues
 - Store venue details (name, location, capacity)
 - Associate venues with events
 - Venue database for reuse across events
 
- Secure user authentication with Supabase
 - User profiles with customizable information
 - Multi-band membership support
 - Protected routes and API endpoints
 
- Framework: Next.js 14 with App Router
 - Language: TypeScript
 - Styling: Tailwind CSS
 - Authentication: Supabase Auth
 - HTTP Client: Fetch API
 - Deployment: Vercel
 
- Framework: FastAPI (Python)
 - Database: Supabase PostgreSQL with SQLAlchemy (Async)
 - Authentication: Supabase Auth + JWT
 - ORM: SQLAlchemy with Alembic migrations
 - API Documentation: Automatic OpenAPI/Swagger
 - Deployment: DigitalOcean Droplet with Nginx
 
- Frontend Hosting: Vercel
 - Backend Hosting: DigitalOcean
 - Database: Supabase (Managed PostgreSQL)
 - Authentication: Supabase Auth
 - CI/CD: GitHub Actions
 - SSL: Let's Encrypt
 - Reverse Proxy: Nginx
 
band-manager/
βββ .github/
β   βββ workflows/         # GitHub Actions CI/CD pipelines
βββ api/                    # FastAPI Backend
β   βββ main.py            # FastAPI application entry point
β   βββ models.py          # SQLAlchemy database models
β   βββ schemas.py         # Pydantic request/response schemas
β   βββ database.py        # Database connection and session management
β   βββ repository.py      # Database operations and business logic
β   βββ auth.py            # Authentication middleware and utilities
β   βββ alembic/           # Database migrations
β   βββ tests/             # API tests
β   βββ requirements.txt   # Python dependencies
βββ web/band-manager/      # Next.js Frontend
β   βββ app/               # Next.js app directory
β   β   βββ components/    # Reusable React components
β   β   βββ auth/          # Authentication pages
β   β   βββ bands/         # Band management pages
β   β   βββ dashboard/     # Dashboard pages
β   βββ contexts/          # React contexts (Auth)
β   βββ lib/               # Utilities and API client
β   βββ package.json       # Node.js dependencies
βββ docs/                  # Documentation
βββ infra/                 # Infrastructure configurations
βββ README.md              # This file
The API provides comprehensive endpoints for managing bands, events, venues, and users. Full documentation is available at:
- Development: 
http://localhost:8000/docs - Production: 
https://bandmanager.api.tcbarzyk.dev/docs 
GET /auth/me- Get current user profilePUT /auth/me- Update current user profile
POST /bands- Create a new bandGET /my/bands- Get current user's bandsGET /bands/{id}- Get band detailsPOST /bands/join/{code}- Join band with code
POST /bands/{id}/events- Create event for bandGET /bands/{id}/events- Get band eventsPUT /events/{id}- Update eventDELETE /events/{id}- Delete event
POST /bands/{id}/venues- Create venue for bandGET /bands/{id}/venues- Get band venuesPUT /venues/{id}- Update venueDELETE /venues/{id}- Delete venue
- JWT Authentication with Supabase
 - CORS Configuration for cross-origin requests
 - Input Validation with Pydantic schemas
 - SQL Injection Protection with SQLAlchemy ORM
 - Rate Limiting and security headers
 - HTTPS/SSL in production
 - Environment Variable protection
 
- Node.js 18+ and npm
 - Python 3.9+
 - Supabase account (for database and authentication)
 
# Supabase Database (get from Supabase dashboard)
DATABASE_URL=postgresql://postgres:[password]@[host]:[port]/postgres
# Supabase Authentication (get from Supabase dashboard)
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_anon_key
SUPABASE_JWT_SECRET=your_supabase_jwt_secretNEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
NEXT_PUBLIC_API_URL=http://localhost:8000git clone https://github.com/tcbarzyk/band-manager.git
cd band-managercd api
# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run database migrations
alembic upgrade head
# Start the development server
python main.py
# Or use uvicorn directly:
uvicorn main:app --reload --host 0.0.0.0 --port 8000The API will be available at http://localhost:8000
- API Documentation: 
http://localhost:8000/docs - Health Check: 
http://localhost:8000/health 
cd web/band-manager
# Install dependencies
npm install
# Start the development server
npm run devThe frontend will be available at http://localhost:3000
- Create a Supabase account
 - Create a new project
 - Go to Settings > Database to get your connection string
 - Go to Settings > API to get your project URL and anon key
 - Go to Settings > Auth to configure authentication providers
 
# Get these values from your Supabase dashboard:
# Settings > Database > Connection string (URI)
DATABASE_URL=postgresql://postgres:[password]@[host]:[port]/postgres
# Settings > API
SUPABASE_URL=https://[project-id].supabase.co
SUPABASE_KEY=[anon-key]
SUPABASE_JWT_SECRET=[jwt-secret]cd api
# The database tables will be created automatically via SQLAlchemy
alembic upgrade headThis project uses GitHub Actions for deployment automation.
- Frontend (Vercel): Automatic deployment on push to 
mainbranch via Vercel GitHub integration - Backend (DigitalOcean): Deployment using GitHub Actions for automated server updates
 
The CI/CD pipeline handles:
- Automated backend deployment to DigitalOcean droplet
 - Environment variable management
 - Service restarts and health checks
 
# Create DigitalOcean droplet (Ubuntu 22.04)
# SSH into your server
# Update system
sudo apt update && sudo apt upgrade -y
# Install Python and dependencies
sudo apt install python3 python3-pip python3-venv nginx postgresql-client -y
# Install Node.js (for any build tools)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs# Clone repository
git clone https://github.com/tcbarzyk/band-manager.git
cd band-manager/api
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Set environment variables
sudo nano /etc/environment
# Add your production environment variables
# Run migrations
alembic upgrade head# Install PM2
sudo npm install -g pm2
# Start application
pm2 start "uvicorn main:app --host 0.0.0.0 --port 8000" --name band-manager-api
# Save PM2 configuration
pm2 save
pm2 startupserver {
    server_name bandmanager.api.tcbarzyk.dev;
    # Security headers
    add_header X-Frame-Options "SAMEORIGIN" always;
    add_header X-XSS-Protection "1; mode=block" always;
    add_header X-Content-Type-Options "nosniff" always;
    # Proxy to FastAPI
    location / {
        proxy_pass http://localhost:8000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
    # Health check endpoint
    location /health {
        proxy_pass http://localhost:8000/health;
        access_log off;
    }
    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/bandmanager.api.tcbarzyk.dev/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/bandmanager.api.tcbarzyk.dev/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
    if ($host = bandmanager.api.tcbarzyk.dev) {
        return 301 https://$host$request_uri;
    }
    
    listen 80;
    server_name bandmanager.api.tcbarzyk.dev;
    return 404;
}# Install Certbot
sudo apt install certbot python3-certbot-nginx -y
# Get SSL certificate
sudo certbot --nginx -d bandmanager.api.tcbarzyk.devnpm install -g vercelcd web/band-manager
# Login to Vercel
vercel login
# Deploy
vercel --prod
# Configure environment variables in Vercel dashboard
# Set NEXT_PUBLIC_API_URL to your production API URL- Add your custom domain in Vercel dashboard
 - Configure DNS to point to Vercel
 
cd api
python -m pytest tests/ -vIf you encounter CORS errors in production:
- Ensure your frontend domain is in the CORS allowed origins
 - Check that credentials are properly configured
 - Verify no duplicate CORS headers from reverse proxy
 
# Test Supabase connection
# Go to Supabase dashboard > Settings > Database > Connection pooler
# Use the connection string provided there
# Verify environment variables
echo $DATABASE_URL
echo $SUPABASE_URL- Verify Supabase configuration
 - Check JWT secret matches between frontend and backend
 - Ensure cookies/tokens are properly set
 
- Mobile app (React Native)
 - Real-time notifications
 - Calendar integration
 - File upload for band photos
 - Payment integration for events
 - Analytics dashboard
 - Email notifications
 - Advanced reporting
 
- Fork the repository
 - Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
 
This project is licensed under the MIT License - see the LICENSE file for details.
Teddy Barzyk
- GitHub: @tcbarzyk
 - Website: tcbarzyk.dev
 
- FastAPI for the excellent Python web framework
 - Next.js for the powerful React framework
 - Supabase for authentication and database services
 - Vercel and DigitalOcean for hosting platforms
 - Github Copilot for assisting in debugging and feature implementation