This project is a proof-of-concept application that serves the purpose of a recipe book, useful both privately and shared on the Internet. The editor has basic user-gating with NextAuth, mostly just to show off the functionality but can also be improved to provide decent security for an editor server that can be accessed over a network.
The primary data source is a tree of directories in the Content Directory, which by default is named content
and located at the root of the project.
Install package dependencies from the root:
pnpm install
First, cd
into editor
. This is generally the main app server which will call sibling applications as needed.
Create a first user with the create-user
script:
pnpm run create-user
Generate an OpenSSL secret key for NextAuth:
npx auth secret
Run the development server to try things out quickly:
pnpm run dev
Alternatively, build and run the optimized production server:
pnpm run build
pnpm run start
Open http://localhost:3000 with your browser to see the result.
The editor app has a Cypress e2e test suite that can run against the development server or the optimized production build via two sets of scripts: e2e-dev
and e2e-start
both with :headless
variants.
e2e-dev
is helpful for rapid development, while e2e-start
runs faster and is more reflective of production. Remember to run build
after any changes for those to apply to e2e-start
!