> For the complete documentation index, see [llms.txt](https://bryan-guner.gitbook.io/duke/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bryan-guner.gitbook.io/duke/docs/setup.md).

# Setup

This section outlines getting the application (for the JSS public site) setup for development.

1. Get the repo
   1. cd to where you keep your repos
   2. clone the project from https: //bitbucketp.duke-energy.com/projects/DUKCOM/repos/dxt-jss-public/browse 1. In your terminal (command line), run `git clone https: //bitbucketp.duke-energy.com/scm/dukcom/dxt-jss-public.git`
2. Install dependencies
   1. Use node -v `14.17.4`
   2. Set npm registry to Nexus (prod)\* 1. run `npm config set registry https: //nexus.duke-energy.com/repository/duke-cne-npm/` on the command line
   3. Run `npm install` on the command line
3. Setup .jssconfig and .env
   1. Add `scjssconfig.json` file (or rename scjssconfig-sample.json → scjssconfig.json)

      ````
        1. Add:

           ```
           {
             "sitecore": {
               "instancePath": "",
               "apiKey": "{9F777224-3275-4D56-BD29-371FB3C00821}",
               "deploySecret": "",
               "deployUrl": "",
               "layoutServiceHost": "https:
      ````

      //scjsstest.duke-energy.com" } }

      ```
      ```
4. Add `.env` file (or rename `.env-sample` → .env)
   1. Add:

      ````
        ```
        HTTPS=true
        ```

        This will allow you to use `https:
      ````

      //\` for development so that jurisdiction cookies will work properly.
5. Setup your `.hosts` file
   1. We need to set the local IP to `local.duke-energy.com` so we can use cookies set by the `.duke-energy.com` domain.
   2. On the command line, run `sudo vim /etc/hosts`
   3. Add a new line and enter `127.0.0.1 local.duke-energy.com`
   4. Press `Esc` key and then `:x` to save and exit
6. Start the project for development.
   1. Inside the project, run `npm run start:connected` on the command line.
   2. After the app successfully starts up, change the URL to `https: //local.duke-energy.com:3000/home`.
7. Do some cool stuff

**\*Why are we using Nexus rather than npm for package installs?**

@de-electron is a scoped npm package for \[Electron Design System]\(https: //electron.duke-energy.com) dependencies which lives in Nexus, Duke Energy's private internal package repository. You can use Nexus to install all necessary npm packages for the project.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bryan-guner.gitbook.io/duke/docs/setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
