Skip to content

🕹️ A web project where I make random stuff when I'm bored

Notifications You must be signed in to change notification settings

danexrc/dane.lol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dane.lol logo

A web project where I make random things when I'm bored.


🕹️ Projects

Viewguesser

Viewguesser is a higher-lower guessing game based on YouTube video views.

🚀 Features
  • Automatic pulling from YouTube's API (videos are cached for 12 hours)
  • Scoreboard functionality.
  • Easy score sharing on social media.
🪄 Details
The player is presented with two videos, one video on the left and a different video on the right. These will be different random videos pulled from YouTube. This uses the YouTube API to fetch videos using the backend API calls.

Each video will display the title, the name of the creator that made the video, the video's view count & the video's thumbnail in the background.

The view count of the first video will be displayed on the left. The video on the right will have two buttons, one for higher and one for lower. The player must guess if this video has higher or lower views than the video on the left.

Viewguesser example

Once the player has made their selection, the view count of the video will then be displayed. If correct, the video will then move to the left and a new video will be populated on the right. If incorrect, the game will end and a losing screen is displayed. The losing screen will change depending on the final score.

📦 Build

Website

The frontend website can be used on any web server by uploading the files, or run locally with something like Live Server.

Backend

Node.JS

  1. Clone the repository from GitHub:
git clone https://github.com/your-username/your-repository.git
  1. Navigate to the API directory
cd dane.lol/API
  1. Create a .env file
VIEWGUESSER_YOUTUBE_API_KEY=your-api-key # YouTube API key
DANE_LOL_PG_DATABASE_URL=postgresql://username:password@postgres:5432/database-name # PostgreSQL Connection String (scoreboard only)
VIEWGUESSER_SEARCH_QUERY_AMOUNT=40 #Amount of queries to run when collecting videos from API
  1. Install the required packages by running:
npm install
  1. Run the project
npm start

Docker

  1. Pull the image
docker pull ghcr.io/danexrc/danexrc/dane.lol:latest
  1. Start the container
docker run -d -p 3000:3000 --name dane.lol-api -e DANE_LOL_PG_DATABASE_URL=postgresql://username:password@postgres:5432/database-name VIEWGUESSER_YOUTUBE_API_KEY=your-api-key VIEWGUESSER_SEARCH_QUERY_AMOUNT=40 dane.lol:latest