Skip to content

Commit

Permalink
ENG-1395 Chore: Create CONTRIBUTING.md For Root & 1UI (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-mann authored May 3, 2024
1 parent f060d13 commit 3a0e01a
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ If applicable, add screenshots or screen captures of your changes.

## Declaration

- [ ] I hereby declare that I have abided by the rules and regulations as outlined in the [CONTRIBUTION.md]()
- [ ] I hereby declare that I have abided by the rules and regulations as outlined in the [CONTRIBUTION.md](https://github.com/0xIntuition/intuition-ts/blob/main/CONTRIBUTING.md)

112 changes: 112 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Contributing

Thanks for your interest in contributing to 0xIntuition. We're happy to have you here.

Please take a moment to review this document before submitting your first pull request. We also strongly recommend that you check for open issues and pull requests to see if someone else is working on something similar.

If you need any help, feel free to reach out to [@0xintuition](https://twitter.com/0xintuition).

## About this repository

This repository is a monorepo.

- We use [pnpm](https://pnpm.io) and [`workspaces`](https://pnpm.io/workspaces) for development.
- We use [Nx](https://nx.dev/getting-started/intro) as our build system.
- We use [changesets](https://github.com/changesets/changesets) for managing releases.

## Structure

This repository is structured as follows:

```
apps
└── portal
packages
├── 1ui
└── core
```

| Path | Description |
| --------------- | ----------------------------------------- |
| `apps/portal` | The Remix application for the playground. |
| `packages/1ui` | Our design system. |
| `packages/core` | Core SDK. |

## Contributing To `0xIntuition` Packages

Please read the corresponding `CONTIBUTING.md` file for the app/package you wish to contribute to:

- [1ui - CONTRIBUTING.md](./packages/1ui/CONTRIBUTING.md)
- [Core - CONTRIBUTING.md]()

## Development

### Fork this repo

You can fork this repo by clicking the fork button in the top right corner of this page.

### Clone on your local machine

```bash
git clone https://github.com/0xIntuition/intuition-ts.git
```

### Navigate to project directory

```bash
cd intuition-ts
```

### Create a new Branch

```bash
git checkout -b my-new-branch
```

### Install dependencies

```bash
pnpm install
```

### Run a workspace

You can use the `pnpm [WORKSPACE]:dev` command to start the development process for a workspace.

#### Examples

1. To run the `portal` web app:

```bash
pnpm portal:dev
```

2. To run the `1ui` storybook:

```bash
pnpm 1ui:storybook
```

## Documentation

The documentation for this project is located in the `docs` workspace. You can run the documentation locally by running the following command:

```bash
pnpm docs
```

Documentation is written using [MDX](https://mdxjs.com). You can find the documentation files in the `docs` directory.

## Requests for new components

If you have a request for a new component, please open a discussion on GitHub. We'll be happy to help you out.

## Testing

Tests are written using [Vitest](https://vitest.dev). You can run all the tests from the root of the repository.

```bash
pnpm test
```

Please ensure that the tests are passing when submitting a pull request. If you're adding new features, please include tests.
59 changes: 59 additions & 0 deletions packages/1ui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contributing

Thanks for your interest in contributing to 0xIntuition. We're happy to have you here.

Please take a moment to review this document before submitting your first pull request. We also strongly recommend that you check for open issues and pull requests to see if someone else is working on something similar.

If you need any help, feel free to [reach out to us](https://docs.intuition.systems/learn-more/contact-us).

Please read the core [CONTRIBUTING.md](../../CONTRIBUTING.md) before proceeding.

## About this package

- We use [React](https://react.dev/) for component creation.
- We use [Tailwind](https://tailwindcss.com/) to style the components.
- We use [Storybook](https://storybook.js.org/) for documenting and displaying the components.
- We use [ShadCN](https://ui.shadcn.com/) and [Radix UI](https://www.radix-ui.com/) as our base component layer.

## Structure

This package is structured as follows:

```
1ui
└── src
├── components
├── styles
└── stories
```

## Component structure

Components are structured within `1ui/src/components/` as follows:

```
ComponentName
├── ComponentName.tsx
├── ComponentName.spec.tsx
├── utils.ts
├── utils.spec.ts
├── types.ts
├── ComponentName.stories.mdx
└── index.ts
```

### What are all these files for?

`ComponentName.tsx` - the main component file

`ComponentName.spec.tsx` - snapshot test for the component

`utils.ts` - any methods that can be extracted from the main component file _(optional)_

`utils.spec.ts` - unit tests for the utilities _(optional)_

`types.ts` - any unique interfaces, enums or types the component requires _(optional)_

`ComponentName.stories.mdx` - Storybook stories for the component

`index.ts` - the component export

0 comments on commit 3a0e01a

Please sign in to comment.