Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ contributing page #15

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,12 @@ export default withMermaid(
function appSidebarGuide() {
return [
{
text: 'Introduction',
text: 'Getting Started',
collapsible: true,
items: [{ text: 'Running Locally', link: '/app/intro.md' }],
items: [
{ text: 'Introduction', link: '/app/intro.md' },
{ text: 'Running Locally', link: '/app/running-locally.md' },
],
},
];
}
Expand All @@ -159,7 +162,10 @@ function portalSidebarGuide() {
{
text: 'Resources',
collapsible: true,
items: [{ text: 'Upcoming Features', link: '/docs/upcoming.md' }],
items: [
{ text: 'Upcoming Features', link: '/docs/upcoming.md' },
{ text: 'Contributing', link: '/docs/contributing.md' },
],
},
];
}
15 changes: 15 additions & 0 deletions docs/app/intro-new-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
lang: en-US
title: Introduction to Adding a New Feature
description: Adding a new feature to Codefair
head:
- - meta
- name: og:image
content: https://kalai.fairdataihub.org/api/generate?title=Codefair%20Documentation&description=Running%20the%20GitHub%20Repository&app=codefair&org=fairdataihub
---

# Introduction to Adding a New Feature

The best way to learn how to add a new feature to Codefair is to complete our step-by-step tutorial below:

Coming soon!
97 changes: 4 additions & 93 deletions docs/app/intro.md
Original file line number Diff line number Diff line change
@@ -1,102 +1,13 @@
---
lang: en-US
title: Running the Repository
description: Runnning the Codefair GitHub repository
title: Introduction
description: Introduction
head:
- - meta
- name: og:image
content: https://kalai.fairdataihub.org/api/generate?title=Codefair%20Documentation&description=Running%20the%20GitHub%20Repository&app=codefair&org=fairdataihub
---

# :toolbox: Developer Instructions
# :page_with_curl: Introduction

This section provides instructions for developers to run the Codefair GitHub repository.

## Code Structure

The Codefair repository combines both the Nuxt frontend and the Probot backend to work with the GitHub App. The repository is divided into two main parts:

