A Go API service that connects to Google Calendar, detects scheduling intent from natural language messages, and finds available meeting slots.
- Ingests messages from email, text, Slack, etc. via a REST endpoint
- Parses natural language for scheduling intent ("let's sync Tuesday", "schedule a call this week")
- Queries Google Calendar free/busy data to find open slots within work hours
- OAuth2 flow for Google account linking with token persistence in Postgres
ββββββββββββββββ
POST /v1/messageβ β
ββββββββββββββββΊβ Huma API β
β (chi) β
ββββββββ¬ββββββββ
β
ββββββββββββ΄βββββββββββ
β β
ββββββββββΌβββββββββ ββββββββββΌβββββββββ
β Schedule β β Google β
β Intent NLP β β Calendar API β
β β β (Free/Busy) β
βββββββββββββββββββ ββββββββββ¬ββββββββββ
β
ββββββββββΌβββββββββ
β Postgres β
β (users/tokens) β
βββββββββββββββββββ
- Go with Cobra CLI, Chi router, Huma API framework
- Postgres via pgx connection pool
- Google Calendar API with OAuth2
- Redis for caching
- Docker Compose for local dev with hot reload (CompileDaemon)
- Go 1.20+
- Docker & Docker Compose
- Google OAuth credentials (
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET)
# Set required env vars
export GOOGLE_CLIENT_ID=your-client-id
export GOOGLE_CLIENT_SECRET=your-client-secret
# Start Postgres, Redis, and the API
docker compose upThe API starts on http://localhost:8888.
# Build for your platform
make native
# Build for all platforms (linux/darwin, amd64/arm64)
make all
# Run
./bin/syncron serve| Method | Endpoint | Description |
|---|---|---|
POST |
/v1/message |
Send a message, get scheduling analysis back |
GET |
/v1/greeting/{name} |
Health check / greeting |
GET |
/login-here |
Start Google OAuth flow |
GET |
/callback |
OAuth callback (stores tokens) |
curl -X POST http://localhost:8888/v1/message \
-H "Content-Type: application/json" \
-d '{"message": "let'\''s schedule a sync on Thursday"}'{"message": "The meeting is scheduled 2 days from now."}βββ main.go # CLI entrypoint (Cobra)
βββ server/
β βββ server.go # HTTP server, routes, OAuth handlers
β βββ db.go # Postgres connection pool
βββ schedule/
β βββ schedule.go # Intent detection & day parsing
β βββ google.go # Google Calendar OAuth & free/busy queries
βββ migrations/
β βββ 001_init.up.sql # Users table with OAuth token storage
βββ Dockerfile
βββ docker-compose.yaml
βββ Makefile # Cross-platform build targets