A database for Virtual Pinball tables.
VPDB is a platform where people can share their digital recreations of virtual pinball tables. It's meant to be easy to use, beautiful to look at and fast to browse. But most importantly, it will save you a huge amount of time when setting up and maintaining your virtual cabinet (you'll actually get to play again).
VPDB has three tiers:
- The backend server, powered by a nice API
- The web application
- A desktop application for your cabinet
The backend server contains all the data and makes it accessible through the API. The web application shows off the data and lets the user browse, comment, download and rate. The desktop application can subscribe to the content and update it automatically, knowing the file structure of your cabinet.
Contrarily to VPF and VPU that use a bulletin board solution with a downloads module, this was designed and built entirely from scratch for its purpose. Data is structured as it should be and we can do stuff a generic download solution just can't. Also we enjoy complete freedom over the UI, allowing to streamline the user experience to the max.
- Fast fuzzy search
- Distinction between fullscreen / desktop / universal (VPX) orientation is fully integrated
- Multiple releases per game
- Multiple versions per release, incl. changelog
- Multiple files per version - a version could cover both FS and DT - or VP9 and VPX - or any other combination
- Link compatible VP versions to a
.vptfile - Set orientation of a
.vptfile - Set lighting (day, night, linear) of a
.vptfile - Multiple authors per release
- All authors are owners of the release and can edit / update
- Acknowledgement field where other table contributors can be cross-linked
- Support for DirectB2S backglasses
- Many media types per file and game
- Multiple views when listing releases
- Fancy release upload form to make an author's life as easy as possible
- Automatic mod detection
Server runs on Node.js with Express, Stylus and Jade. MongoDB and Redis for data storage. Client uses AngularJS with CSS based on Twitter Bootstrap.
- Download and install GraphicsMagick, pngquant,
OptiPNG, FFmpeg and Unrar and
make sure that the binaries are in your
PATH. - Install MongoDB and Redis. Windows: Get binary
here, extract it to somewhere, open an admin shell and
run
redis-server --service-install redis.windows.conf --loglevel verbose --maxheap 500mfor a local dev setup. - Install Grunt:
npm install -g grunt-cli
Install Node.js 6+ and Git, then open a command line and type:
git clone https://github.com/freezy/node-vpdb.git
cd node-vpdb
npm install --msvs_version=2012
bower install
grunt build
grunt serve
Open your browser and connect to http://localhost:3000/. There are some command line arguments you can supply:
--port=<port>- Makes the app listen on a given port. Default:3000.--config=<path>- Uses a different settings file. Note that the settings location has different defaults depending on how Grunt is launched:- When launched as
devorserve, the default isserver/config/settings.js - When launched as
testorserve-test, the default isserver/config/settings-test.js. See Tests under Development below for additional parameters.
- When launched as
Both settings may also be provided by setting the PORT and APP_SETTINGS environment variable (providing it via
command line arguments will override).
For more detailed instructions, check out the Installation Guide.
While developing, you probably want to have your assets recompile automatically and re-launch the server if server code
was changed. In order to do that, launch the server in development mode by typing grunt dev, which will:
- Compile all
.stylstylesheets to.cssand regenerate the style guide when a stylesheet changes - Regenerate the style guide when a style guide template changes
- Restart the server when server code changes
- Trigger a Livereload event on any of the above
Here are the relevant Grunt tasks:
| Task | Description | Notes |
|---|---|---|
build |
Builds assets for production | Compiles and minifies styles, minifies client-side scripts, generates style guide, renders static error pages |
serve |
Launches server in production mode | Serves minified styles and scripts |
dev |
Launches server in development mode | Recompiles assets on the fly, restarts server on code change and live-reloads the browser |
serve-test |
Launches server in test mode | Enables code coverage and watches for server changes |
test |
Runs API tests | Server must be running as serve-test |
For the server tasks, we have:
| Assets Minified | Coverage Enabled | Automatic Asset Compilation | Linted | Config | |
|---|---|---|---|---|---|
serve |
yes | no | no | no | default |
dev |
no | no | yes | yes | default |
serve-test |
no | yes | no | yes | test |
See tests.
When running the server in development or test mode, the code is linted using JSHint. If
the code doesn't pass, tests fail. You can run the linting manually with the jshint task.
There's also continuous integration running on three services:
| Status | |
|---|---|
| Travis CI | |
| Codeship | |
| Snap |
After every test run, code coverage stats are sent to Coveralls.io. Note that both CI and code coverage only concern server-side code.
Code is also run through Code Climate, with the following result:
- To Mukuste. He gave the community such a nice momentum and I thought I could add a little bit to it.
- To Tom for his support of this project.
Thanks also to JetBrains for their awesome IDE and support of the Open Source Community!
GPLv2, see LICENSE.