• Stars
    star
    932
  • Rank 49,020 (Top 1.0 %)
  • Language Less
  • License
    MIT License
  • Created about 11 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚠️ Archived

This repository is archived and is no longer maintained.

For the latest Keystone release please visit the Keystone website.



Keystone Demo

This site is an example of a default Keystone 4 application.

Try it out at http://demo.keystonejs.com

Pull requests are welcome, and if you'd like to see additional demos just open a new issue to let us know.

TODO

Using this as a basis for your own project

We recommend you use our Yeoman Generator as the basis for new projects, as this demo site contains code specific to running a public demo (like user account protection, etc).

If you do want to use this as a starting point however, you are welcome to follow the instructions below to begin.

Manual Install

Note: We've implemented a new theme for the demo site; to use the (old) basic bootstrap theme, check out the bootstrap-simple branch

git clone https://github.com/JedWatson/keystone-demo.git
cd keystone-demo
npm install

Setting up your accounts and environment

First, sign up for free accounts for the following services used by features in the demo site:

Then, create a .env file in the project folder (the one with this readme) and fill in the following values:

CLOUDINARY_URL={your cloudinary url}
MANDRILL_APIKEY={your mandrill api key}
MANDRILL_USERNAME={your mandrill username}
EMBEDLY_APIKEY={your embedly key}

This file is ignored by the default .gitignore settings. When you put your project into production, replicate the env variables above, and add settings for the following:

NODE_ENV=production
COOKIE_SECRET={a random string to encrypt cookies}
MONGO_URI={your mongo connection uri} // can also be MONGOLAB_URI
GA_DOMAIN={your google analytics domain} // optional
GA_PROPERTY={your google analytics property} // optional
PORT={the port to listen on} // defaults to 3000, automatically set by paas (e.g. heroku)

Installing MongoDB

By default, KeystoneJS will look for a MongoDB server running on localhost on the default port, and connect to it. If you're getting errors related to the MongoDB connection, make sure your MongoDB server is running.

You can find more information on how to install MongoDB and other dependencies in the generator-keystone README.

Configuring the project defaults

Open keystone.js and update the name and brand to your own project.

You can also change the other settings in this file (locals, nav, etc.) as you develop your project.

Replacing the demo account

Open ./updates/0.0.1-admins.js and update the array of initial admin users to your own.

Also remove the line that says newAdmin.isProtected = true; so you can change your password.

When you run your app in production, it is strongly recommended you change your password immediately from the default in this file.

Run it!

node keystone

You should see in your console:

{your app name} is ready on port 3000

Make it your own

Now you can start modifying the demo site and customising it as your own.

Some places to start:

  • routes/index.js - this is the file that binds urls to specific view controllers. Files in ./routes/views/*.js are automatically imported as routes.views.{script} ready to be bound.
  • ./templates - this is the folder that holds the templates for your views. It would typically match the structure of your ./routes folder fairly closely.
  • ./public - all the files in this folder are served as static assets for your site. Customise and add your own css, client-side javascript, images, etc. here. Any .less files will be automatically compiled into .css files.
  • ./models - these files are included by ./models/index.js and each one sets up a different database model in your application. If you add more, be sure to add them to the index file!

Check out the [Keystone 4 documentation](http://v4.keystonejs.com] for more information.

Ask us questions or tell us what you built

We love to hear what people are doing with KeystoneJS, and are always happy to help if you get stuck.

License

(The MIT License)

Copyright (c) 2015-2018 Jed Watson

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

keystone-classic

Node.js CMS and web app framework
JavaScript
14,633
star
2

keystone

The superpowered headless CMS for Node.js — built with GraphQL and React
TypeScript
9,232
star
3

generator-keystone

⚠️ Archived - Legacy KeystoneJS project generator for Yeoman
JavaScript
335
star
4

generator-keystone-react

⚠️ Archived - Legacy Yeoman generator for a KeystoneJS / React.js boilerplate project
JavaScript
87
star
5

keystone-5

JavaScript
64
star
6

storage

Storage.js is a Javascript library that gives you an easy and standardised access to any provider of your choice.
JavaScript
60
star
7

keystone-utils

⚠️ Archived - Legacy Node.js utility library used by KeystoneJS and you!
JavaScript
56
star
8

prisma-day-2021-workshop

Resources for Jed's Prisma Day 2021 Workshop
TypeScript
46
star
9

keystone-jamstack-plus

⚠️ Archived - Legacy Project
JavaScript
45
star
10

grappling-hook

Hooks for pre/post events used by KeystoneJS
JavaScript
42
star
11

create-keystone-app

CLI app that makes it easy to get started with Keystone
TypeScript
40
star
12

universal-keystone-boilerplate

⚠️ Archived - Legacy Keystone.JS boilerplate for Universal JavaScript projects using React.
JavaScript
34
star
13

keystone-graphql

⚠️ Archived - Legacy GraphQL Helpers for use with KeystoneJS
JavaScript
33
star
14

keystonejs-site

⚠️ Archived - Legacy keystonejs.com site and docs
Pug
31
star
15

keystone-starter

⚠️ Archived - Legacy Starter Project for Heroku (or any other) deployment
JavaScript
30
star
16

keystone-email

⚠️ Archived - Legacy email helper for KeystoneJS Apps
JavaScript
29
star
17

keystone-test-project

⚠️ Archived - Legacy KeystoneJS Project with various configurations for development and testing purposes
JavaScript
25
star
18

keystone-nightwatch-e2e

⚠️ Archived - Legacy end-to-end test framework for KeystoneJS applications.
JavaScript
17
star
19

keystone-storage-adapter-s3

⚠️ Archived - Legacy S3 Storage Adapter for KeystoneJS
JavaScript
17
star
20

keystone-6-railway-example

A simple example project showing how you might deploy Keystone 6 to Railway
TypeScript
15
star
21

eslint-config-keystone

⚠️ Archived - Legacy Shareable ESLint Config for Keystone's Coding Standards
JavaScript
15
star
22

keystone-6-heroku-example

A simple example project of showing how you might deploy Keystone 6 to Heroku
TypeScript
15
star
23

keystone-healthchecks

⚠️ Archived - Legacy Keystone Healthchecks Framework
JavaScript
9
star
24

keystone-react-todo-demo

TypeScript
7
star
25

keystone-storage-namefunctions

⚠️ Archived - Legacy utility functions for generating file names.
JavaScript
6
star
26

keystone-storage-adapter-azure

⚠️ Archived - Legacy Azure Storage Adapter for KeystoneJS
JavaScript
6
star
27

eslint-config-keystone-react

⚠️ Archived - Legacy Shareable ESLint Config for Keystone's Coding Standards with React Extensions
JavaScript
3
star
28

keystone-frontend-example

An example project of a keystone 6 app with a next frontend for use in lessons
TypeScript
3
star
29

keystone-metrics

⚠️ Archived - Legacy Keystone Metrics Tracking Package
JavaScript
2
star
30

fields-test-harness

⚠️ Archived - Legacy Project
JavaScript
1
star