{"id":16321503,"url":"https://github.com/doodlewind/n7books","last_synced_at":"2025-10-31T18:30:28.793Z","repository":{"id":18481745,"uuid":"21677124","full_name":"doodlewind/n7books","owner":"doodlewind","description":"Second hand book exchange platform for USTCers","archived":false,"fork":false,"pushed_at":"2015-10-30T03:36:16.000Z","size":3260,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-25T19:24:43.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://bookface.ustc.edu.cn","language":"PHP","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/doodlewind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-10T02:56:43.000Z","updated_at":"2016-09-29T15:46:50.000Z","dependencies_parsed_at":"2022-09-11T20:30:51.393Z","dependency_job_id":null,"html_url":"https://github.com/doodlewind/n7books","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doodlewind%2Fn7books","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doodlewind%2Fn7books/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doodlewind%2Fn7books/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doodlewind%2Fn7books/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doodlewind","download_url":"https://codeload.github.com/doodlewind/n7books/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239221175,"owners_count":19602380,"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-10T22:47:57.757Z","updated_at":"2025-10-31T18:30:28.762Z","avatar_url":"https://github.com/doodlewind.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## BookFace\n\nBookface is an online textbook plea market for USTCers.\n\n### Get started\n\n#### Get Bookface\n\nYou may get your LAMP environment installed first.\n\n``` bash\n$ git clone https://github.com/doodlewind/n7books.git\n```\n\nAnd change its file permission.\n\n``` bash\n$ sudo chmod -R www-data:www-data n7books\n```\n\n#### Configure MySQL and CakePHP\n\nAfter downloaded the source code, you can then import the MySQL table structure.\n\n``` bash\n$ mysql -u root -p ustc_old_book \u003c n7books/ustc_old_book.sql\n```\n\nNext step is to configure CakePHP for database. Create `n7books/app/Config/database.php` and config like below:\n\n``` php\n\u003c?php\nclass DATABASE_CONFIG {\n    public $default = array(\n        'datasource' =\u003e 'Database/Mysql',\n        'persistent' =\u003e false,\n        'host' =\u003e '127.0.0.1',\n        'login' =\u003e 'your_mysql_username',\n        'password' =\u003e 'your_mysql_password',\n        'database' =\u003e 'ustc_old_book',\n        'encoding' =\u003e 'utf8'\n    );\n}\n```\n\n#### Configure Apache\n\nThe configuration of apache server includes setting the document root and enables URL rewrite, you can start from editing the apache config file in `/etc/apache2/apache2.conf`. Below is the example configure marking lines to be edited.\n\n``` text\n\u003cDirectory /\u003e\n        Options FollowSymLinks\n        AllowOverride None\n        Require all denied\n\u003c/Directory\u003e\n\u003cDirectory /usr/share\u003e\n        AllowOverride None\n        Require all granted\n\u003c/Directory\u003e\n\n\u003cDirectory /home/ewind/n7books/\u003e\n        Options Indexes FollowSymLinks\n        AllowOverride None\n        Require all granted\n\u003c/Directory\u003e\n```\n\nThen, check if `/etc/apache2/mods-enabled` contails `rewrite.load`. If not, just execute this.\n \n``` bash\n$ sudo cp /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled\n```\n\nThen edit `/etc/apache2/sites-enabled/000-default.conf`\n\n```\nDocumentRoot /path/to/n7books/app/webroot\n\u003cDirectory /\u003e\n        Options FollowSymLinks\n        AllowOverride All\n\u003c/Directory\u003e\n\u003cDirectory /path/to/n7books/app/webroot\u003e\n        Options Indexes FollowSymLinks MultiViews\n        AllowOverride All\n        Order allow,deny\n        Allow from all\n\u003c/Directory\u003e\n\u003cDirectory \"/usr/lib/cgi-bin\"\u003e\n        AllowOverride None\n        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch\n        Order allow,deny\n        Allow from all\n\u003c/Directory\u003e\n\n```\n\nNow the configuration to BookFace is completed. To start BookFace, just `$ sudo service apache2 restart` to see.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoodlewind%2Fn7books","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoodlewind%2Fn7books","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoodlewind%2Fn7books/lists"}