Back to Home
Quick Start
v1.0.0
Choose Your Integration Method

How would you like to integrate Chitthi?

Select the integration method that best fits your needs. You can either set up the project locally with full control, or use our hosted APIs for quick integration.

Local Setup

Full control with local infrastructure

Complete control over your infrastructure
Setup Redis and PostgreSQL yourself
Customize as per your needs
Perfect for production deployments

Local Setup Guide

Set up Chitthi locally with full control over your infrastructure

Prerequisites

Docker & Docker Compose
Go 1.24.3+ (for development)
Git
PostgreSQL & Redis (or Docker)

1Clone Repository

bash
git clone https://github.com/imsks/chitthi.git
cd chitthi

2Environment Configuration

Create a .env file in the root directory:

env
PORT=8080

# Redis config
REDIS_URL=redis://redis:6543

# Postgres config
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=chitthi
DATABASE_URL=postgres://postgres:postgres@db:5432/chitthi?sslmode=disable

# Platform API Keys
BREEVO_API_KEY=
MAILERSEND_API_KEY=

# Message Queue
RABBITMQ_URL=amqp://guest:guest@localhost:5672/

# SMTP
SMTP_HOST=
SMTP_PORT=
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_FROM=
SMTP_USE_TLS=true

3Start Infrastructure

bash
# Start Redis and PostgreSQL
docker compose up redis db -d

4Run the Service

bash
# Development with hot reload
air

# Or run directly
go run cmd/main.go

5Test the API

bash
curl -X POST http://localhost:8080/send-email \
  -H "Content-Type: application/json" \
  -H "X-SMTP-Host: smtp.gmail.com" \
  -H "X-SMTP-Port: 587" \
  -H "X-SMTP-Username: your-email@gmail.com" \
  -H "X-SMTP-Password: your-app-password" \
  -H "X-SMTP-From: your-email@gmail.com" \
  -H "X-SMTP-Use-TLS: true" \
  -d '{
    "from_email": "sender@example.com",
    "to_email": "recipient@example.com",
    "subject": "Test Email",
    "html_content": "<h1>Hello World!</h1>"
  }'

Success!

Your local Chitthi service is now running on http://localhost:8080