KeystoneJS

Node.js开发数据库驱动的网站、应用程序和API的开源框架。 建立在Express和MongoDB上。(The open source framework for developing database-driven websites, applications and APIs in Node.js. Built on Express and MongoDB.)

  • 所有者: keystonejs/keystone
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    2
      比較:

Github星跟蹤圖

KeystoneJS是一个功能强大的Node.js内容管理系统和基于express和mongoose的web应用程序框架。 Keystone可以轻松创建复杂的网站和应用程序,并配有美观的自动生成的管理界面。

Keystone给你:
  • 创建动态网站或应用程序的简单方法,结构良好的路线,模板和模型
  • 基于您定义的数据库模型的美观管理UI
  • 具有额外字段类型和功能的增强模型,建立在由Mongoose原生支持的基础上
  • 开箱即用的会话管理和认证
  • 用于管理数据更新或初始化的更新框架
  • 与Cloudinary集成,用于图像上传、存储和调整大小
  • 与Mandrill集成,轻松发送电子邮件
  • 与Google地方信息集成,实现巧妙的位置字段
  • 与Embedly集成功能强大的视频和丰富的媒体嵌入工具
  • ...加上许多其他工具和实用程序,使创建复杂的Web应用程序更容易。
使用官方的 Yeoman Generator 快速启动和运行KeystoneJS,然后在 keystonejs.com/docs/getting-started 查看官方的入门指南和文档。

概覽

名稱與所有者keystonejs/keystone
主編程語言TypeScript
編程語言JavaScript (語言數: 4)
平台
許可證MIT License
發布數2725
最新版本名稱@keystone-6/fields-document@4.0.1 (發布於 2022-07-14 05:37:29)
第一版名稱v0.0.1 (發布於 2013-07-11 13:51:51)
創建於2018-04-05 10:48:37
推送於2022-08-07 15:37:59
最后一次提交2021-10-08 12:01:44
星數6.7k
關注者數61
派生數844
提交數7.1k
已啟用問題?
問題數1406
打開的問題數73
拉請求數5077
打開的拉請求數46
關閉的拉請求數694
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Build Status
slack
Supported by Thinkmill

Contents

What's new?

Keystone 5 is a complete re-imagining of KeystoneJS for the future. It builds on the lessons we learned over the last 5 years of the KeystoneJS' history and focuses on the things we believe are the most powerful features for modern web and mobile applications.

This means less focus on hand-holding Node.js template-driven websites and more focus on flexible architecture, a powerful GraphQL API with deep authentication & access control features, an extensible Admin UI and plugins for rich field types, file and database adapters, and session management.

We believe it's the ideal back-end for rich React / Vue / Angular applications, Gatsby and Next.js websites, Mobile applications and more. It also makes a great Headless CMS.

Getting Started

To get up and running with a basic project template, run the following commands.

yarn create keystone-app my-app
cd my-app
yarn start

For more details and system requirements, check out the 5 Minute Quick Start
Guide
.

Documentation

The API documentation contains a reference for all KeystoneJS packages.

For walk-throughs and discussions, see the Guides
documentation
.

Contributing

This project follows the all-contributors specification.

Contributions of any kind are welcome!

You will find the set-up steps in this readme and full release processes and project guidelines in CONTRIBUTING.md.

Contributors

We'd like to start by thanking all our wonderful contributors:
(emoji key):

Demo Projects

These projects are designed to show off different aspects of KeystoneJS features
at a range of complexities (from a simple Todo App to a complex Meetup Site).

See the demo-projects/README.md docs to get
started.

Development Practices

All source code should be formatted with Prettier.
Code is not automatically formatted in commit hooks to avoid unexpected behaviour,
so we recommended using an editor plugin to format your code as you work.
You can also run yarn format to prettier all the things.
The lint script will validate source code with both ESLint and prettier.

Setup

Keystone 5 is set up as a monorepo, using Yarn Workspaces. Make sure to install Yarn if you haven't already.

First, clone the Keystone 5 repository

git clone https://github.com/keystonejs/keystone-5.git

Also make sure you have a local MongoDB server running
(instructions).

Then install the dependencies and start the test project:

yarn
yarn dev

See demo-projects/README.md for more details on
the available demo projects.

Note For Windows Users

While running yarn on Windows, the process may fail with an error such as this:

Error: EPERM: operation not permitted, symlink 'C:\Users\user\Documents\keystone-5\packages\arch\packages\alert\src\index.js' -> 'C:\Users\user\Documents\keystone-5\packages\arch\packages\alert\dist\alert.cjs.js.flow'

This is due to permission restrictions regarding the creation of symbolic links. To solve this, you should enable Windows' Developer Mode and run yarn again.

Testing

Keystone uses Jest for unit tests and Cypress for end-to-end tests.
All tests can be run locally and on CircleCI.

Unit Tests

To run the unit tests, run the script:

yarn jest

Unit tests for each package can be found in packages/<package>/tests and following the naming pattern <module>.test.js.
To see test coverage of the files touched by the unit tests, run:

yarn jest --coverage

To see test coverage of the entire monorepo, including files which have zero test coverage, use the special script:

yarn coverage

End-to-End Tests

Keystone tests end-to-end functionality with the help of Cypress.
Each project (ie; test-projects/basic, test-projects/login, etc) have their own set of Cypress tests.
To run an individual project's tests, cd into that directory and run:

yarn cypress:run

Cypress can be run in interactive mode from project directories with its built in GUI,
which is useful when developing and debugging tests:

cd test-projects/basic && yarn cypress:open

End-to-end tests live in project/**/cypress/integration/*spec.js.
It is possible to run all cypress tests at once from the monorepo root with the command:

yarn cypress:run

NOTE: The output from this command will mix together the output from each project being tested in parallel.
This is only recommended as sanity check before pushing code.

Running a CI environment locally

Setting up CircleCI CLI tool

Install the circleci cli tool:

If you've already got Docker For Mac installed (recommended)

brew install --ignore-dependencies circleci

If you do not have Docker installed

brew install circleci

Then make sure docker is able to share the following directories (in Docker for Mac, go Preferences > File Sharing):

  • The keystone 5 repo
  • /Users/<your username>/.circleci

Run CI tests locally

Make sure Docker is running.

Execute the tests:

# Clean up the node_modules folders so everything is installed fresh
yarn clean

# Run the circle CI job
circleci local execute --job simple_tests

Where simple_tests can be replaced with any job listed in
.circleci/config.yml under the jobs: section.

Code of Conduct

KeystoneJS adheres to the Contributor Covenant Code of Conduct.

License

Copyright (c) 2019 Jed Watson. Licensed under the MIT License.

去到頂部