Skip to content

Commit e887c5f

Browse files
committed
feat(docs): Improve API documentation in README
- Add dedicated API Documentation section to README.md. - Point directly to Swagger UI (/api/docs) and raw OpenAPI spec (/api/docs/openapi.yaml) endpoints. - Link to API.md for additional details (Postman import). - Remove old temp-api-doc.md references implicitly by deleting the file.
1 parent 36c9abc commit e887c5f

File tree

6 files changed

+292
-164
lines changed

6 files changed

+292
-164
lines changed

API.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Agent Browser API Documentation
2+
3+
## OpenAPI Integration
4+
5+
This API provides OpenAPI 3.1 documentation that can be accessed in various ways:
6+
7+
### Swagger UI
8+
9+
Access the interactive Swagger UI documentation at:
10+
```
11+
http://localhost:8080/api/docs
12+
```
13+
14+
This provides a web-based interface to explore the API, read documentation, and make test requests.
15+
16+
### OpenAPI Specification
17+
18+
The raw OpenAPI specification can be accessed at:
19+
```
20+
http://localhost:8080/api/docs/openapi.yaml
21+
```
22+
23+
### Postman Integration
24+
25+
To use this API with Postman:
26+
27+
1. Open Postman
28+
2. Click on "Import" in the top left corner
29+
3. Select the "Link" tab
30+
4. Enter the URL: `http://localhost:8080/api/docs/openapi.yaml`
31+
5. Click "Import"
32+
33+
This will create a Postman collection with all endpoints pre-configured.

