Skip to content
Open
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
36 changes: 36 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Repository Guidelines

## Project Structure & Module Organization
Wapi.go targets Go 1.21. Core SDK packages live under `pkg/` (messaging, events, business), shared HTTP plumbing sits in `internal/`, and orchestration helpers live in `manager/`. Examples are in `examples/` for quick sandbox runs. Generated references belong in `docs/` with templates in `docs/templates`. Tests sit beside implementations as `*_test.go`.

## Build, Test, and Development Commands
- `go build ./...`: compiles all packages to catch cross‑package breakage early.
- `go test ./...`: runs the standard test suite; narrow with `-run`.
- `make format`: invokes `go fmt ./...` to match canonical Go style.
- `make docs`: installs `gomarkdoc` if absent and regenerates `docs/api-reference/`.
- `go run ./examples/chat-bot` or `go run ./examples/http-backend-integration`: validate changes against sample flows.

## Coding Style & Naming Conventions
- Idiomatic Go: tabs and `gofmt` output.
- Exported identifiers use PascalCase with package‑level doc comments.
- Unexported helpers use camelCase and remain package‑local.
- Files/dirs are lowercase with hyphens. Prefer narrow, WhatsApp‑specific structs and reuse constructors from `manager/` and `pkg/`.

## Testing Guidelines
- Use the standard `testing` package with table‑driven `TestXxx` functions.
- Stub outbound HTTP by wrapping `internal/request_client` (no live endpoints).
- Cover serialization, validation, and webhook dispatch; ensure `go test ./...` is clean.

## Commit & Pull Request Guidelines
- Conventional Commits per `COMMIT_CONVENTION.md`, e.g., `feat(messaging): add template sender`.
- Branch names: `type/topic` (e.g., `fix/webhook-validation`).
- PRs summarize behavior, link issues, attach payloads/screenshots for API changes, and mention any doc updates (`make docs`).

## Documentation Workflow
- API references are generated artifacts. Update doc comments and templates, not generated files.
- After changes, run `make docs` and commit both source and generated markdown.

