Thanks for contributing to Safis CMS!
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
This repository is a monorepo managed using Lerna. This means there are multiple packages managed in this codebase, even though we publish them to NPM as separate packages.
-
The owner of the repository needs to create a GitHub personal access token and select the
repo
scope. -
Create a GitHub OAuth App. Then set your "Authorization callback URL", this should be a combination of your domain and the value set for
OAUTH_CALLBACK_URL
env variable. e.g.http://localhost:3000/oauth/callback
. We will use this app and will need to use itsClient ID
andClient secret
to authenticate to GitHub. -
Check that Node is installed with version
>= 14.17
. You can check this withnode -v
.
Fork the safis-cms
repository to your GitHub Account.
$ git clone https://github.com/<your-github-username>/safis-cms
$ cd safis-cms
Install dependencies for the main repo and all packages by running once:
$ npm run lerna-install
We will use environment variables to configure our safis-cms
local environment. So we will need a .env
file with the following configuration:
# Required
COOKIE_SECRET=my-cookie-secret
GIT_OWNER=username-here
GIT_OWNER_SECRET=secret-value # GitHub personal access token
GIT_REPO=repo-name
GIT_OAUTH_CLIENT_ID=oauth-app-client-id
GIT_OAUTH_CLIENT_SECRET=oauth-app-client-secret
# Optional
GIT_DEFAULT_BRANCH # default: main
GIT_OAUTH_SCOPE # comma separated value. e.g. scope1,scope2. Default: repo, the scope for your OAuth App
GIT_REPO_VISIBILITY # default: public
GIT_ROOT_FOLDER=custom-root-folder
GIT_CONTENT_TYPES_FOLDER # default: contentTypes
GIT_CONTENT_FOLDER # default: content
OAUTH_LOGIN_URL # default: /oauth/login
OAUTH_CALLBACK_URL # default: /oauth/callback
ENABLE_GRAPHQL_PLAYGROUND # default: true
You can use to the
.env.example
file at the root level of the repo to create your.env
file.
You can start safis-cms-server
and safis-cms-app
(coming soon...) in development mode by running:
$ npm run dev
Coming soon..
Coming soon...
Coming soon...
This project follows GitHub's standard forking model. Please fork the project to submit pull requests.
Coming soon...