A Next.js web application that monitors ticket pricing and availability from VividSeats. This project works in conjunction with the ticket-tracker-monitor service to collect and visualize ticket data over time.
Ticket Tracker is a dashboard application that allows users to:
- Monitor multiple events on VividSeats
- Track ticket pricing trends over time
- View ticket availability changes
- Visualize data with interactive charts
This application consists of two main components:
- Frontend Dashboard (this repository): Next.js web interface for visualization and event management
- Data Collection Service (ticket-tracker-monitor): Background service that collects data from VividSeats API
- Users add events to monitor via the Settings page by providing a
venueIdandperformerId - The monitor service (separate repository) periodically fetches data from VividSeats API for tracked events
- Data is stored in MongoDB with timestamps for historical tracking
- The dashboard displays real-time charts showing price and ticket count trends
- Event Management: Add and remove events to monitor
- Real-time Charts: Interactive line charts showing price and ticket count trends using Recharts
- Event Selection: Dropdown search to select and view specific events
- Dark/Light Mode: Theme toggle support
- Responsive Design: Built with Tailwind CSS and Radix UI components
- Framework: Next.js 13 (App Router)
- Language: TypeScript
- Database: MongoDB (via Mongoose)
- UI Components: Radix UI
- Styling: Tailwind CSS
- Charts: Recharts
- State Management: React Hooks
src/app/
├── api/
│ ├── event/route.ts # API endpoints for event management (POST, GET, DELETE)
│ └── venue/route.ts # API endpoints for venue data (POST, GET)
├── components/
│ ├── add-event.tsx # Form to add new events to monitor
│ ├── remove-event.tsx # Form to remove events from monitoring
│ ├── event-table.tsx # Table displaying currently monitored events
│ ├── chart.tsx # Line chart component for visualizing data
│ ├── search.tsx # Event search/selection dropdown
│ └── ui/ # Reusable UI components (buttons, cards, etc.)
├── models/
│ ├── event.ts # Mongoose schema for events (performerId, venueId)
│ └── venue.ts # Mongoose schema for venue data (prices, counts, timestamps)
├── lib/
│ └── mongodb.ts # MongoDB connection utility
├── config/
│ └── site.ts # Site configuration
├── page.tsx # Home page with chart visualization
├── settings/
│ └── page.tsx # Settings page for event management
└── layout.tsx # Root layout with theme provider
Represents an event being monitored:
performerId: VividSeats performer IDvenueId: VividSeats venue ID (unique)
Stores historical ticket data:
id: Unique venue identifierartist: Performer namestadium: Venue namevividUrl: Link to VividSeats listingdate: Event date and timeticketCount: Array of ticket counts over timeminPrice: Array of minimum prices over timeupdated: Array of timestamps for each data point
- POST: Add a new event to monitor (requires
performerIdandvenueId) - GET: Retrieve all monitored events
- DELETE: Stop monitoring an event (requires
venueIdquery parameter)
- POST: Update venue data (called by monitor service)
- GET: Retrieve venue data
- With
idparameter: Get specific venue - Without parameter: Get all venues
- With
- Node.js (v16 or higher)
- MongoDB database
- The companion ticket-tracker-monitor service running
- Clone the repository:
git clone https://github.com/RightNxw/ticket-tracker.git
cd ticket-tracker- Install dependencies:
npm install- Set up environment variables:
Create a
.env.localfile in the root directory:
MONGODB_URI=your_mongodb_connection_string- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
- Navigate to the Settings page
- Enter the
venueIdandperformerIdfrom VividSeats- These can be found in VividSeats URLs:
vividseats.com/[performer]/[venue]-tickets-[venueId].html
- These can be found in VividSeats URLs:
- Click "Add" to start monitoring
- Go to the Home page
- Use the dropdown to select an event
- View the interactive chart showing:
- Red line: Minimum ticket price over time
- Blue line: Total ticket count over time
- Click the event title to open the VividSeats listing
- Go to the Settings page
- Enter the
venueIdof the event to stop monitoring - Click "Remove"
npm run dev- Start development servernpm run build- Build for productionnpm start- Start production servernpm run lint- Run ESLintnpm run lint:fix- Fix linting issuesnpm run typecheck- Run TypeScript type checkingnpm run format:write- Format code with Prettiernpm run format:check- Check code formatting
| Variable | Description | Required |
|---|---|---|
MONGODB_URI |
MongoDB connection string | Yes |
- ticket-tracker-monitor - Background service for collecting VividSeats data