## Security & Configuration Tips (Optional)
- Provide API tokens via environment or secret management; never commit credentials.
- Store webhook secrets securely and rotate regularly.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Visit the documentation of the SDK [here](https://golang.wapikit.com)

## Status

Beta Version - This SDK is not stable right now. It is currently in beta version. Report issues [here](https://github.com/wapikit/wapi.go/issues).
Beta Version - This SDK is not stable right now. It is currently in beta version. Report issues [here](https://github.com/gTahidi/wapi.go/issues).

This SDK is part of a technical suite built to support the WhatsApp Business Application Development ecosystem. This SDK also has a Node.js version, you can check it out [here](https://wapikit/wapi.js/js).

Expand Down Expand Up @@ -40,7 +40,7 @@ This assumes you already have a working Go environment, if not please see
`go get` _will always pull the latest tagged release from the master branch._

```sh
go get github.com/wapikit/wapi.go
go get github.com/gTahidi/wapi.go
```

> Note: This SDK is not affiliated with the official WhatsApp Cloud API or does not act as any official solution provided the the Meta Inclusive Private Limited, this is just a open source SDK built for developers to support them in building whatsapp cloud api based chat bots easily.
Expand All @@ -54,13 +54,13 @@ You can check out the example WhatsApp bot here. [Example Chatbot](./example-cha
Import the package into your project.
This repository has three packages exported:

- github.com/wapikit/wapi.go/components
- github.com/wapikit/wapi.go/wapi/wapi
- github.com/wapikit/wapi.go/wapi/business
- github.com/wapikit/wapi.go/wapi/events
- github.com/gTahidi/wapi.go/components
- github.com/gTahidi/wapi.go/wapi/wapi
- github.com/gTahidi/wapi.go/wapi/business
- github.com/gTahidi/wapi.go/wapi/events

```go
import "github.com/wapikit/wapi.go/wapi/wapi"
import "github.com/gTahidi/wapi.go/wapi/wapi"
```

Construct a new Wapi Client to access the managers in order to send messages and listen to incoming notifications.
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/internal.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```go
import "github.com/wapikit/wapi.go/internal"
import "github.com/gTahidi/wapi.go/internal"
```


Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/manager.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```go
import "github.com/wapikit/wapi.go/manager"
import "github.com/gTahidi/wapi.go/manager"
```


Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/pkg/business.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```go
import "github.com/wapikit/wapi.go/pkg/business"
import "github.com/gTahidi/wapi.go/pkg/business"
```


Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/pkg/client.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```go
import "github.com/wapikit/wapi.go/pkg/client"
import "github.com/gTahidi/wapi.go/pkg/client"
```


Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/pkg/components.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```go
import "github.com/wapikit/wapi.go/pkg/components"
import "github.com/gTahidi/wapi.go/pkg/components"
```


Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/pkg/events.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```go
import "github.com/wapikit/wapi.go/pkg/events"
import "github.com/gTahidi/wapi.go/pkg/events"
```


Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/pkg/messaging.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```go
import "github.com/wapikit/wapi.go/pkg/messaging"
import "github.com/gTahidi/wapi.go/pkg/messaging"
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Wapi.go SDK provides a simaple and easy to use classes architecture to build mes

<Note>In all the media messages which includes image, document, audio, video and sticker, either we will have to use the Id of media, or a publicly accessible hosted media Url.</Note>

<Tip> With the rapidly changing whatsapp business platform features and offerings, we try our best to be in sync with the new features provided by the API. If you think we are missing upon any of the available type of message support. You can open a github issue [here](https://github.com/wapikit/wapi.go/issues) or direclty [contact](/guide/contact) the maintainer of the project.</Tip>
<Tip> With the rapidly changing whatsapp business platform features and offerings, we try our best to be in sync with the new features provided by the API. If you think we are missing upon any of the available type of message support. You can open a github issue [here](https://github.com/gTahidi/wapi.go/issues) or direclty [contact](/guide/contact) the maintainer of the project.</Tip>

### Text Message

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The first step to build a Wapi.go based chat bot is to create a new project. You

```go
go mod init <project-name>
go get github.com/wapikit/wapi.go
go get github.com/gTahidi/wapi.go
```

### Other use cases
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ description: 'Welcome to the home of your new documentation'
<Card
title="Get Inspiration"
icon="stars"
href="https://github.com/wapikit/wapi.go/tree/master/packages/example-chat-bot"
href="https://github.com/gTahidi/wapi.go/tree/master/packages/example-chat-bot"
>
Check out the example chat bot to get inspiration
</Card>
Expand Down
8 changes: 4 additions & 4 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"topbarLinks": [
{
"name": "Report Bugs",
"url": "https://github.com/wapikit/wapi.go/issues/new"
"url": "https://github.com/gTahidi/wapi.go/issues/new"
}
],
"topbarCtaButton": {
"name": "Github",
"url": "https://github.com/wapikit/wapi.go"
"url": "https://github.com/gTahidi/wapi.go"
},
"tabs": [
{
Expand All @@ -51,7 +51,7 @@
{
"name": "Star us on GitHub",
"icon": "github",
"url": "https://github.com/wapikit/wapi.go"
"url": "https://github.com/gTahidi/wapi.go"
},
{
"name": "Sign up for WapiKit",
Expand Down Expand Up @@ -122,7 +122,7 @@
],
"footerSocials": {
"x": "https://x.com/wapikit",
"github": "https://github.com/wapikit/wapi.go",
"github": "https://github.com/gTahidi/wapi.go",
"linkedin": "https://www.linkedin.com/company/wapikit"
}
}
8 changes: 4 additions & 4 deletions examples/chat-bot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"strings"
"time"

"github.com/wapikit/wapi.go/pkg/business"
wapi "github.com/wapikit/wapi.go/pkg/client"
wapiComponents "github.com/wapikit/wapi.go/pkg/components"
"github.com/wapikit/wapi.go/pkg/events"
"github.com/gTahidi/wapi.go/pkg/business"
wapi "github.com/gTahidi/wapi.go/pkg/client"
wapiComponents "github.com/gTahidi/wapi.go/pkg/components"
"github.com/gTahidi/wapi.go/pkg/events"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions examples/http-backend-integration/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"

"github.com/labstack/echo/v4"
wapi "github.com/wapikit/wapi.go/pkg/client"
"github.com/wapikit/wapi.go/pkg/components"
"github.com/wapikit/wapi.go/pkg/events"
wapi "github.com/gTahidi/wapi.go/pkg/client"
"github.com/gTahidi/wapi.go/pkg/components"
"github.com/gTahidi/wapi.go/pkg/events"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/wapikit/wapi.go
module github.com/gTahidi/wapi.go

go 1.21.3

Expand Down
Loading