Skip to content

bytewaffley/client-ping

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

  • No third-party form services (self-hosted)
  • Notion as a centralized inbox
  • Instant response to users (non-blocking API)

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

  • 202 Accepted → queued successfully
  • 422 Unprocessable Entity → missing fields
  • 400 Bad Request → invalid JSON

Architecture

  • Go (Golang)
  • Clean Architecture
  • Worker Pool (Goroutines + Channels)
  • Notion API Integration

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

  • Report bugs or request features: open an issue on GitHub → issues
  • Discuss ideas and roadmap: GitHub Discussions (if enabled) → discussions

Created with ❤️ by wafley

About

A high-performance asynchronous Go backend that connects website contact forms to Notion databases, built as a capstone for my Go learning journey.

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages