Skip to content

Commit eec6531

Browse files
authored
Merge pull request #1 from CopilotKit/docs/add-code-of-conduct-and-contributing
Add Code of Conduct and Contributing guidelines
2 parents 668c1b9 + ae44dd4 commit eec6531

File tree

4 files changed

+379
-8
lines changed

4 files changed

+379
-8
lines changed

CODE_OF_CONDUCT.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# Code of Conduct for Open Generative UI
2+
3+
## Table of Contents
4+
5+
1. [Statement of Purpose](#statement-of-purpose)
6+
2. [Community Values](#community-values)
7+
3. [Expected Behavior](#expected-behavior)
8+
4. [Unacceptable Behavior](#unacceptable-behavior)
9+
5. [Procedures for Reporting and Resolving Issues](#procedures-for-reporting-and-resolving-issues)
10+
6. [Consequences of Unacceptable Behavior](#consequences-of-unacceptable-behavior)
11+
7. [Scope](#scope)
12+
8. [Acknowledgments](#acknowledgments)
13+
9. [Get Involved](#get-involved)
14+
15+
---
16+
17+
## 1. Statement of Purpose
18+
19+
Open Generative UI is an open-source showcase and template for building rich, interactive AI-generated UI with [CopilotKit](https://copilotkit.ai) and [LangGraph](https://langchain-ai.github.io/langgraph/). As part of the CopilotKit ecosystem, our Code of Conduct aims to foster a collaborative, respectful, and innovative community that empowers contributors and users alike. By adhering to this code, we can ensure that our community thrives and remains a welcoming space for everyone.
20+
21+
---
22+
23+
## 2. Community Values
24+
25+
At CopilotKit, we prioritize the following values:
26+
27+
| **Value** | **Description** |
28+
| ----------------- | ---------------------------------------------------------------------------------------------------------- |
29+
| **Inclusivity** | We embrace diverse backgrounds and perspectives, enhancing our collective work. |
30+
| **Collaboration** | We believe in teamwork and encourage open communication and mutual support. |
31+
| **Respect** | We treat everyone with kindness and respect, fostering an environment where contributions are valued. |
32+
| **Innovation** | We encourage creative thinking and experimentation, supporting initiatives that drive our project forward. |
33+
34+
---
35+
36+
## 3. Expected Behavior
37+
38+
As a participant in the CopilotKit community, you are expected to:
39+
40+
- **Be Respectful and Inclusive**: Treat all individuals with respect and kindness, regardless of their background, identity, or experience level.
41+
- **Communicate Constructively**: Engage in discussions that are constructive, focusing on ideas and solutions rather than personal opinions.
42+
- **Welcome Collaboration**: Actively seek out diverse viewpoints and be open to feedback that can improve our projects.
43+
- **Support Others**: Offer help to fellow contributors, especially newcomers, and encourage a culture of mentorship.
44+
- **Practice Empathy**: Consider the feelings and experiences of others, striving to create an understanding environment.
45+
46+
---
47+
48+
## 4. Unacceptable Behavior
49+
50+
The following behaviors are considered unacceptable within our community:
51+
52+
| **Behavior Type** | **Description** |
53+
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
54+
| **Harassment** | Any form of harassment, including offensive comments, intimidation, or unwanted attention. |
55+
| **Discrimination** | Actions or comments that discriminate based on race, ethnicity, gender, sexual orientation, disability, age, or any other characteristic. |
56+
| **Personal Attacks** | Engaging in personal insults or derogatory remarks directed at individuals or groups. |
57+
| **Disruption** | Disrupting discussions, meetings, or community spaces, hindering constructive dialogue. |
58+
| **Invasive Actions** | Unwanted physical contact or any other form of unwanted attention. |
59+
60+
---
61+
62+
## 5. Procedures for Reporting and Resolving Issues
63+
64+
If you witness or experience unacceptable behavior, we encourage you to take the following steps:
65+
66+
1. **Identify the Incident**: Clearly identify the nature of the unacceptable behavior and gather any evidence, such as screenshots or messages.
67+
68+
2. **Report the Incident**: Reach out to a project maintainer or designated community leader through direct message or email. Include detailed information about the incident, such as:
69+
- Names of those involved (if known)
70+
- Dates and times of the incident
71+
- Context surrounding the behavior
72+
- Any relevant evidence
73+
74+
3. **Documentation**: Keep a record of your report and any responses received to ensure a transparent resolution process.
75+
76+
4. **Confidentiality**: All reports will be treated confidentially. Personal information will only be shared with those involved in the resolution process.
77+
78+
5. **Follow-Up**: You can request updates on the status of your report and any actions taken.
79+
80+
---
81+
82+
## 6. Consequences of Unacceptable Behavior
83+
84+
Consequences for violating the Code of Conduct will be determined based on the severity and frequency of the behavior. Potential consequences include:
85+
86+
| **Consequences** | **Description** |
87+
| ------------------------ | ------------------------------------------------------------------------------------------- |
88+
| **Verbal Warning** | A private discussion addressing the behavior. |
89+
| **Written Warning** | A formal notice outlining the behavior and expected changes. |
90+
| **Temporary Suspension** | A temporary ban from contributing to the project or participating in community discussions. |
91+
| **Permanent Removal** | A permanent ban for severe violations or repeated offenses. |
92+
93+
---
94+
95+
## 7. Scope
96+
97+
This Code of Conduct applies to all participants in the CopilotKit community, including contributors, maintainers, and users, both online and offline. It encompasses interactions in the following areas:
98+
99+
- GitHub discussions and issues on the [open-generative-ui](https://github.com/CopilotKit/open-generative-ui) repository
100+
- The broader [CopilotKit Discord](https://discord.gg/6dffbvGU3D)
101+
- Community meetings and events
102+
- Social media platforms
103+
- Any other official channels related to CopilotKit
104+
105+
---
106+
107+
## 8. Acknowledgments
108+
109+
This Code of Conduct is adapted from the [CopilotKit Code of Conduct](https://github.com/CopilotKit/CopilotKit/blob/main/CODE_OF_CONDUCT.md) and draws inspiration from various open-source communities dedicated to inclusivity and respect. We appreciate their efforts in creating positive environments and strive to uphold similar standards in our community. Your feedback is always welcome to improve our Code of Conduct and practices.
110+
111+
---
112+
113+
## 9. Get Involved
114+
115+
We invite you to contribute to Open Generative UI! Whether through code, documentation, or community engagement, your participation is invaluable. For more information on how to contribute, please check our [Contributing Guide](./CONTRIBUTING.md).
116+
117+
Thank you for being part of the CopilotKit community! Together, we can build a safe, respectful, and innovative space for all.

CONTRIBUTING.md

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
# Contributing to Open Generative UI
2+
3+
⭐ Thank you for your interest in contributing!!
4+
5+
Here's how you can contribute to this repository.
6+
7+
## How can I contribute?
8+
9+
**Please reach out to us first before starting any significant work on new or existing features.**
10+
11+
We love community contributions! That said, we want to make sure we're all on the same page before you start.
12+
Investing a lot of time and effort just to find out it doesn't align with the project feels awful, and we don't want that to happen.
13+
It also helps to make sure the work you're planning isn't already in progress.
14+
15+
Please file an issue first: https://github.com/CopilotKit/open-generative-ui/issues
16+
Or, reach out to us on Discord: https://discord.com/invite/6dffbvGU3D
17+
18+
Ready to contribute but seeking guidance? Reach out to us directly on [Discord](https://discord.gg/6dffbvGU3D) for immediate assistance! Alternatively, you're welcome to raise an issue and one of our dedicated maintainers will promptly steer you in the right direction!
19+
20+
## Found a bug?
21+
22+
If you find a bug in the source code, you can help us by [submitting an issue](https://github.com/CopilotKit/open-generative-ui/issues/new) to our GitHub Repository. Even better, you can submit a Pull Request with a fix.
23+
24+
## Missing a feature?
25+
26+
So, you've got an awesome feature in mind? Throw it over to us by [creating an issue](https://github.com/CopilotKit/open-generative-ui/issues/new) on our GitHub Repo.
27+
28+
# How do I make a code contribution?
29+
30+
## Step 1: Make a fork
31+
32+
Fork the [open-generative-ui](https://github.com/CopilotKit/open-generative-ui) repository to your GitHub account. This means that you'll have a copy of the repository under _your-GitHub-username/open-generative-ui_.
33+
34+
## Step 2: Clone the repository to your local machine
35+
36+
```bash
37+
git clone https://github.com/<your-GitHub-username>/open-generative-ui
38+
```
39+
40+
## Step 3: Prepare the development environment
41+
42+
This is a **Turborepo monorepo** with a Next.js frontend and a LangGraph Python agent.
43+
44+
### 1) Install Prerequisites
45+
46+
- Node.js 20.x or later
47+
- pnpm v9.x installed globally (`npm i -g pnpm@^9`)
48+
- Python 3.11+ (for the agent)
49+
50+
> **Windows users:** Enable **Developer Mode** (Settings > System > For developers > Developer Mode → On) to allow symlink creation. This is required for Next.js standalone builds and pnpm to work correctly.
51+
52+
### 2) Install Dependencies and Set Up
53+
54+
The quickest way to get started is with the Makefile:
55+
56+
```bash
57+
make setup # Installs deps + creates .env template
58+
```
59+
60+
Or manually:
61+
62+
```bash
63+
pnpm install
64+
echo 'OPENAI_API_KEY=your-key-here' > apps/agent/.env
65+
```
66+
67+
Then add your real OpenAI API key to `apps/agent/.env`.
68+
69+
### 3) Run the Project
70+
71+
```bash
72+
make dev # Start all services (frontend + agent + mcp)
73+
```
74+
75+
Or run services individually:
76+
77+
```bash
78+
make dev-app # Next.js frontend on http://localhost:3000
79+
make dev-agent # LangGraph agent on http://localhost:8123
80+
make dev-mcp # MCP server
81+
```
82+
83+
You can also use `pnpm` directly:
84+
85+
```bash
86+
pnpm dev # All services
87+
pnpm dev:app # Frontend only
88+
pnpm dev:agent # Agent only
89+
```
90+
91+
### 4) Build and Lint
92+
93+
```bash
94+
make build # Build all apps
95+
make lint # Lint all apps
96+
make clean # Clean build artifacts
97+
```
98+
99+
Run `make help` to see all available commands.
100+
101+
## Step 4: Create a branch
102+
103+
Create a new branch for your changes.
104+
In order to keep branch names uniform and easy-to-understand, please use the following conventions for branch naming:
105+
106+
- for docs changes: `docs/<ISSUE_NUMBER>-<CUSTOM_NAME>`
107+
- for new features: `feat/<ISSUE_NUMBER>-<CUSTOM_NAME>`
108+
- for bug fixes: `fix/<ISSUE_NUMBER>-<CUSTOM_NAME>`
109+
110+
```bash
111+
git checkout -b <new-branch-name-here>
112+
```
113+
114+
## Step 5: Make your changes
115+
116+
The project has two main areas you can contribute to:
117+
118+
| Area | Location | Tech |
119+
|------|----------|------|
120+
| **Frontend** | `apps/app/` | Next.js 16, React 19, Tailwind CSS 4, CopilotKit v2 |
121+
| **Agent** | `apps/agent/` | LangGraph, Python, CopilotKit middleware |
122+
123+
## Step 6: Add the changes that are ready to be committed
124+
125+
Stage the changes that are ready to be committed:
126+
127+
```bash
128+
git add .
129+
```
130+
131+
## Step 7: Commit the changes (Git)
132+
133+
Commit the changes with a short message. (See below for more details on how we structure our commit messages)
134+
135+
```bash
136+
git commit -m "<type>(<scope>): <subject>"
137+
```
138+
139+
## Step 8: Push the changes to the remote repository
140+
141+
Push the changes to the remote repository using:
142+
143+
```bash
144+
git push origin <branch-name-here>
145+
```
146+
147+
## Step 9: Create Pull Request
148+
149+
In GitHub, do the following to submit a pull request to the upstream repository:
150+
151+
1. Give the pull request a title and a short description of the changes made. Include also the issue or bug number associated with your change. Explain the changes that you made, any issues you think exist with the pull request you made, and any questions you have for the maintainer.
152+
153+
Remember, it's okay if your pull request is not perfect (no pull request ever is). The reviewer will be able to help you fix any problems and improve it!
154+
155+
2. Wait for the pull request to be reviewed by a maintainer.
156+
157+
3. Make changes to the pull request if the reviewing maintainer recommends them.
158+
159+
Celebrate your success after your pull request is merged :-)
160+
161+
## Git Commit Messages
162+
163+
We structure our commit messages like this:
164+
165+
```
166+
<type>(<scope>): <subject>
167+
```
168+
169+
Example
170+
171+
```
172+
feat(agent): add new visualization tool for 3D scenes
173+
fix(app): correct iframe resize observer cleanup
174+
docs(readme): update architecture diagram
175+
```
176+
177+
### Types:
178+
179+
- **feat**: A new feature
180+
- **fix**: A bug fix
181+
- **docs**: Changes to the documentation
182+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)
183+
- **refactor**: A code change that neither fixes a bug nor adds a feature
184+
- **perf**: A code change that improves performance
185+
- **test**: Adding missing or correcting existing tests
186+
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation
187+
188+
### Scopes:
189+
190+
- **app**: Changes to the Next.js frontend (`apps/app/`)
191+
- **agent**: Changes to the LangGraph agent (`apps/agent/`)
192+
- **readme**: Documentation changes
193+
194+
## Code of Conduct
195+
196+
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
197+
198+
[Code of Conduct](./CODE_OF_CONDUCT.md)
199+
200+
Our Code of Conduct means that you are responsible for treating everyone on the project with respect and courtesy.
201+
202+
## Need Help?
203+
204+
- **Questions**: Use our [Discord support channel](https://discord.com/invite/6dffbvGU3D) for any questions you have.
205+
- **Resources**: Visit [CopilotKit documentation](https://docs.copilotkit.ai/) for more helpful documentation.
206+
207+
⭐ Happy coding, and we look forward to your contributions!

Makefile

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
.PHONY: help install setup dev dev-app dev-agent dev-mcp build lint clean
2+
3+
help: ## Show this help message
4+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
5+
6+
install: ## Install all dependencies (Node + Python)
7+
pnpm install
8+
9+
setup: install ## Full setup: install deps and create .env from template
10+
@if [ ! -f apps/agent/.env ]; then \
11+
echo "OPENAI_API_KEY=your-key-here" > apps/agent/.env; \
12+
echo "Created apps/agent/.env — add your OpenAI API key"; \
13+
else \
14+
echo "apps/agent/.env already exists, skipping"; \
15+
fi
16+
17+
dev: ## Start all services (frontend + agent + mcp)
18+
pnpm dev
19+
20+
dev-app: ## Start Next.js frontend only (http://localhost:3000)
21+
pnpm dev:app
22+
23+
dev-agent: ## Start LangGraph agent only (http://localhost:8123)
24+
pnpm dev:agent
25+
26+
dev-mcp: ## Start MCP server only
27+
pnpm dev:mcp
28+
29+
build: ## Build all apps
30+
pnpm build
31+
32+
lint: ## Lint all apps
33+
pnpm lint
34+
35+
clean: ## Clean build artifacts
36+
pnpm clean

0 commit comments

Comments
 (0)