Giter Club home page Giter Club logo

pixel-shelf's Introduction

Pixel Shelf

Pixel Shelf is a web server that can be used to track and organize your video game collection. With rich metadata, you can see all the details about a particular game in your collection at a glance, including cost breakdown, game progress, and the condition of the physical copy.

Pixel Shelf's library entry page

Prerequisites

  • NPM and Node.js
  • SQLite3
  • Node-Sass
  • IGDB API Access Credentials

Installation

Docker

The provided Dockerfile will allow you to run Pixel Shelf in a container. Note that you will still need to provide your own IGDB credentials, Apple Maps key, and game rating icons for full functionality.

docker build -t pixel-shelf . && docker run -p 0.0.0.0:3000:3000 pixel-shelf

Once running, your instance will be accessible on your localhost at port 3000 by default. Navigate to it in your web browser of choice.

http://localhost:3000

Manual

  1. Clone or fork the repository
  2. Run npm install
  3. In the project folder, initialize the SQLite3 database with the following commands:
cd models
mkdir db
cat initdb.sql | sqlite3 db/pixelshelf.db
  1. Run npx node-sass --omit-source-map-url sass/styles.scss public/stylesheets/styles.css from the project folder to build the CSS
  2. Create folders for images and rating icons according to the following file structure: ./public/images/ratings
  3. Create a config.json file
{
  "client_id": "igdb_client_id",
  "client_secret": "igdb_client_secret",
  "token": "igdb_token",
  "maps-key-path": "path/to/maps.p8",
  "maps-key-id": "key_id",
  "maps-team-id": "team_id"
}
  1. Run npm start to run the web server on localhost:3000

Note: You must provide your own icons for game ratings.

E-Ink Support

E-ink clients can be setup to fetch data from the API. All e-ink logic is contained within the eink folder. At the moment, the Adafruit 2.13" Monochrome E-Ink Bonnet for Raspberry Pi is currently supported. Running the eink.py script with Python on the e-ink client will allow the application to display the size of your game collection on the screen. The buttons with cycle through the different screens, including wishlist size and game identification mode, allowing a USB barcode scanner to display the name of a scanned game (provided the UPC is in the database). Note that using a lower-model Pi, such as a Raspberry Pi Zero, will cause refresh rates to be slow. At the moment, one screen change make take around ten seconds on these models.

E-Ink Client Running on a Raspberry Pi Zero

Thermal Printer Support

Attributions

CSS framework provided by Bulma.

Auto-generated cover art, tags, ratings, and descriptions are from IGDB's API.

Maps are generated by Apple Maps via MapKit JS.

Charts are from Chart.js.

pixel-shelf's People

Contributors

abaratti avatar alexsmbaratti avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

pixel-shelf's Issues

Export Functionality

Allow users to download a file that can be uploaded to another Pixel Shelf instance to restore the state of the original instance

Create new schema for API responses

The current schema for API responses follows the following general pattern:

{
    "status": 200,
    "data": {}
}

The status code is fairly redundant and never used. I am open to suggestions to what may be more effective schema. That may be as simple as just returning the data, but I would like it to look somewhat sophisticated if possible. In addition, I am open to suggestions for error schemas.

If you have suggestions, please reply with a comment below with your suggestions.

Move Progress Field into Library Table

Upon further deliberation, progress would be best in the library table. While this means any potential duplicate copies may not be synced, it also means that game entries can be aggregated and shared, and that deleting an in progress library entry will not cause that game to continue to appear on the index screen. It also allows a user to easily hyperlink to the library entry in question.

Enter Apple Maps API Information from Front End

Is your feature request related to a problem? Please describe.
Currently, the config.json file must be used to enter Apple Maps API information. Information includes key ID, team ID, and key path at minimum.

Describe the solution you'd like
Allow the entering of this information via a setup prompt or using the backend page.

Describe alternatives you've considered
N/A

Additional context
N/A

API Documentation

Create detailed documentation of API endpoints, including params, body, and response information

Allow for Complete Editing of Library Entries

Is your feature request related to a problem? Please describe.
Game title, platform, date added, and retailers cannot yet be edited yet in the menu.

Describe the solution you'd like
Allow for editing of all fields.

Describe alternatives you've considered
N/A

Additional context
N/A

Enter IGDB API Information from Front End

Is your feature request related to a problem? Please describe.
Currently, the config.json file must be used to enter IGDB API information. Information includes client ID and client secret at minimum.

Describe the solution you'd like
Allow the entering of this information via a setup prompt or using the backend page.

Describe alternatives you've considered
N/A

Additional context
N/A

Change month-day-year format to Unix time format

Because only dates were needed, it was initially decided to use three integer fields for storing dates in the SQLite database: month, day, and year. However, this is causing more issues than solutions. Note that time and timezones are not relevant to Pixel Shelf. Switching to Unix time will make it simple to tell if a date is invalid or unknown, easy to plot library size over time, and fix date rendering issues.

Mass Import Can't Handle Certain Characters

Characters, specifically single quote characters, cause SQL issues. This leads to a variety of problems, including causing the library count by platform to be inaccurate. This is believed to occur because a library entry will be added, but not game or edition entries to complement it. This causes the count by platform endpoint to miss these entries.

Authentication and Login

Is your feature request related to a problem? Please describe.
All pages and API endpoints are currently exposed with no authentication requirement.

Describe the solution you'd like
Some form of login that protects endpoints and pages. Either custom login or use Discord or Twitch authentication.

Describe alternatives you've considered
N/A

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.