Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #12 from OcularEngineering/License
Browse files Browse the repository at this point in the history
Ocular License And Docs
  • Loading branch information
louismurerwa authored Mar 25, 2024
2 parents b37ea61 + 03ee930 commit eb3841f
Show file tree
Hide file tree
Showing 7 changed files with 452 additions and 16 deletions.
78 changes: 78 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Contributor Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at louis@useocular.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

Modeled of of [Supabase](https://github.com/supabase/.github/blob/main/CODE_OF_CONDUCT.md?plain=1) and [Contributor Covenant] (https://www.contributor-covenant.org)
40 changes: 24 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Ocular AI

## Overview
ocular-backend
apps
plugins
types
utils

## Development
- Build The Whole Project Using Turbo And Infisical As A Secret Provider.
- turbo build

- Start the Backend Server
- cd packages/ocular
- infisical run --env=dev turbo start
# CONTRIBUTING.md

Thank you for contributing to Ocular!

## Getting Started

For help setting up the code in this repo, please follow our [DEVELOPERS.md](https://github.com/OcularEngineering/ocular/blob/main/CONTRIBUTING.md) file.

## Issues

If you find a bug, please create an Issue and we’ll fix it.

- Please search [existing Issues](https://github.com/OcularEngineering/ocular/issues) before creating a new one.
- Please include a clear description of the problem along with steps to reproduce it. Exact steps with screenshots and urls are helpful.

## Pull Requests

We actively welcome your Pull Requests!

## Community channels

Reach out on Slack for further assistance.

- [slack](https://slack.com)
131 changes: 131 additions & 0 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Developing Ocular

### Install dependencies

Install and configure the following dependencies on your machine to build Ocular.

- [Git](http://git-scm.com/)
- [Node.js v18.x (LTS)](http://nodejs.org)
- [npm](https://www.npmjs.com/) version 9.x.x
- [Docker](https://docs.docker.com/get-docker/) (to run studio locally)

## Local development

Ocular uses [Turborepo](https://turborepo.org/docs).

### Fork the repo

To contribute code to Ocular, you must fork the [Ocular repo](https://github.com/OcularEngineering/ocular).

### Clone the repo

1. Clone your GitHub forked repo:

```sh
git clone your-forked-repo
```

2. Go to the Ocular directory:
```sh
cd ocular
```

### Install dependencies

1. Install the dependencies in the root of the repo.

```sh
npm install # install dependencies
```

2. Copy the example `.env.local.example` to `.env.local`

```sh
cp packages/ocular/.env.local.example packages/ocular/.env.local
```

3. After that you can run the apps simultaneously with the following.
```sh
npm run dev # start all the applications
```

Then visit the following sites:

| Site | Directory | Scope name | Description | Local development server |
| -------------------------------------------------------- | -------------- | ---------- | --------------------------------------------- | -------------------------- |
| [useocular.com/dashboard](https://useocular.com/dashboard) | `/packages/ocular-ui` | front-end | Ocular UI (requires Docker, see below) | http://localhost:3001 |


#### Shared components

The monorepo components are under `/packages`:

- `/packages/apps`: Connectors To DataSources for Knowledge Indexing (Asana, Notion, GitHub etc)
- `/packages/ocular-ui`: UI Dashboard for Ocular.
- `/packages/plugins`: Plugin's That Allow Ocular to access services such as VectorDBS, LLMModels etc
- `/packages/types`: Shared data types shared across Ocular Modules
- `/packages/utils`: Shared Utils aross Ocular Modules

#### Installing packages

Installing a package with NPM workspaces requires you to add the `-w` flag to tell NPM which workspace you want to install into. Do not install dependencies in their local folder, install them from the route using the `-w` flag.

The format is: `npm install <package name> -w=<workspace to install in>`.

For example:

- `npm install react -w plugins`: installs into `./packages/common`
- `npm install react -w ocular-ui`: installs into `./packages/ocular-ui`
- `npm install react -w ocular`: installs into `./packages/ocular`

---

## Running Docker for Ocular

To run Studio locally, you'll need to setup Docker in addition to your NextJS frontend.

#### Prerequsites

First, make sure you have the Docker installed on your device. You can download and install it from [here](https://docs.docker.com/get-docker/).

#### Get Started

1. Navigate to the `docker` directory in your forked repo

```sh
cd docker
```

2. Copy the example `env` file

```sh
cp .env.example .env
```

3. Run docker

```sh
docker compose up
```

This command initializes the containers specified in the `docker-compose.yml` file. It might take a few moments to complete, depending on your computer and internet connection.

Once the `docker compose up` process completes, you should have your local version of Ocular up and running within Docker containers. You can access it at `http://localhost:3001`.

Remember to keep the Docker application open as long as you're working with your local Ocular instance.

## Create a pull request

After making any changes, open a pull request. Once you submit your pull request, the Ocular team will review it with you.

Once your PR has been merged, you will be proudly listed as an Ocular contributor.

## Issue assignment

We don't have a process for assigning issues to contributors yet.

---

## Community channels

If you get stuck somewhere or have any questions, join our [Discord Community Server](https://slack.com)!
Loading

0 comments on commit eb3841f

Please sign in to comment.