1. **Frontend**: The frontend is built with [Nuxt.js](https://nuxt.com/) and is responsible for the user interface of the Codefair platform. The frontend is located in the `ui` directory of the repository.

2. **GitHub App**: The GitHub app is built with [Probot](https://probot.github.io/docs/README/) and is responsible for the GitHub App functionality. The backend is located in the `bot` directory of the repository.

## Prerequisites

Before you can run the Codefair repository, you will need the following prerequisites:

1. **Node.js**: You will need Node.js installed on your machine to run the Codefair repository. You can download Node.js from the [official Node.js website](https://nodejs.org/).

2. **MongoDB**: You will need a MongoDB database to store the data for the Codefair platform. You can download MongoDB from the [official MongoDB website](https://www.mongodb.com/).

3. **pnpm**: You will need pnpm installed on your machine to run the Codefair repository. You can install pnpm by running the following command:

```bash
npm install -g pnpm
```

4. **Smee**: You will need Smee.io to create a webhook proxy for the GitHub App. You can create a Smee.io webhook proxy by visiting the [Smee.io website](https://smee.io/). This will be used to receive GitHub App events from the GitHub API on your local machine.

5. **Oauth App**: Create an Oauth App by going to the Developer Settings in your GitHub account and within the Oauth Apps section. You will need to provide the following information:

- **Application Name**: Name of the Oauth App
- **Homepage URL**: URL for the Codefair frontend
- **Authorization callback URL**: URL for the Codefair frontend

6. **GitHub App**: Create a GitHub App by going to the Developer Settings in your GitHub account and within the GitHub App section. You will need to provide the following information:

- **GitHub App Name**: Name of the GitHub App
- **Homepage URL**: URL for the Codefair frontend
- **Webhook URL**: URL for the Probot server (If working locally use the Smee.io URL)
- **Webhook Secret**: Secret for the GitHub App webhook
- **Permissions**:
- **Read & Write access:** Contents, issues, and pull requests
- **Read access:** Metadata
- **Events to Subscribe to:** Issue comments, issues, pull request, pull request review, push, repository

For the final question on `Where can this GitHub App be installed?`, you can choose `Any account` to allow the GitHub App to be installed on any repository.

Once you have create the GitHub App, you will need to generate a private key and client secret for the GitHub App. The private key and client secret will be used to authenticate the GitHub App with the GitHub API.

## Running the Repository

You can run the following commands to start the Codefair repository:

1. **Clone the Repository**: Clone the Codefair repository to your local machine by running the following command:

```bash
git clone
```

2. **Install Dependencies**: Run the following command to install the dependencies for the Codefair repository:

```bash
pnpm install
```

3. **Gather Environment Variables**: Create a `.env` file in both the `ui` and `bot` directories of the repository. You can use the `.env.example` file as a template for the environment variables.

```bash
# .env file in the ui directory
GITHUB_APP_ID= # GitHub App ID
GITHUB_APP_PRIVATE_KEY= # GitHub App private key
GITHUB_CLIENT_ID= # GitHub OAuth client ID
GITHUB_CLIENT_SECRET= # GitHub OAuth client secret
MONGODB_DB_NAME= # Name of the MongoDB database
MONGODB_URI= # URI for the MongoDB database
```

```bash
# .env file in the bot directory
CODEFAIR_APP_DOMAIN= # http://localhost:3000 or your domain for the frontend
GITHUB_APP_NAME= # Name of the GitHub App
GITHUB_CLIENT_ID= # GitHub OAuth client ID
GITHUB_CLIENT_SECRET= # GitHub OAuth client secret
MONGODB_DB_NAME= # Name of the MongoDB database
MONGODB_URI= # URI for the MongoDB database
PORT=3001 # port for the Probot server
WEBHOOK_PROXY_URL= # URL for the webhook proxy
APP_ID= # GitHub App ID
GITHUB_APP_ID= # GitHub App Id
PRIVATE_KEY= # GitHub App private key
WEBHOOK_SECRET= # GitHub App webhook secret
```
This is the documentation of Codefair for developers. You will find here everything to setup the project locally and start making your contribution! Before you continue, we invite you to first read our [contributing guidelines](https://github.com/fairdataihub/codefair-app/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/fairdataihub/codefair-app/blob/main/CODE_OF_CONDUCT.md).
13 changes: 0 additions & 13 deletions docs/app/running-codefair.md

This file was deleted.

102 changes: 102 additions & 0 deletions docs/app/running-locally.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
lang: en-US
title: Running Locally
description: Runnning the Codefair GitHub repository locally
head:
- - meta
- name: og:image
content: https://kalai.fairdataihub.org/api/generate?title=Codefair%20Documentation&description=Running%20the%20GitHub%20Repository&app=codefair&org=fairdataihub
---

# :running: Running Locally

This section provides instructions for developers to run the Codefair GitHub repository locally.

## Code structure

The Codefair repository combines both the Nuxt frontend and the Probot backend to work with the GitHub App. The repository is divided into two main parts:

1. **Frontend**: The frontend is built with [Nuxt.js](https://nuxt.com/) and is responsible for the user interface of the Codefair platform. The frontend is located in the `ui` directory of the repository.

2. **GitHub App**: The GitHub app is built with [Probot](https://probot.github.io/docs/README/) and is responsible for the GitHub App functionality. The backend is located in the `bot` directory of the repository.

## Prerequisites

Before you can run the Codefair repository, you will need the following prerequisites:

1. **Node.js**: You will need Node.js installed on your machine to run the Codefair repository. You can download Node.js from the [official Node.js website](https://nodejs.org/).

2. **MongoDB**: You will need a MongoDB database to store the data for the Codefair platform. You can download MongoDB from the [official MongoDB website](https://www.mongodb.com/).

3. **pnpm**: You will need pnpm installed on your machine to run the Codefair repository. You can install pnpm by running the following command:

```bash
npm install -g pnpm
```

4. **Smee**: You will need Smee.io to create a webhook proxy for the GitHub App. You can create a Smee.io webhook proxy by visiting the [Smee.io website](https://smee.io/). This will be used to receive GitHub App events from the GitHub API on your local machine.

5. **Oauth App**: Create an Oauth App by going to the Developer Settings in your GitHub account and within the Oauth Apps section. You will need to provide the following information:

- **Application Name**: Name of the Oauth App
- **Homepage URL**: URL for the Codefair frontend
- **Authorization callback URL**: URL for the Codefair frontend

6. **GitHub App**: Create a GitHub App by going to the Developer Settings in your GitHub account and within the GitHub App section. You will need to provide the following information:

- **GitHub App Name**: Name of the GitHub App
- **Homepage URL**: URL for the Codefair frontend
- **Webhook URL**: URL for the Probot server (If working locally use the Smee.io URL)
- **Webhook Secret**: Secret for the GitHub App webhook
- **Permissions**:
- **Read & Write access:** Contents, issues, and pull requests
- **Read access:** Metadata
- **Events to Subscribe to:** Issue comments, issues, pull request, pull request review, push, repository

For the final question on `Where can this GitHub App be installed?`, you can choose `Any account` to allow the GitHub App to be installed on any repository.

Once you have create the GitHub App, you will need to generate a private key and client secret for the GitHub App. The private key and client secret will be used to authenticate the GitHub App with the GitHub API.

## Running the Repository

You can run the following commands to start the Codefair repository:

1. **Clone the Repository**: Clone the Codefair repository to your local machine by running the following command:

```bash
git clone
```

2. **Install Dependencies**: Run the following command to install the dependencies for the Codefair repository:

```bash
pnpm install
```

3. **Gather Environment Variables**: Create a `.env` file in both the `ui` and `bot` directories of the repository. You can use the `.env.example` file as a template for the environment variables.

```bash
# .env file in the ui directory
GITHUB_APP_ID= # GitHub App ID
GITHUB_APP_PRIVATE_KEY= # GitHub App private key
GITHUB_CLIENT_ID= # GitHub OAuth client ID
GITHUB_CLIENT_SECRET= # GitHub OAuth client secret
MONGODB_DB_NAME= # Name of the MongoDB database
MONGODB_URI= # URI for the MongoDB database
```

```bash
# .env file in the bot directory
CODEFAIR_APP_DOMAIN= # http://localhost:3000 or your domain for the frontend
GITHUB_APP_NAME= # Name of the GitHub App
GITHUB_CLIENT_ID= # GitHub OAuth client ID
GITHUB_CLIENT_SECRET= # GitHub OAuth client secret
MONGODB_DB_NAME= # Name of the MongoDB database
MONGODB_URI= # URI for the MongoDB database
PORT=3001 # port for the Probot server
WEBHOOK_PROXY_URL= # URL for the webhook proxy
APP_ID= # GitHub App ID
GITHUB_APP_ID= # GitHub App Id
PRIVATE_KEY= # GitHub App private key
WEBHOOK_SECRET= # GitHub App webhook secret
```
13 changes: 0 additions & 13 deletions docs/docs/codefair-app.md

This file was deleted.

Empty file removed docs/docs/codefair-ui.md
Empty file.
13 changes: 13 additions & 0 deletions docs/docs/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
lang: en-US
title: Contributing
description: Contributing
head:
- - meta
- name: og:image
content: https://kalai.fairdataihub.org/api/generate?title=Codefair%20Documentation&description=Contributing&app=codefair&org=fairdataihub
---

# :clap: Contributing

We would love your contribution! Please see our [Developers documentation](https://docs.codefair.io/app/intro.html) for contributing.
2 changes: 1 addition & 1 deletion docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ head:
content: https://kalai.fairdataihub.org/api/generate?title=Codefair%20Documentation&description=Installing%20the%20GitHub%20App&app=codefair&org=fairdataihub
---

# Installation
# :cd: Installation

This section provides instructions for installing the Codefair GitHub App and the permissions required for the GitHub and Oauth Sign In through the Codefair UI.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ head:
content: https://kalai.fairdataihub.org/api/generate?title=Codefair%20Documentation&description=Introduction&app=codefair&org=fairdataihub
---

# Introduction
# :page_with_curl: Introduction

This is the documentation for Codefair, a free and open source GitHub app that acts as your personal assistant when it comes to making your research software reusable and especially complying with the Findable, Accessible, Interoperable, Reusable (FAIR) Principles for Research Software (FAIR4RS Principles). Whether you are developing artificial intelligence (AI)/machine learning (ML) models with Python, data visualization tools with Jupyter notebook, or data analysis code with R, Codefair is here to assist you. You can find out more about Codefair at [codefair.io](https://codefair.io).
2 changes: 1 addition & 1 deletion docs/docs/upcoming.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ head:
content: https://kalai.fairdataihub.org/api/generate?title=Codefair%20Documentation&description=Upcoming%20Features&app=codefair&org=fairdataihub
---

# Upcoming Features
# :fast_forward: Upcoming Features

This section provides an overview of upcoming features that will be added to Codefair.

Expand Down
Loading