A robust backend system providing NFL game information synchronized with Ticketmaster's Discovery API.
The NFL Game Dashboard is a robust backend system that provides comprehensive game information synchronized with Ticketmaster's Discovery API. It offers a RESTful API for querying NFL game data and manages automated synchronization with external ticketing services.
To see an example of the project in action, you can view the demo video: View Project Demo
- 🚀 RESTful API for efficient querying of NFL game data
- 🔄 Automated synchronization with Ticketmaster API (every 12 hours)
- 🔍 Flexible filtering options for game queries
- 🐘 Scalable database architecture using PostgreSQL and Kysely ORM
- ⏰ Scheduled tasks for data updates using node-cron
- 🚦 Comprehensive error handling and logging
- 🐳 Dockerized development environment for consistent setup and testing
- 🟢 Node.js (v22.9.0): JavaScript runtime
- 🔷 TypeScript: Typed superset of JavaScript
- 🚂 Express: Web application framework
- 🐘 PostgreSQL: Relational database
- 🔑 Kysely: Type-safe SQL query builder
- 🦋 Flyway: Database migration tool
- ⏲️ node-cron: Task scheduler for periodic data synchronization
- 📝 Winston: Logging library
- 🧪 Vitest: Testing framework
- 🐳 Docker: Containerization for consistent environments
- 🐳 Docker and Docker Compose
-
📥 Clone the repository:
git clone https://github.com/edwinhern/nfl-game-dashboard.git cd nfl-game-dashboard
-
🔑 Set up environment variables:
- Copy
.env.template
to.env
- Update
.env
with necessary values, including your Ticketmaster API key
- Copy
-
🚀 Start the application using Docker Compose:
- This command initializes the PostgreSQL database, executes Flyway migrations, and launches the backend server.
docker-compose up --build
If you prefer to run the project without Docker:
- 🐘 Ensure you have a PostgreSQL instance running and accessible
- 🔗 Update the
DATABASE_URL
in.env
to point to your PostgreSQL instance - 📂 Navigate to the backend directory:
cd backend
- 📦 Install dependencies:
pnpm install
- 🏃♂️ Run the development server:
pnpm run dev
The system offers several endpoints for querying game data. Key examples include:
- 🏉
GET /api/games
: Retrieve a list of games with optional filters - 👥
GET /api/games/teams
: Get all teams - 🏟️
GET /api/games/stadiums
: Get all stadiums - 🔄
GET /api/sync/testSync
: Manually trigger a sync with Ticketmaster API
For a comprehensive list of endpoints and their usage, please consult the API documentation.
For more information on the backend development, see the Backend documentation.
For more information on api endpoint response format, see the API documentation.
The project uses PostgreSQL with Flyway for database migrations. Key details:
- 📊 Database name:
nfldb
- 👤 Default username:
postgres
- 🔑 Default password:
postgres
For more information on the database schema and management, see the Database documentation.
The system automatically synchronizes with Ticketmaster every 12 hours. This process ensures that:
- 🆕 New games are added to the database
- 🔄 Existing game information is updated
- 🚦 Game statuses are kept current
For manual synchronization, use the /api/sync/testSync
endpoint.
- 🚀 Implement caching for frequently accessed data
- 🛑 Add rate limiting to protect the API
- 🧪 Expand test coverage for edge cases
- 🔐 Implement auth permissions system
- 🔍 Add parameter validation for
api/games/
requests - 📄 Implement pagination for
api/games/
endpoint
For more detailed information about the system components, please refer to: