{"id":22045212,"url":"https://github.com/nigelhorne/vwf","last_synced_at":"2026-02-22T00:40:21.693Z","repository":{"id":7277507,"uuid":"8591450","full_name":"nigelhorne/vwf","owner":"nigelhorne","description":"Versatile Web Framework - easily build a website to support different languages and client platforms","archived":false,"fork":false,"pushed_at":"2026-02-17T13:13:08.000Z","size":731,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-17T18:46:46.042Z","etag":null,"topics":["fcgi","framework","mvc","perl","perl5","rapid-development","responsive-web-design","tmpl","vwf"],"latest_commit_sha":null,"homepage":"https://nigelhorne.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigelhorne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-03-05T23:16:55.000Z","updated_at":"2026-02-17T13:13:12.000Z","dependencies_parsed_at":"2023-12-12T15:26:43.437Z","dependency_job_id":"c9f50a97-52ad-4bcc-af28-8aeb8857b0fd","html_url":"https://github.com/nigelhorne/vwf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nigelhorne/vwf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fvwf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fvwf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fvwf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fvwf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelhorne","download_url":"https://codeload.github.com/nigelhorne/vwf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fvwf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29701102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T23:35:04.139Z","status":"ssl_error","status_checked_at":"2026-02-21T23:35:03.832Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["fcgi","framework","mvc","perl","perl5","rapid-development","responsive-web-design","tmpl","vwf"],"created_at":"2024-11-30T13:12:15.455Z","updated_at":"2026-02-22T00:40:21.684Z","avatar_url":"https://github.com/nigelhorne.png","language":"JavaScript","readme":"[![Security Policy](https://img.shields.io/badge/security-policy-blue.svg)](SECURITY.md)\n\nVWF\n===\n\nVersatile Web Framework - an MVC framework to rapidly build a responsive website\nand web applicaations that supports different languages, databases and client platforms.\n\nLicenced under GPL2.0 for personal use only.\n\n# What This Does\n\nVWF is a web application framework to easily display web pages tailored to the\nwishes of the browser, e.g. language to use and mobile/web content.\nIt supports Template Toolkit (http://template-toolkit.org/),\ntext and HTML files.\nThe framework handles web requests using FastCGI and offers dynamic page rendering, access control (including rate limiting), and caching.\n\nThe idea is to create index.fcgi which will then automatically display\nthe correct index.htm (or index.tmpl) file based on the browser language\nsetting (e.g. en-GB) and type (e.g. mobile). By putting the pages in a\ndirectory hierarchy new versions can be quickly added for\nmobile/robot/search-engine use in addition to web pages, and allow new\nlanguages to be added easily.\n\nThe content directory hierarchy is of the format\n.../language/region/[web|mobile|robot|search]/filename.[html|tmpl|txt].\nLanguage and region are determined by the browser settings. If the template\nisn't found there it looks in\n.../language/[web|mobile|robot|search]/filename.[html|tmpl|txt], and if not\nthere it looks in ../[web|mobile|robot|search]/filename.[html|tmpl|txt].\nThe fall back is web, so if a mobile browser visits and there is no specific\nmobile page to display then the web page will be displayed.\n\nTo make it easier to understand, here's an example.  Your primary index page\nfor the Web could be held in .../web/index.tmpl, the mobile page in\n.../mobile/index.tmpl and the page for search engines in\n.../search/index.tmpl.  Presumably that page would be written in U.S.\nEnglish. If you were to do a version in Spanish, that would be in\n.../es/web/index.tmpl and so on.  And a version in British English would be\nin .../en/gb/web/index.tmpl (NOT .../en/web/index.tmpl otherwise U.S.\nreaders would be directed there).\n\nFiles ending in .tmpl will be sent using the Template Toolkit, files ending\nwith .html or .htm will be sent as is, and files ending in .txt will\nbe sent as is with the Content-Type header set to text/plain.\n\nData stored in the files .../databases/ is be made available to\nthe display packages and hence to the templates. CSV, XML and SQLite format\nfiles are supported.\n\n# How To Install and Use\n\n## Overview\n1. Install dependencies: `cpanm -i lazy \u0026\u0026 perl -Mlazy cgi-bin/page.fcgi ''`\n2. Run the script: `./page.fcgi`\n3. Test from the command line: `LANG=en_GB root_dir=$(pwd) cgi-bin/page.fcgi page=meta_data`\n\n## Installation\nFirstly you'll need to ensure that your index page points to the VWF delivery\npage for example by adding these to your .htaccess file:\n\n    RedirectPermanent\t/index.html\thttp://[YOURSITE]/cgi-bin/index.fcgi\n    RedirectPermanent\t/index.htm\thttp://[YOURSITE]/cgi-bin/index.fcgi\n\nNext copy the contents of the lib directory to /usr/lib/VMF (or a place\nof your choice), and the sample index.fcgi of the cgi-bin directory to /cgi-bin\nin your webroot.\n\nNext modify index.fcgi changing the \"use /usr/lib\" directive to point to\nwhere you've installed the VWF lib files such as page.pm.  Use /usr/lib, for\nexample, if you put it into /usr/lib/VWF/page.pm\n\nNext create a directory hierarchy containing the pages to be displayed, e.g.\n\n    .../web/en/index.tmpl\n    .../web/en/gb/index.tmpl\n    .../web/fr/index.tmpl\n    .../mobile/en/index.tmpl\n\nNext install any dependancies from CPAN, such as CGI::Lingua, CGI::Buffer,\nCGI::IDS, Data::Throttler, Config::Auto and Template.\n\nYou'll need to create cgi-bin files for each of your page sets (e.g. create\nfoo.fcgi for .../web/*/*/foo.html). That's easier than you think because most\nof the time you'll use index.fcgi as a template and change the two places\nthat VWF::index appear to VWF::foo.\n\nNow you need to tell VWF where to find the configuration files. Create a\nconf directory in a place such as /usr/lib/conf if the libaries went into\n/usr/lib/VMF.\n\nThe configuration file takes the form of:\n\n    root_dir /full/path/to/template directory\n    memory_cache: where short-term volatile information is stored, such as the country of origin of the client.\n    disc_cache: where long-term information is stored, such as copies of output to see is HTTP 304 can be returned. \n\nFor example, if your index.tmpl file lives in /usr/lib/example.com/templates/VWF/web/index.tmpl,\nthen you would add 'root_dir /usr/lib/example.com'.\n\nThe name of the configuration file the sitename, e.g. /usr/lib/conf/example.com.\n\nFinally change conf/index.l4pconf to the logging mechanism of your choice.\n\nThe database system is yet to be documented, but essentially it provides\na simple way to include dynamic data in your templates.\n\nLook everywhere in the code and configuration files for the string \"example.com\" and replace that to suit.\n\n## Usage\nVWF is smart enough that you can debug from the command line before you deploy.\nInteresting possiblilties include:\n\n    perl -c -Ilib cgi-bin/page.fcgi\n    cgi-bin/index.fcgi --mobile\n    cgi-bin/index.fcgi lang=fr\n    cgi-bin/index.fcgi key=value\n    root_dir=$(pwd) cgi-bin/page.fcgi --search-engine page=index lint_content=0\n\n## Worked Example\n\nI set up http://bandsman.mooo.com/~njh to print a simple Hello, World.\n\nThe file layout is:\n\n    $ find ~njh/VWF/\n    /home/njh/VWF/\n    /home/njh/VWF/page.pm\n    /home/njh/VWF/index.pm\n    /home/njh/VWF/table.pm\n    $ find /home/njh/public_html/\n    /home/njh/public_html/\n    /home/njh/public_html/index.html\n    /home/njh/public_html/cgi-bin\n    /home/njh/public_html/cgi-bin/index.fcgi\n    /home/njh/public_html/.htaccess\n    $ find /home/njh/bandsman.mooo.com/\n    /home/njh/bandsman.mooo.com/\n    /home/njh/bandsman.mooo.com/templates\n    /home/njh/bandsman.mooo.com/templates/VWF\n    /home/njh/bandsman.mooo.com/templates/VWF/index.html\n    /home/njh/bandsman.mooo.com/databases/index.db\n\n# Caveats\nEvery time you upload a new site ensure that you remove the \"save_to\" directory, since that contains\ncached copies of pages that will be inconsistent with the new site.\n\nFIXME: Configuration files should be in .../conf, not .../lib/conf\n\n# Updates\ngit clone https://github.com/nigelhorne/vwf.git\n\nNigel Horne, `\u003cnjh at bandsman.co.uk\u003e`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fvwf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelhorne%2Fvwf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fvwf/lists"}