Skip to content

Commit

Permalink
Merge pull request #84 from JSv4/JSv4/fix-quickstart-documentation
Browse files Browse the repository at this point in the history
Fix Quickstart Docs
  • Loading branch information
JSv4 committed Mar 2, 2023
2 parents 44d85ff + 8a279e3 commit 750a7f4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 9 deletions.
Empty file added docs/.overrides/.gitkeep
Empty file.
48 changes: 40 additions & 8 deletions docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ do this on Windows too, assuming you have docker compose and docker installed. T
directories will be different on Windows, but the git, docker and docker-compose commands should all be the
same.

**Step 1**: Clone this Repo
## **Step 1**: Clone this Repo

Clone the repository into a local directory of your choice. Here, we assume you are using a folder
called source in your user's home directory:
Expand All @@ -19,7 +19,7 @@ called source in your user's home directory:
$ git clone https://github.com/JSv4/OpenContracts.git
```

**Step 2**: Build the Stack
## **Step 2**: Build the Stack

Change into the directory of the repository you just cloned, e.g.:

Expand All @@ -35,16 +35,48 @@ and no configuration is required. If you want to change the
$ docker-compose -f local.yml build
```

Bring up the stack:
## **Step 3** Choose Frontend Deployment Method

__Option 1__ Use "Fullstack" Profile in Docker Compose

If you're **not** planning to do any frontend development, the easiest way to get started with OpenContracts is to
just type:

```commandline
docker-compose -f local.yml --profile fullstack up
```
$ docker-compose -f local.yml up

This will start docker compose and add a container for the frontend to the stack.

__Option 2__ Use Node to Deploy Frontend

If you plan to actively develop the frontend in the
[/frontend](https://github.com/JSv4/OpenContracts/tree/main/frontend) folder, you can just point your favorite
typescript ID to that directory and then run:

```commandline
yarn install
```

Congrats! You have OpenContracts running. If you go to `http://localhost:3000` in your browser,
you'll see the login page. You can login with the default username and password. These are set in the
environment variable file you can find in the `./.envs/.local/' directory. In that directory, you'll see
a file called `.django`.
and

```commandline
yarn start
```

to bring up the frontend. Then you can edit the frontend code as desired and have it hot reload as you'd expect for a
React app.

Congrats! You have OpenContracts running.

## **Step 4**: Login and Start Annotating

If you go to `http://localhost:3000` in your browser, you'll see the login page. You can login with the default username
and password. These are set in the environment variable file you can find in the `./.envs/.local/' directory. In that
directory, you'll see a file called `.django`. Backend specific configuration variables go in there.

**NOTE: The frontend is at port 3000, not 8000, so don't forget to use http://localhost:3000 for frontend access. We
have an open issue to add a redirect from the backend root page - http://localhost:8000/ - to http://localhost:3000**.

**Caveats**

Expand Down
4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ nav:
- Philosophy: philosophy.md
- Quick-Start: quick-start.md
- System Requirements: requirements.md
- How It Works: under-the-hood.md
- How It Works:
- Application Architecture: architecture/under-the-hood.md
- Asynchronous Processing: architecture/asynchronous-processing.md
- Acknowledgements: acknowledgements.md
- Walkthrough:
- Key-Concepts: walkthrough/key-concepts.md
Expand Down

0 comments on commit 750a7f4

Please sign in to comment.