This repoisitory contains the template code required to render https://dignityofwar.com. The website is controlled by a backend CMS (https://cms.dignityofwar.com) which this website takes the data of the CMS and renders.
To start local development, git clone this repo, create a env-local.sh file using the env-local.sh.example example, then run:
npm install
npm run dev
This project usees the following technologies:
- NextJS - framework for the frontend
- Vercel - Deployment mechanism
- Directus - Headless CMS system that powers our CMS
Traditionally you'd have a whole environment to yourself including a database etc. Thankfully, the data changes that we will perform to the website can be performed isolation via the use of Collections within the CMS. Upon creating a new one, you can enable / disable it in isolation and use the local env to pull in the data without affecting production.
Deployment is automatically performed upon committing code to the main branch within the repository. If you create a feature branch, a isolated instance of the website will be created for you upon PR or commit to said branch.
You can find the URL for your deployment within the GitHub Deployments for the repo.
The CMS automatically triggers a deployment to the production deployment upon any changes within it. Therefore, your changes may take a few minutes to actually apply to the website in production.
There is no stage environment, all changes will trigger a production release!
For development, simply just change the production CMS (in isolation of course) and your local env should pick it up upon a refresh.
General common sense rules apply:
- Create a feature branch and upon completion, submit a PR.
- Changes to the CMS should be made in isolation. Remember that all changes you make on the CMS have the potential to affect production!