client-ping

Go-Notion Contact Bridge

Version License Issues Pull Requests Last Commit Go Version Code Size Contributors Follow @wafley

Go-Notion Contact Bridge (Internal Project: Client Ping) is an efficient third-party API service designed to handle contact forms on portfolio or static websites. This service bridges frontend submissions directly to a Notion database asynchronously using a robust concurrency system.


Why This Exists

Built to solve a simple problem: handle contact forms without relying on paid services or slowing down the frontend.


API

POST /api/contact

Submit a contact message.

Request Body

{
    "name": "Wafley",
    "email": "wafley@example.com",
    "message": "Hello, I'm interested in collaborating on a Go project!"
}

Responses


Architecture

How It Works

  1. Request hits the API
  2. Data is pushed into a buffered channel
  3. API responds immediately (202)
  4. Workers process and send data to Notion in parallel

No blocking. No waiting. No degraded UX.


Project Structure

.
├── cmd/api/        # Entry point
├── internal/
│   ├── app/        # Worker & dispatcher logic
│   ├── handler/    # HTTP layer & validation
│   ├── model/      # Data structures
│   └── service/    # Notion integration
└── logs/           # Logs & error tracking

Getting Started

git clone https://github.com/wafley/client-ping.git
cd client-ping

Copy .env.example to .env and fill in your credentials::

PORT=3030
NOTION_TOKEN=your_secret_token
NOTION_DATABASE_ID=your_db_id

Run:

go run cmd/api/main.go

Testing

go test -v -cover ./...

~90% coverage including concurrency and external API mocking.


Support & Feedback


Created with ❤️ by wafley