{"id":17495517,"url":"https://github.com/rdig/portfolio-snapshot","last_synced_at":"2025-07-19T10:33:00.599Z","repository":{"id":114191990,"uuid":"50579809","full_name":"rdig/portfolio-snapshot","owner":"rdig","description":"Personal portfolio public snapshot to allow code browsing. It is running live at http://glogovetan.com","archived":false,"fork":false,"pushed_at":"2016-01-28T12:20:39.000Z","size":1446,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T17:32:50.314Z","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":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdig.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-28T11:56:06.000Z","updated_at":"2016-01-28T12:20:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"ffb6d033-6388-474b-8286-5f7e7539d267","html_url":"https://github.com/rdig/portfolio-snapshot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdig%2Fportfolio-snapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdig%2Fportfolio-snapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdig%2Fportfolio-snapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdig%2Fportfolio-snapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdig","download_url":"https://codeload.github.com/rdig/portfolio-snapshot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246077678,"owners_count":20720038,"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-19T14:06:37.836Z","updated_at":"2025-03-28T18:23:47.392Z","avatar_url":"https://github.com/rdig.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Hi there! Thanks for stopping by!\n\n## Heads up\n\nThis was build for public viewing and some of the confidential has been redacted, but besides that, it's an exact copy of my private repository.\n\n## Quick Getting Started\n\nThis is are just the fastest steps to get you up and running with a development build of the app.\n\nClone the repo\n\n\tgit git@github.com:rdig/portfolio-snapshot.git\n\nInstall `Npm`'s global and dev dependencies: (If you don't have `Node.js` installed check below)\n\n\tnpm install\n\tnpm install -d\n\nBuild the project\n\n\tnpm run dev-once\n\n\n## Requirements\n\nThe project requires `Node.js` and it's package manager `Npm`, plus it renders the pages using the `React.js` library / Ecosystem (Check below for more information). You can see the requirements by reading the `package.json` file.\n\nOn the server side, this project requires `Apache v2.4.x`, `PHP` newer than `v5.4` and an `Sqllite` database engine.\n\nSince some of the directives are written for the new version of `Apache`, running it on pre-`2.4` will **break** the site.\n\n## Node.js\n\nThis projects requires Node.js version 4 or newer.\n\n*(Linux Debian-based distributions Install)*\n\nTo install node on your system, run the following commands: (use `setup_4.x` for version 4.x.x of node or `setup_5.x` for version 5.x.x)\n\n\tcurl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -\n\tsudo apt-get install -y nodejs\n\nInstall the build tools (you may already have them):\n\n\tsudo apt-get install -y build-essential\n\nLink the `nodejs` binary to the `node` or else you will run into problems along the way (because there is another node package - Amateur Packet Radio \"Node\" Program - that is going to screw with your setup):\n\n\tsudo ln -s /usr/bin/nodejs /usr/bin/node\n\n## React.js\n\nBefore installing dev time dependencies (below) you will need `React` for this build to work.\n\nThis must be installed globally to prevent unwanted dependencies break (or packages getting installed multiple times).\n\nTo install, run `npm install -g react react-dom`. Only these this is used globally, the rest will be installed in `--save-dev` mode while initializing the project.\n\n## Initializing the project\n\nTo get the project's required global dependencies (npm packages) run `npm install`\n\nTo get the project's required development dependencies (npm packages) run `npm install -d`\n\nDepending on your internet connection, this could take a while.\n\n## Building\n\nTo build the project (for development) just run `npm run dev`\n\nThis has `--watch` argument added to the run command so it will keep the process open and watch for file changes as you work.\n\nThis dev run contains `livereload`, but since this does not work as well as `hot-reload`, and is very likely to fail at some point, don't over-rely on it.\n\n## Backend\n\nThe data storage / entry is handled in the backend by [Cockpit CMS](). This was chosen because of it's *lack* of front-end. It also has a pretty goo data retrieval interface via APIs.\n\nFor more documentation you look at the [official one](http://getcockpit.com/docs), or go strait to the [Github repo](https://github.com/aheinze/cockpit) of the project.\n\n## Linting\n\nThe linting process was added to the dev build process and runs every time you build, you can also run it once, manually using `npm run lint`.\n\nIf you need to tweak the rules, the config file is non-standard and is named `eslint-rules.json`\n\n## Testing\n\nThe unit tests are written in Jest using Jasmine v2 as a test runner.\n\nYou'll find them in the `test/` folder.\n\nTo test, just run `npm test`. Like the build command, this also has `--watch` argument added to the run command, so it will watch for changes / fails while you work.\n\n## Documenting\n\nInitially we were supposed to have a documentation generator (The likes of `yuiDoc` or `react-docgen`), but since I didn't find one suitable to work with, and that can be used with all libraries (eg: Vanilla JS and with React), the whole thing was postponed until I can find (or write) something better.\n\n## Stylesheets (CSS)\n\nThe stylesheets are automatically preprocessed (if needed) by the appropriate `webpack` loader, so you don't have to worry about them. (Granted, it's a little slower than a stand-alone preprocessor, because this has to re-bundle the javascript files)\n\n## Robots.txt \u0026 Sitemap.xml\n\nRobots and Sitemaps are automatically generated by cockpit via [robots.php](./robots.php) and [sitemap.php](./sitemap.php).\n\nIf the articles are not published they will not show up.\n\n### Static Sitemap\n\nFor static entries in the `sitemap` files, add / change data in the `Sitemap` `datastore` in Cockpit.\n\n### Robots\n\nRobots is only used for explicitly denying, not allowing.\n\nFor entries, add / change data in the `Robots` `datastore` in Cockpit.\n\n*Warning* Apparently the name of the link gets parsed and matched, so try to avoid short non-descriptive links while using the `disallow` instruction. *Ex: blocking `cv` will also block `colocvial`*\n\n## Dev server\n\nSince this project uses `PHP` for the backend CMS, I did not want to use the built in `webpack` dev server (even though it has some nifty features), or use some weird two server config.\n\nBecause of that you have to supply your own web server that supports `PHP` \u003e= `5.4`, `PDO` with `SQLite` support and has the `GD` extension `enabled`.\n\nI'm currently using `Apache` on Linux. If you want to roll one up fast, I suggest checking out [Bitnami's LAMP Stack](https://bitnami.com/stack/lamp). `Bitnami` also has the equivalent stacks for [Windows](https://bitnami.com/stack/wamp) or [Mac  OS](https://bitnami.com/stack/mamp)\n\n## Production\n\nBefore pushing the files to production, make sure you build them for production (minified, smaller, using production version of `React`) using `npm run build`\n\nExcept for a few, the files and folders require basic read permissions(`0644` / `0755`). Here are the exceptions the require group write (`0775`) permissions:\n\n\t/cp/storage/backups\n\t/cp/storage/cache/assets\n\t/cp/storage/cache/thumbs\n\t/cp/storage/cache/tmp\n\t/cp/storage/data\n\t/cp/storage/uploads\n\nAfter loging in the `cockpit` dashboard for the first time, clear the cache so it will be re-generated for the new environment: `Settings -\u003e Info -\u003e Cache size` *(Click on value)*.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdig%2Fportfolio-snapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdig%2Fportfolio-snapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdig%2Fportfolio-snapshot/lists"}