CODE_OF_CONDUCT.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
- Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
- The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
- Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official email address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and
63+
fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
119+
120+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
121+
enforcement ladder][Mozilla CoC].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
125+
[https://www.contributor-covenant.org/translations][translations].
126+
127+
[homepage]: https://www.contributor-covenant.org
128+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
129+
[Mozilla CoC]: https://github.com/mozilla/diversity
130+
[FAQ]: https://www.contributor-covenant.org/faq
131+
[translations]: https://www.contributor-covenant.org/translations

CONTRIBUTING.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Contributing to Agent Browser
2+
3+
First off, thank you for considering contributing to agent-browser!
4+
This project is released under the MIT License, which means your contributions
5+
will also be covered under the same permissive license.
6+
7+
### Table of Contents
8+
9+
- [Code of Conduct](#code-of-conduct)
10+
- [Getting Started](#getting-started)
11+
- [How to Contribute](#how-to-contribute)
12+
- [Guidelines for Non-Code Contributions](#guidelines-for-non-code-contributions)
13+
- [Reporting Bugs](#reporting-bugs)
14+
- [Suggesting Enhancements](#suggesting-enhancements)
15+
- [Pull Requests](#pull-requests)
16+
- [Development Process](#development-process)
17+
- [License](#license)
18+
19+
## Code of Conduct
20+
21+
We have adopted a Code of Conduct that we expect project participants to adhere
22+
to. Please read [the full text](CODE_OF_CONDUCT.md) so that you can understand
23+
what actions will and will not be tolerated.
24+
25+
## Getting Started
26+
27+
### Fork-based workflow (recommended as a playground)
28+
29+
1. Fork the repository
30+
2. Clone your fork:
31+
`git clone https://github.com/your-username/agent-browser.git`
32+
3. Create a new branch: `git checkout -b feature/your-feature-name`
33+
4. Make your changes
34+
5. Push to your fork: `git push origin feature/your-feature-name`
35+
6. Open a Pull Request
36+
37+
### Direct repository workflow (for contributors)
38+
39+
1. Clone the repository directly:
40+
`git clone https://github.com/co-browser/agent-browser.git`
41+
2. Create a new branch: `git checkout -b feature/your-feature-name`
42+
3. Make your changes
43+
4. Push to the repository: `git push origin feature/your-feature-name`
44+
5. Open a Pull Request
45+
46+
If you're interested in being contributor, please reach out to the maintainers
47+
after making a few successful contributions via issues and pull requests.
48+
49+
## How to Contribute
50+
51+
### Guidelines for Non-Code Contributions
52+
53+
We appreciate your attention to detail. However, minor fixes like typos or
54+
grammar corrections should not be submitted individually. Instead, create an
55+
issue noting these corrections, and we'll batch them into larger updates.
56+
57+
### Reporting Bugs
58+
59+
We use GitHub issues to track bugs. Before creating a bug report:
60+
61+
- Search existing
62+
[Issues](https://github.com/co-browser/agent-browser/issues) to
63+
ensure it hasn't already been reported
64+
- If you find a closed issue that seems to address your problem, open a new
65+
issue and include a link to the original
66+
67+
When submitting a bug report, please use our bug report template and include as
68+
much detail as possible.
69+
70+
### Suggesting Enhancements
71+
72+
Enhancement suggestions are tracked through GitHub issues. Please use our
73+
feature request template when suggesting enhancements.
74+
75+
### Pull Requests
76+
77+
- Follow our pull request template
78+
- Include screenshots and animated GIFs in your pull request whenever possible
79+
- Follow our coding conventions and style guidelines
80+
- Write meaningful commit messages
81+
- Update documentation as needed
82+
- Add tests for new features
83+
- Pull requests undergo automated checks, including build and linting
84+
85+
## Development Process
86+
87+
1. Pick an issue to work on or create a new one
88+
2. Comment on the issue to let others know you're working on it
89+
3. Create a branch with a descriptive name
90+
4. Write your code following our style guidelines
91+
5. Add tests for new functionality
92+
6. Update documentation as needed
93+
7. Submit a pull request
94+
8. Respond to code review feedback
95+
96+
## License
97+
98+
By contributing to agent-browser, you agree that your contributions
99+
will be licensed under the MIT License. See [LICENSE](LICENSE) for details.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 cobrowser.xyz
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,26 +69,17 @@ This project uses Go modules and follows a standard Go project layout:
6969

7070
2. **Access the UI (Placeholder):** Open your browser to `http://localhost:8080/ui`.
7171

72-
## Development
73-
74-
### Common Makefile Targets
72+
## API Documentation
7573

76-
* `make setup`: Runs `scripts/setup.sh` to install/update necessary development tools (`templ`, `golangci-lint`) and check `PATH`.
77-
* `make build`: Compile the application binary into `out/agent-browser`.
78-
* `make run`: Build and run the application.
79-
* `make generate`: Generate Go code from `.templ` files.
80-
* `make test`: Run Go tests.
81-
* `make fmt`: Format Go code (`gofmt`) and `.templ` files (`templ fmt`).
82-
* `make tidy`: Tidy `go.mod` and `go.sum` files.
83-
* `make lint`: Run the Go linter (`golangci-lint`).
84-
* `make help`: Show all available targets.
74+
The backend server exposes a REST API for managing resources. When the server is running, you can access the documentation via:
8575

86-
## Continuous Integration
76+
* **Interactive Documentation (Swagger UI):** `http://localhost:8080/api/docs`
77+
* **Raw OpenAPI Specification:** `http://localhost:8080/api/docs/openapi.yaml`
8778

88-
This project uses GitHub Actions for Continuous Integration (CI) and release automation. The workflows are defined in the `.github/workflows/` directory.
79+
See [API.md](API.md) for additional details, such as importing the specification into tools like Postman.
8980

90-
* **Go CI (`go.yaml`):** This workflow runs on pushes and pull requests to the `main` branch. It checks out the code, sets up Go, runs `make setup`, `make tidy`, formatting checks (`make fmt`), linting (`make lint`), tests (`make test`) and builds the project (`make build`) to ensure Go code quality and stability.
81+
## Development
9182

92-
* **MegaLinter (`mega-linter.yaml`):** This workflow runs on pushes and pull requests to the `main` branch. It utilizes [MegaLinter](https://megalinter.io/) to analyze the entire codebase using a wide range of linters for various languages and formats (including Go, YAML, Markdown, Shell scripts, etc.). This helps maintain consistent coding standards and identify potential issues across the whole project. Reports are uploaded as artifacts.
83+
### Common Makefile Targets
9384

94-
* **Release (`release.yaml`):** This workflow runs only on pushes to the `main` branch. It uses [semantic-release](https://github.com/semantic-release/semantic-release) to automate version management and package publishing. Based on conventional commit messages, it determines the next version number, generates release notes, and creates a Git tag and GitHub release.
85+
* `

0 commit comments

Comments
 (0)