Skip to content

blaster151/concert-tracker

Repository files navigation

Concert Tracker 🎀🎡

A comprehensive music discovery platform for tracking concert history, discovering new artists, and sharing musical memories with friends.

✨ Features

🎡 Core Functionality

  • Concert Tracking - Log every show you've attended
  • Smart Enrichment - Automatic setlist lookup, Spotify playlist generation
  • Photo Management - Upload and organize concert photos with Cloudinary
  • Social Features - Tag friends, share experiences, discover mutual connections

🎨 Advanced Features

  • Opener Discovery - Track bands you discovered as openers
  • Album Analysis - See which album was dominant at the time of each show
  • Photo Collages - AI-powered image collages from multiple sources
  • Artist Profiles - Dedicated pages for each artist with your concert history
  • Discovery Timeline - Visual journey from first opener to headliner

πŸ” Security & Performance

  • Secure API Architecture - All external API keys protected server-side
  • Authentication - JWT-based user authentication with password reset
  • Authorization - User ownership verification for all operations
  • Email Integration - SendGrid-powered invites and notifications

πŸš€ Quick Start

Prerequisites

  • Node.js 16+ and npm 8+
  • PostgreSQL database
  • External API keys (optional but recommended)

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/concert-tracker.git
    cd concert-tracker
  2. Install dependencies

    npm run install:all
  3. Set up environment variables

    # Copy example environment files
    cp backend/.env.example backend/.env
    cp frontend/.env.example frontend/.env
    
    # Edit with your configuration
    nano backend/.env
  4. Set up the database

    npm run db:generate
    npm run db:push
    npm run db:seed
  5. Start development servers

    npm run dev
  6. Open your browser

πŸ—οΈ Architecture

Backend (Node.js + Express)

backend/
β”œβ”€β”€ api/                    # Secure API modules
β”‚   β”œβ”€β”€ secureApi.ts       # Core secure service
β”‚   β”œβ”€β”€ emailApi.ts        # Email operations
β”‚   β”œβ”€β”€ spotifyApi.ts      # Spotify integration
β”‚   β”œβ”€β”€ cloudinaryApi.ts   # Image management
β”‚   └── externalApi.ts     # External API calls
β”œβ”€β”€ services/              # Business logic
β”œβ”€β”€ routes/                # API endpoints
β”œβ”€β”€ middleware/            # Auth & validation
└── prisma/               # Database schema

Frontend (React + TypeScript)

frontend/src/
β”œβ”€β”€ components/            # Reusable UI components
β”œβ”€β”€ pages/                # Page components
β”œβ”€β”€ api/                  # API client functions
β”œβ”€β”€ context/              # React context providers
β”œβ”€β”€ hooks/                # Custom React hooks
└── styles/               # CSS and styling

πŸ”§ Configuration

Required Environment Variables

Backend (.env)

# Database
DATABASE_URL="postgresql://username:password@localhost:5432/concert_tracker"

# JWT
JWT_SECRET="your-super-secret-jwt-key"

# Server
PORT=5000
FRONTEND_URL="http://localhost:3000"

# Email (SendGrid)
SENDGRID_API_KEY="your-sendgrid-api-key"
FROM_EMAIL="noreply@yourdomain.com"
FROM_NAME="Concert Tracker"

# Cloudinary
CLOUDINARY_CLOUD_NAME="your-cloud-name"
CLOUDINARY_API_KEY="your-api-key"
CLOUDINARY_API_SECRET="your-api-secret"

# External APIs
SPOTIFY_CLIENT_ID="your-spotify-client-id"
SPOTIFY_CLIENT_SECRET="your-spotify-client-secret"
SETLIST_FM_API_KEY="your-setlist-fm-api-key"
YOUTUBE_API_KEY="your-youtube-api-key"
UNSPLASH_API_KEY="your-unsplash-api-key"
LASTFM_API_KEY="your-lastfm-api-key"

Frontend (.env)

REACT_APP_API_URL="http://localhost:5000/api"
REACT_APP_CLOUDINARY_CLOUD_NAME="your-cloud-name"

πŸ“Š Database Schema

Core Models

  • User - User accounts and profiles
  • Concert - Concert records with enrichment data
  • Photo - Concert photos with Cloudinary integration
  • Comment - Threaded comments on concerts
  • Friendship - User relationships
  • ConcertTag - Friend tagging at concerts

Advanced Models

  • EmailLog - Email sending analytics
  • InviteToken - Secure invitation system
  • ConcertAttendee - Guest and friend tracking

πŸ” Security Features

API Key Protection

  • All external API keys stored server-side only
  • Secure token management and refresh
  • Input validation and sanitization
  • Rate limiting on external API calls

Authentication & Authorization

  • JWT-based user authentication
  • Password reset with email verification
  • User ownership verification for all operations
  • Admin-only endpoints for administrative functions

Data Security

  • Secure error handling without information leakage
  • CORS configuration for frontend domain
  • Environment variable protection
  • Database connection security

🎯 API Endpoints

Core Endpoints

  • GET/POST/PUT/DELETE /api/concerts - Concert management
  • POST /api/auth/register - User registration
  • POST /api/auth/login - User authentication
  • GET/POST /api/friends - Friend management

Secure API Endpoints

  • POST /api/email/send-invite - Send concert invites
  • POST /api/spotify/create-playlist - Create Spotify playlists
  • POST /api/cloudinary/upload-signature - Secure image uploads
  • GET /api/external/setlist/:artist/:date - Fetch setlist data

Advanced Endpoints

  • GET /api/opener-discovery - Opener discovery analysis
  • GET /api/discography/analysis/:concertId - Album analysis
  • GET /api/artist/:slug - Artist profile data
  • POST /api/collage/generate - Photo collage generation

πŸ§ͺ Testing

Run Tests

# All tests
npm test

# Backend tests only
npm run test:backend

# Frontend tests only
npm run test:frontend

Test Coverage

  • Backend service logic
  • API endpoint functionality
  • Frontend component rendering
  • User interaction flows

πŸš€ Deployment

Production Build

npm run build
npm start

Docker Deployment

docker build -t concert-tracker .
docker run -p 5000:5000 concert-tracker

Environment-Specific Configurations

  • Development: Local database, debug logging
  • Staging: Staging database, limited external API calls
  • Production: Production database, full external API integration

πŸ“± Features in Detail

Concert Tracking

  • Add concerts with artist, date, venue, and notes
  • Automatic enrichment from Setlist.fm
  • Spotify playlist generation
  • YouTube video search and embedding

Photo Management

  • Drag-and-drop photo uploads
  • Cloudinary cloud storage and transformations
  • Photo effects and editing
  • Smart photo collage generation

Social Features

  • Friend tagging at concerts
  • Courtesy email invitations
  • Shared concert discovery
  • Direct messaging between users

Discovery Features

  • Opener discovery tracking
  • Album discography analysis
  • Artist profile pages
  • Discovery timeline visualization

Analytics & Insights

  • Personal concert statistics
  • Top artists and venues
  • Yearly activity charts
  • Breakout statistics

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write tests for new features
  • Update documentation
  • Follow the existing code style

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Setlist.fm - Concert setlist data
  • Spotify - Music integration and playlists
  • Cloudinary - Image storage and transformations
  • SendGrid - Email delivery service
  • Unsplash - High-quality images
  • YouTube - Video content

πŸ“ž Support

🎡 Demo

Try the live demo: https://concert-tracker-demo.vercel.app

Demo Account:


Built with ❀️ for music lovers everywhere 🎀🎡✨

About

A comprehensive music discovery platform for tracking concert history, discovering new artists, and sharing musical memories with friends.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors