{"id":16559685,"url":"https://github.com/mewx/yorhel-vndb","last_synced_at":"2025-03-05T02:17:33.320Z","repository":{"id":77166772,"uuid":"294152320","full_name":"MewX/yorhel-vndb","owner":"MewX","description":"The VNDB.org source codes. Imported from: https://code.blicky.net/yorhel/vndb.git","archived":false,"fork":false,"pushed_at":"2020-09-09T15:24:28.000Z","size":6008,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T12:13:25.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MewX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-09T15:23:44.000Z","updated_at":"2020-09-09T15:27:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"bc70bd81-06fb-4156-9a6a-c4fb79927500","html_url":"https://github.com/MewX/yorhel-vndb","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MewX%2Fyorhel-vndb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MewX%2Fyorhel-vndb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MewX%2Fyorhel-vndb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MewX%2Fyorhel-vndb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MewX","download_url":"https://codeload.github.com/MewX/yorhel-vndb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241950145,"owners_count":20047591,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T20:26:49.877Z","updated_at":"2025-03-05T02:17:33.315Z","avatar_url":"https://github.com/MewX.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The VNDB.org Source Code\n\n## Quick and dirty setup using Docker\n\nSetup:\n\n```\n  docker build -t vndb .\n```\n\nRun (will run on the foreground):\n\n```\n  docker run -ti --name vndb -p 3000:3000 -v \"`pwd`\":/var/www --rm vndb\n```\n\nIf you need another terminal into the container while it's running:\n\n```\n  docker exec -ti vndb su -l devuser  # development shell (files are at /var/www)\n  docker exec -ti vndb psql -U vndb   # postgres shell\n```\n\nTo start Multi, the optional application server:\n\n```\n  docker exec -ti vndb su -l devuser -c 'make -C /var/www multi-restart'\n```\n\nIt will run in the background for as long as the container is alive. Logs are\nwritten to `data/log/multi.log`.\n\nThe PostgreSQL database will be stored in `data/docker-pg/` and the uploaded\nfiles in `static/{ch,cv,sf,st}`. If you want to restart with a clean slate, you\ncan stop the container and run:\n\n```\n  # Might want to make a backup of these dirs first if you have any interesting data.\n  rm -rf data/docker-pg static/{ch,cv,sf,st}\n```\n\n\n## Requirements (when not using Docker)\n\nGlobal requirements:\n\n- Linux, or an OS that resembles Linux. Chances are VNDB won't run on Windows.\n- A standard C build system (make/gcc/etc)\n- PostgreSQL 10+ (including development files)\n- Perl 5.26+\n- Elm 0.19.1\n\n**Perl modules** (core modules are not listed):\n\nGeneral:\n- AnyEvent\n- Crypt::ScryptKDF\n- Crypt::URandom\n- DBD::Pg\n- DBI\n- Image::Magick\n- JSON::XS\n- PerlIO::gzip\n- graphviz (/usr/bin/dot is used by default)\n\nutil/vndb.pl (the web backend):\n- Algorithm::Diff::XS\n- SQL::Interp\n- Text::MultiMarkdown\n- TUWF\n- HTTP::Server::Simple\n\nutil/multi.pl (application server, optional):\n- AnyEvent::HTTP\n- AnyEvent::IRC\n- AnyEvent::Pg\n\n\n## Manual setup\n\n- Make sure all the required dependencies (see above) are installed. Hint: See\n  the Docker file for Alpine Linux commands, other distributions will be similar.\n  For non-root setup, check out cpanminus \u0026 local::lib.\n- Run the build system:\n\n```\n  make\n```\n\n- Setup a PostgreSQL server and make sure you can login with some admin user\n- Build the *vndbfuncs* PostgreSQL library:\n\n```\n  make -C sql/c\n```\n\n- Copy `sql/c/vndbfuncs.so` to the appropriate directory (either run\n  `sudo make -C sql/c install` or see `pg_config --pkglibdir` or\n  `SHOW dynamic_library_path`)\n- Initialize the VNDB database (assuming 'postgres' is a superuser):\n\n```\n  # Create the database \u0026 roles\n  psql -U postgres -f sql/superuser_init.sql\n  psql -U postgres vndb -f sql/vndbid.sql\n\n  # Set a password for each database role:\n  echo \"ALTER ROLE vndb       LOGIN PASSWORD 'pwd1'\" | psql -U postgres\n  echo \"ALTER ROLE vndb_site  LOGIN PASSWORD 'pwd2'\" | psql -U postgres\n  echo \"ALTER ROLE vndb_multi LOGIN PASSWORD 'pwd3'\" | psql -U postgres\n\n  # OPTION 1: Create an empty database:\n  psql -U vndb -f sql/all.sql\n\n  # OPTION 2: Import the development database (https://vndb.org/d8#3):\n  curl -L https://dl.vndb.org/dump/vndb-dev-latest.tar.gz | tar -xzf-\n  psql -U vndb -f dump.sql\n  rm dump.sql\n```\n\n- Update `data/conf.pl` with the proper credentials for *vndb_site* and\n  *vndb_multi*.\n- Now simply run:\n\n```\n  util/vndb-dev-server.pl\n```\n\n- (Optional) To start Multi, the application server:\n\n```\n  make multi-restart\n```\n\n\n# Rewrites, rewrites, rewrites\n\nThe VNDB website is currently (like every project beyond a certain age) in a\ntransitional state of rewrites. There are three \"versions\" and coding styles\nacross this repository:\n\n**Version 2**\n\nThis is the code that powers the actual website. It lives in `lib/VNDB/` and\nhas `util/vndb.pl` as entry point. Front-end assets are in `data/js/`,\n`data/style.css`, `data/icons/`, `static/f/` and `static/s/`.\n\n**Version 2-rw**\n\nThis is a (recently started) backend rewrite of version 2. It lives in\n`lib/VNWeb/` with Elm and Javascript code in `elm/`. Individual parts of the\nwebsite are gradually being moved into this new coding style and structure.\nVersion 2 and 2-rw run side-by-side in the same process and share a common\nroute table and database connection, so the entry point is still\n`util/vndb.pl`. The primary goal of this rewrite is to make use of the clearer\nversion 3 structure and to slowly migrate the brittle frontend Javascript parts\nto Elm and JSON APIs.\n\n**Version 3**\n\nThere also used to be a \"version 3\" rewrite with a completely new user\ninterface. All of the improvements developed in version 3 are slowly being\nbackported and improved upon in version 2-rw and version 3 does not exist\nanymore (though it can still be found in the version history).\n\n**Non-rewrites**\n\nSome parts of this repository are not affected by these rewrites. These include\nthe database structure, most of the scripts in `util/`, some common modules\nspread across `lib/` and Multi, which resides in `lib/Multi/`. That's not to\nsay these are *final* or *stable*, but they're largely independent from the\nwebsite code.\n\n\n# License\n\nGNU AGPL, see COPYING file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmewx%2Fyorhel-vndb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmewx%2Fyorhel-vndb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmewx%2Fyorhel-vndb/lists"}