{"id":22062710,"url":"https://github.com/ryan-haskell/lawyer-and-sons","last_synced_at":"2026-04-10T04:51:37.264Z","repository":{"id":88811484,"uuid":"82426751","full_name":"ryan-haskell/lawyer-and-sons","owner":"ryan-haskell","description":"A demo of KeystoneJS and its capabilities.","archived":false,"fork":false,"pushed_at":"2017-04-19T01:58:18.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-19T17:48:59.668Z","etag":null,"topics":["docker","keystonejs","mongodb","nodejs","pug","sass","vuejs"],"latest_commit_sha":null,"homepage":"","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/ryan-haskell.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-02-19T01:14:00.000Z","updated_at":"2017-02-22T15:56:37.000Z","dependencies_parsed_at":"2023-06-12T18:45:42.388Z","dependency_job_id":null,"html_url":"https://github.com/ryan-haskell/lawyer-and-sons","commit_stats":null,"previous_names":["ryan-haskell/lawyer-and-sons"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Flawyer-and-sons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Flawyer-and-sons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Flawyer-and-sons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryan-haskell%2Flawyer-and-sons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryan-haskell","download_url":"https://codeload.github.com/ryan-haskell/lawyer-and-sons/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245144021,"owners_count":20568049,"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":["docker","keystonejs","mongodb","nodejs","pug","sass","vuejs"],"created_at":"2024-11-30T18:26:37.005Z","updated_at":"2025-12-30T20:35:34.407Z","avatar_url":"https://github.com/ryan-haskell.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lawyer and Sons\n\u003e A full site build using _[KeystoneJS](http://www.keystonejs.com)_, _[MongoDB](http://www.mongodb.com)_, and [Docker](http://www.docker.com)\n\n### Features\n\n1. Get up-and-running with one command (`docker-compose up`)\n1. Runs on all platforms (Windows, Mac, Linux)\n1. No need to download/restore database\n1. Save the file, refresh the page.\n\n---\n\n\n### Local Development\n\n1. Install [Docker](http://www.docker.com)\n1. Run `docker-compose up`\n1. Your site is ready on port `3000`!\n\n---\n\n\n#### Signing in to KeystoneJS\n\u003e For local development, an account has been created for you.\n\n__Username__: `admin@keystone.com`\n\n__Password__: `password`\n\n---\n\n\n### Customizing your Environment\n\u003e Just create a `.env` file in the project root.\n\n__Environment Variable__ | __Description__ | __Example__\n------------------------ | --------------- | -----------\n__`MONGO_URI`__ |  MongoDB connection string | `mongodb://localhost/db`\n__`NODE_ENV`__ | Specifies whether we're running in production or development mode. | `production`\n__`CLOUDINARY_URL`__ | Points to the Cloudinary Image service. | `cloudinary://api_key:api_secret@cloud_name`\n__`PORT`__ | Which port to host the server on | `3000`\n__`COOKIE_SECRET`__ | Used for encryption | `23r2fm24f4fp23f23f`\n\n__Example `.env` file:__\n\n```\nMONGO_URI=mongodb://192.168.99.100/some-database\nPORT=1234\n```\n---\n\n\n### Project Structure\n\n__Item__ | __Description__\n---------- | ---------------\n__`app.js`__ | Entry point to the app (start here)\n__`routes.js`__ | Defines routes for the website\n__`routes/`__ | Functions that handle requests, middleware, and responses\n__`models/`__ | Stores all the KeystoneJS models\n__`views/`__ | Stores layouts, pages, and components used on the site\n__`public/`__ | Assets (`sass`, images, etc) for our site\n__`logic/`__ | Reusable functionality that is used by multiple routes\n__`updates/`__ | Initializes empty databases (no more downloading backups)\n\n---\n\n### Project Overview\n\nAfter you install Docker and pull this code, you will have everything you need to get started.\n\nOpening up a terminal and typing `docker-compose up` will automatically set up an isolated development environment. This command does a few simple things:\n\n- Creates a local MongoDB container (stores data).\n- Creates a local NodeJS container (runs server).\n- Connects them together so they can communicate.\n- Runs your NodeJS website at http://localhost:3000\n  - For Windows 8 users: http://192.168.99.100:3000\n\nWhen you first run this project, KeystoneJS will automatically create MongoDB collections from the JSON found in the `updates/data` folder. This means there is __no need to download or restore your databases__.\n\nAfter that, you can login at http://localhost:3000/keystone to manage content, or open up your favorite text editor to start changing code.\n\nWhen you change a `model` or a `route`, the server will __automatically__ refresh for you.\n\nThe server will also refresh if you modify any `logic`, `updates`, or either the `app.js` or `routes.js` files.\n\nFor frontend development, we are using Pug templates in place of HTML, and SASS in place of CSS.\n\nOnce again, changes to these files will __automatically__ and __immediately__ reflect on page refresh.\n\nInstead of bundling all of our Javascript into one big, minified blob, we are using pug to only include the JS we need for the page.\n\nThe JS framework used for this project is VueJS. It is as simple as jQuery with the scalability of React and Angular. Just like our Pug and SASS, any client-side JS changes will automatically appear on the frontend.\n\nDocker made it easy to guarantee a consistent, automated environment. Now you can focus on the human part: __Actually writing code, fixing bugs, and adding features__.\n\n---\n\n\n### New to NodeJS?\n\nWhat's great about NodeJS is that you can follow everything by starting in the __`app.js`__.\n\nThere are no hidden configuration files to worry about.\n\nKeep an eye out for the __`require`__ method, which will lead you right to the file with the code.\n\n__What does `require()` do?__\n\nHere's a simple example:\n\n__`app.js`__\n\n```js\nvar someString = require('./exportsSomeString.js');\n\nconsole.log(someString);\n```\n\n__`exportsSomeString.js`__\n```js\nvar hiddenString = \"I'm a secret!\";\nvar otherString = \"Hello!\"\n\nmodule.exports = otherString;\n```\n\nThis would output:\n```\n\u003e Hello!\n```\n\nThe __`module.exports`__ decides what will be returned when __`require`__ is called.\n\n---\n\nMore documentation to come!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Flawyer-and-sons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryan-haskell%2Flawyer-and-sons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryan-haskell%2Flawyer-and-sons/lists"}