Skip to content

Buyachaka/Full-stack-demo

Repository files navigation

Gamdom-Sports-Betting

Gamdom-Sports-Betting is a sports betting application

This repository provides a local development environment setup using Docker Compose, with a couple of commands to get the application up and running with hot-reload.

A quick video explanation of what the application does can be found


Prerequisites

Before running the application, ensure you have the following installed and running on your system:


Project Structure

  • frontend: React app located in the gamdom-sports-betting directory.
  • backend: Node.js app with Express located in the gamdom-sports-betting-backend directory.
  • db: PostgreSQL database running in a Docker container.

Docker Compose Configuration

File: docker-compose.yml

The app is configured using Docker Compose version 3.8. The configuration defines three services:

  1. Frontend

    • Runs the React app and serves it on http://localhost:5173.
    • Watches for file changes in the gamdom-sports-betting directory.
  2. Backend

    • Runs the Node.js Express API on http://localhost:3000.
    • Connects to the PostgreSQL database.
  3. Database

    • A PostgreSQL instance running on localhost:5432.
    • Uses environment variables for user, password, and database name.

Note:

  • Make sure that all 3 ports are not used in the system (3000, 5173, 5432)

Running the Application Locally

  1. Clone the Repository
    git clone https://github.com/Buyachaka/gamdom-fs-interview
    cd gamdom-sports-betting
    docker-compose build
    docker-compose up
    Access the frontend at http://localhost:5173
    Enter the following credentials to login:
     Username: admin
     Password: admin

Screenshots

  1. Login Page Screenshot

  2. Bet Pop-up Screenshot

  3. Bet Confirmed Screenshot

About

Code challenge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published