Skip to content
Merged
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
72 changes: 14 additions & 58 deletions landing/content/1.docs/1.getting-started/2.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The fastest way to get started. No infrastructure to manage.

#### 1. Sign Up

Create your free account at [sendook.com/signup](/signup) - no credit card required.
Create your free account at [sendook.com/register](https://app.sendook.com/register) - no credit card required.

#### 2. Get Your API Key

Expand All @@ -34,38 +34,14 @@ Install the official SDK for your language:
npm install @sendook/node-sdk
```

```bash [Python]
pip install sendook
```

```bash [Go]
go get github.com/sendook/sendook-go
```

#### 4. Verify Installation

Test your setup with a quick verification:

```javascript [Node.js]
import { Sendook } from '@sendook/node-sdk';

const client = new Sendook({
apiKey: process.env.SENDOOK_API_KEY
});

// Verify connection
const organization = await client.organizations.get();
console.log(`Connected as: ${organization.name}`);
```

```python [Python]
from sendook import Sendook

client = Sendook(api_key=os.environ['SENDOOK_API_KEY'])

# Verify connection
organization = client.organizations.get()
print(f"Connected as: {organization.name}")
const sendook = new Sendook(process.env.SENDOOK_API_KEY);
```

That's it! You're ready to create inboxes and send emails.
Expand Down Expand Up @@ -99,20 +75,11 @@ Create a `.env` file with your configuration:
MONGODB_URI=mongodb://localhost:27017/sendook

# Email Domain
EMAIL_DOMAIN=yourdomain.com

# API Configuration
API_PORT=3000
JWT_SECRET=your-secure-random-secret

# SMTP Settings (for sending)
SMTP_HOST=smtp.yourprovider.com
SMTP_PORT=587
SMTP_USER=your@email.com
SMTP_PASS=your-password
DEFAULT_EMAIL_DOMAIN=yourdomain.com

# Webhook Configuration
WEBHOOK_SECRET=your-webhook-secret
# Email provider credentials
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key
```
Comment on lines +78 to 83
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Add security guidance for .env file handling.

While the AWS credentials shown are placeholders, documentation should explicitly warn users not to commit .env files to version control and recommend adding .env to .gitignore. Even placeholder values in documentation could mislead users into thinking it's safe to include real credentials in docs or commit them.

Consider adding a note like:

⚠️ **Important:** Never commit `.env` to version control. Add it to `.gitignore`:
echo ".env" >> .gitignore
🤖 Prompt for AI Agents
In landing/content/1.docs/1.getting-started/2.installation.md around lines 78 to
83, add a clear security note warning users not to commit .env files to version
control and instruct them to add .env to .gitignore; include a short admonition
phrased like "Important: Never commit .env to version control" and a one-line
command suggestion to append .env to .gitignore so readers know how to protect
credentials.


#### 3. Start with Docker Compose
Expand All @@ -124,17 +91,14 @@ docker-compose up -d
This starts:
- Sendook API server
- MongoDB database
- SMTP receiver
- Worker processes for webhooks

#### 4. Configure DNS Records

Add these DNS records to receive emails:

```text
MX @ 10 mail.yourdomain.com
A mail your-server-ip
TXT @ "v=spf1 mx ~all"
MX @ 10 inbound-smtp.{your-aws-region}.amazonaws.com
TXT _dmarc "v=DMARC1; p=reject;"
```

For DKIM, generate keys and add the provided TXT record:
Expand All @@ -146,12 +110,13 @@ docker exec sendook npm run generate-dkim
#### 5. Create Your First Organization

```bash
curl -X POST http://localhost:3000/api/v1/auth/signup \
curl -X POST http://localhost:3000/auth/register \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "admin@yourdomain.com",
"password": "secure-password",
"organizationName": "My Organization"
}'
```

Expand All @@ -168,18 +133,9 @@ Log in to the dashboard at `http://localhost:3000` and create an API key.
| Variable | Description | Example |
|----------|-------------|---------|
| `MONGODB_URI` | MongoDB connection string | `mongodb://localhost:27017/sendook` |
| `JWT_SECRET` | Secret for JWT tokens | Random 32+ char string |
| `EMAIL_DOMAIN` | Your email domain | `mail.example.com` |

### Optional Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `API_PORT` | API server port | `3000` |
| `SMTP_HOST` | SMTP server for sending | Required for sending |
| `WEBHOOK_MAX_RETRIES` | Webhook retry attempts | `3` |
| `EMAIL_RETENTION_DAYS` | Days to keep emails | `30` |
| `MAX_ATTACHMENT_SIZE` | Max attachment size (MB) | `25` |
| `DEFAULT_EMAIL_DOMAIN` | Your email domain | `mail.example.com` |
| `AWS_ACCESS_KEY_ID` | AWS access key ID | `your-aws-access-key-id` |
| `AWS_SECRET_ACCESS_KEY` | AWS secret access key | `your-aws-secret-access-key` |

---

Expand Down