{"id":16541122,"url":"https://github.com/spujadas/exposure","last_synced_at":"2026-05-14T05:37:07.099Z","repository":{"id":12081624,"uuid":"14669281","full_name":"spujadas/exposure","owner":"spujadas","description":null,"archived":false,"fork":false,"pushed_at":"2013-11-25T20:15:45.000Z","size":708,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-05T00:22:43.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spujadas.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":null,"support":null}},"created_at":"2013-11-24T21:07:05.000Z","updated_at":"2013-11-25T20:16:28.000Z","dependencies_parsed_at":"2022-09-10T11:01:48.886Z","dependency_job_id":null,"html_url":"https://github.com/spujadas/exposure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spujadas/exposure","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fexposure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fexposure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fexposure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fexposure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spujadas","download_url":"https://codeload.github.com/spujadas/exposure/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spujadas%2Fexposure/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33012658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-11T18:54:08.558Z","updated_at":"2026-05-14T05:37:07.077Z","avatar_url":"https://github.com/spujadas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exposure #\n\n**Exposure** is a web application that helps project owners and organisations gain exposure by enabling the former to pitch their project and the latter to sponsor these projects and obtain publicity in return.\n\nExposure was built using PHP, JavaScript and MongoDB, and relies on a number of libraries (Doctrine-ODM, Twig, Monolog, Swiftmailer etc. for PHP; jQuery, Noty etc. for JavaScript).\n\nThe application also depends on a custom and lightweight PHP MVC framework called **Sociable**.\n\n**Warning** – Make sure you read the Caveats section below before attempting to run this application. \n\n## Prerequisites ##\n\nRunning this application requires the following:\n\n- [nginx](http://nginx.org/) (tested with version 1.4) or [Apache](http://www.apache.org/) web server. \n\n- [PHP](http://php.net/) (tested with version 5.4, should work fine with earlier versions of PHP 5).\n\n- [MongoDB](http://www.mongodb.org/) (tested with version 2.4) and the [MongoDB PHP driver](http://www.php.net/manual/en/mongo.installation.php) for PHP.\n\nIf you want to run the unit tests, you will also need to install [phpunit](http://phpunit.de).\n\nThis code is known to work on Windows 7 and on GNU/Linux (CentOS).\n\n## Installation guidelines ##\n\n### Get the source code ###\n\nClone this repository in an installation directory, which we'll call `$INSTALL_DIR`.\n\nUpdate submodules (retrieving the Sociable framework).\n\nInstall dependencies by running [Composer](http://getcomposer.org/) in `$INSTALL_DIR`:\n\n\t$ composer install\n\n### Configure the web server ###\n\nConfigure your web server to execute `*.php` files as PHP, and with `$INSTALL_DIR/httpdocs` as the root directory.\n\nAdditionally, you need to define rewrite rules to prepend `index.php/` (i.e. to run the application's front controller) to any URL requests that do not match an actual file (e.g. `/maintenance.html` will be served as is, `/project` will be rewritten as `/index.php/project`).\n\n#### nginx ####\n\nIf using nginx, add the following lines to the `location /` section:\n\n    if (!-e $request_filename) {\n        rewrite ^(.*)$ /index.php last; break;\n    }\n\nAlso add the following line in the `server` section to enable \"large\" file uploads: \n\n\tclient_max_body_size 10M;\n\n#### Apache ####\n\nIf using Apache and the mod_rewrite module, a `.htaccess` file such as this one in the `$INSTALL_DIR/httpdocs` directory will do the trick:\n\n    RewriteEngine on\n    \n    RewriteCond %{REQUEST_FILENAME} !-f\n    RewriteCond %{REQUEST_FILENAME} !-d\n    \n    RewriteRule ^(.*)$ /index.php [L,QSA]\n\n### Configure PHP ###\n\nActivate the following PHP extensions in your `php.ini` file:\n\n- mbstring,\n- openssl,\n- fileinfo,\n- intl.\n\n**Note** – It is assumed that the mongo extension has already been activated as part of the installation of the MongoDB PHP driver.\n\nRaise the default file size upload limits by changing the `upload_max_filesize` configuration directive to:\n  \n\tupload_max_filesize = 5M\n\n### Configure the database ###\n\nCreate a MongoDB database to store the application's data, and add a user with the following permissions: `readWrite`, `dbAdmin`.\n\n### Configure the application ###\n\nCopy the `$INSTALL_DIR/sys/config/config.inc.php.orig` file to `$INSTALL_DIR/sys/config/config.inc.php`, and edit all lines marked as `// customise this` to reflect your configuration.\n\n**Note** – If you want to run the object document mapping tests (in `/tests/odm`), you'll also need a `config-test.inc.php` file.\n\n### Populate the database ###\n\nGo to the `$INSTALL_DIR/data` directory.\n\nGenerate the indexes:\n\n\t$ php ensure_indexes.php\n\n**Note** – If you want to run the object document mapping tests, you'll also need to generate the indexes for the test database: change the `ensure_indexes.php` file to point to the `config-test.inc.php` file that you created previously.\n\nImport all static data:\n\n\t$ php import_languages.php languages.tsv\n\t$ php import_countries.php countries.tsv\n\t$ php import_currencies.php currencies.txt\n\t$ php import_business_sectors.php business_sectors.tsv\n\t$ php import_moderation_reasons.php moderation_reasons.tsv\n\t$ php import_country_locations.php country_locations.tsv\n\t$ php import_themes.php themes.tsv\n\t$ php import_themes.php subthemes.tsv\n\t$ php import_sponsor_return_types.php sponsor_return_types.tsv\n\nInitialise the admin \"singleton\":\n\n\t$ php init_administration.php ADMIN\n\nCreate a super-administrator account\n\n\t$ php new_superadmin.php \u003cemail\u003e \u003cpassword\u003e\n\nCreate subscriptions (edit data beforehand if required, e.g. to make sure they use supported currencies):\n\n\t$ php init_subscriptions.php\n\n### Create required directories ###\n\nCreate the following directories:\n\n- `$INSTALL_DIR/sys/log`: application log directory.\n- `$INSTALL_DIR/model/cache`: model cache directory, containing proxy and hydrator classes.\n- `$INSTALL_DIR/templates/cache`: Twig cache directory.\n\n## Run the application ##\n\nStart the database server and the web server, navigate to the root URL, and feel free to look around.\n\nIf the root URL is `$ROOT_URL` then the admin web interface, which you can sign in to with the super-administrator account you created previously, is located at `$ROOT_URL/admin`. \n\n## Caveats ##\n\nThe application essentially works **BUT** it hasn't been thoroughly tested or reviewed so even the working parts should be treated as beta- or even alpha-grade: the source code is known to contain smelly or dirty code, inconsistencies, probably a fair share of bugs, and generally speaking some sections are likely to make you cringe one way or another. I should mention that this is my first attempt at writing a web app: I've learnt a lot on the way and in hindsight I would have done quite a few things very differently (using a mature MVC framework for starters).\n\nAs I'm moving on to other projects I will not be supporting or maintaining this application so please dive in and fork away if you want to take over and modify the code.\n\n**Hint** – The application follows the MVC architecture pattern, so start with the `/httpdocs/index.php` file (the front controller) and work your way forward from there, everything should make sense pretty quickly. \n\nIntegration with a payment platform has not been included to avoid dependencies on proprietary APIs and services.\n\nYou may want to have a look at the `IMPROVEMENTS.md` file for a list of ideas to improve this application.\n\n## Trivia ##\n\nThe 'x' in the blue triangle in the Exposure logo (`httpdocs/assets/images/logo.png`) is actually the '+' half of a camera's exposure button.\n\n## Licence ##\n\nCopyright 2013 Sébastien Pujadas under the [MIT license](LICENCE), with the following exceptions:\n\n- [Bootstrap](http://getbootstrap.com/) (parts of which are included in `httpdocs/assets/css`) is copyright 2013 Twitter, Inc under the [Apache 2.0 license](LICENCE.Apache-2.0). This licence also covers the GLYPHICONS Halflings font (located in `httpdocs/assets/fonts`), which was created by [GLYPHICONS.com](http://glyphicons.com/). \n\n- [jQuery](http://jquery.com/), [jQuery-UI](http://jqueryui.com/) (parts of which are included in `httpdocs/assets/js`) are copyright 2013 jQuery Foundation and other contributors (see individual files for details) under the MIT license.\n\n- [noty](http://needim.github.io/noty/) (parts of which are included in `httpdocs/assets/js/noty`) is copyright 2012 Nedim Arabacı (see individual files for details) under the MIT license. \n\n- The [jQuery File Upload plugin](http://blueimp.github.io/jQuery-File-Upload/) (included in `httpdocs/assets/js`) is copyright 2010 Sebastian Tschan (see individual files for details) under the MIT license. \n\nThe flag icons in `httpdocs/assets/images/flags` are public domain, and were created by [famfamfam.com's Mark James](http://www.famfamfam.com/lab/icons/flags/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspujadas%2Fexposure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspujadas%2Fexposure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspujadas%2Fexposure/lists"}