indiekit icon indicating copy to clipboard operation
indiekit copied to clipboard

Update the getting started guide

Open paulrobertlloyd opened this issue 4 years ago • 2 comments

The getting started guide starts by assuming you have installed all the dependencies and created a config file.

There should be a section that proceeds this which details installation that can be followed by users who are not familiar with Node.js

Steps to cover

  • Installing Node.js (Windows, Mac, Linux)
  • Initiating a new project (npm init)
  • Ensuring a project is setup to use ES modules – is there a flag that enables this by default? (See https://github.com/getindiekit/indiekit/issues/382)

paulrobertlloyd avatar Dec 14 '21 10:12 paulrobertlloyd

Hi @paulrobertlloyd, I have just had a quick look at the set up instructions for other node projects (Ghost CMS etc).

I agree with your steps listed, although:

  • I assume that only Node 14 is supported,
  • I cannot find a flag for npm init that will include ES modules.
  • Are you OK for me to submit a pull request for the documentation update?

Tangentially, I assume that the steps listed above, followed by npm install @indiekit/indiekit pulls from the npm registry. Is there any instance where it would be better to clone the git repository and build indiekit locally?

thejdev avatar Dec 18 '21 23:12 thejdev

In answer to your questions:

  • Firstly, always happy to receive pull requests. Just note that I have started updating the documentation site this weekend, so let me know if its more helpful.

  • I’ve actually found out how to create an npm init script that would massively help with on-boarding. This means you could do something like the following:

    npm install @indiekit/indiekit
    npm init indiekit
    

    This would then prompt a number of questions, before generating a configuration file and install any required plug-in dependencies. This’ll require a bit of work to figure out, but I think it would really help towards the goal of making the project more accessible and easier to set up.

  • It should work with Node v14, but I have set the minimum version requirement to v16 (this is the current stable release).

  • I created this template repo: https://github.com/getindiekit/example-config – would this help?

paulrobertlloyd avatar Dec 18 '21 23:12 paulrobertlloyd

With incoming authentication endpoint, there’s likely a number of steps needed to get started:

  1. Walk through creating a configuration file with npm create indiekit [directory]
  2. Push [directory] to a host (with separate documentation for how to do this with popular hosts)
  3. Add environment variables:
    • SECRET used to generate secret values
    • Any variables needed by plugins, such as API keys and secrets
  4. Visit /auth/new-password to generate a password secret
  5. Use this value for PASSWORD_SECRET environment variable
  6. Optionally (but recommended) create a MongoDB database, and add it’s URL to MONGO_URL
  7. Add endpoint links to your website <head>.

Some hosts offer CLIs, which could make parts of this process easier, such as adding and updating environment variables and creating a Mongo database. Doesn’t feel great, but probably a good place to start for 1.0.

paulrobertlloyd avatar Nov 18 '22 02:11 paulrobertlloyd