Basho Studio is a full-stack AI-powered sales email generator designed for personalized, Basho-style cold outreach. The application enables users to generate highly customized sales emails either for individual prospects or in bulk campaigns, leveraging AI-powered copywriting to create compelling, pattern-interrupt emails that follow the Basho methodology.
- Single Prospect Email Generation - Real-time AI assistance for creating personalized emails
- Bulk Campaign Management - CSV upload with batch processing for multiple prospects
- AI-Driven Personalization - OpenAI-compatible models for intelligent email generation
- Email Sequences - Multi-step automated email campaigns with configurable delays
- CRM Integration - HubSpot integration for contact sync and activity logging
- Email Delivery - SendGrid integration for sending generated emails
- Modern UI - Dark-themed B2B SaaS interface optimized for productivity
- React 18 with TypeScript
- Vite as the build tool and development server
- Wouter for lightweight client-side routing
- TanStack React Query for server state management
- Radix UI + shadcn/ui for accessible UI components
- Tailwind CSS for utility-first styling
- Node.js with Express.js
- TypeScript for type safety
- Drizzle ORM with PostgreSQL (Neon Database)
- Zod for runtime schema validation
- OpenAI API - GPT-4o for email generation
- SendGrid - Email delivery
- HubSpot - CRM integration (optional)
- Clerk - Authentication (optional)
- Node.js 18 or higher
- npm or yarn
- PostgreSQL database (Neon recommended)
-
Clone the repository:
git clone <your-repo-url> cd AISalesEmailGen
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.example .env # Edit .env and fill in your valuesSee Configuration below and
.env.examplefor all available options. -
Push the database schema:
npm run db:push
-
Start the development server:
npm run dev
The application will be available at http://localhost:3000.
-
Copy the example environment file:
cp .env.example .env
-
Fill in the required values in
.env
See .env.example for a complete list of all available configuration options with descriptions.
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string (Neon recommended) |
The application requires one of the following AI configurations:
| Variable | Description |
|---|---|
OPENAI_API_KEY |
Your OpenAI API key (recommended) |
OR (Replit-specific fallback):
| Variable | Description |
|---|---|
AI_INTEGRATIONS_OPENAI_BASE_URL |
Replit AI integration base URL |
AI_INTEGRATIONS_OPENAI_API_KEY |
Replit AI integration API key |
Note: If
OPENAI_API_KEYis set, it takes precedence over Replit AI Integrations. The Replit fallback is automatically configured when running on Replit and requires no manual setup.
| Variable | Description |
|---|---|
FIRECRAWL_API_KEY |
FireCrawl API key for web scraping and company research |
SENDGRID_API_KEY |
SendGrid API key for email delivery |
HUBSPOT_API_KEY |
HubSpot API key for CRM integration |
VITE_CLERK_PUBLISHABLE_KEY |
Clerk publishable key for authentication |
CLERK_SECRET_KEY |
Clerk secret key for authentication |
| Command | Description |
|---|---|
npm run dev |
Start development server with hot reload |
npm run build |
Build for production |
npm run start |
Start production server |
npm run check |
TypeScript type checking |
npm run db:push |
Push database schema changes |
├── client/ # Frontend React application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── lib/ # Utility functions
│ │ └── pages/ # Page components
├── server/ # Backend Express server
│ ├── routes.ts # API route handlers
│ ├── openai.ts # AI integration service
│ ├── sendgrid.ts # Email delivery service
│ ├── hubspot.ts # HubSpot CRM integration
│ ├── storage.ts # Database storage layer
│ └── scheduler.ts # Email scheduling service
├── shared/ # Shared code between client and server
│ └── schema.ts # Database schema and Zod validators
└── package.json
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/generate-email |
Generate a single personalized email |
POST |
/api/generate-emails-bulk |
Generate emails for multiple prospects |
POST |
/api/send-email |
Send an email via SendGrid |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/profile |
Get user profile data |
POST |
/api/profile |
Save/update user profile |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/sequences |
List all sequences |
POST |
/api/sequences |
Create a new sequence |
GET |
/api/sequences/:id |
Get sequence with steps |
PATCH |
/api/sequences/:id |
Update a sequence |
PATCH |
/api/sequences/:id/status |
Change sequence status |
DELETE |
/api/sequences/:id |
Delete a sequence |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/crm/connections |
Get all CRM connections |
POST |
/api/crm/hubspot/connect |
Connect to HubSpot |
POST |
/api/crm/hubspot/sync |
Sync contacts from HubSpot |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/health |
Check service status |
casual- Friendly, informal toneprofessional- Business-appropriate tonehyper-personal- Highly personalized, research-driven tone
short- 3-4 sentencesmedium- 4-6 sentences
- Create a SendGrid account at https://sendgrid.com
- Go to Settings > API Keys and create a new API key with "Mail Send" permissions
- Add the
SENDGRID_API_KEYenvironment variable - Verify a sender email in SendGrid (Settings > Sender Authentication)
- Create a HubSpot account
- Generate a Private App with CRM scopes
- Add the
HUBSPOT_API_KEYenvironment variable - Use the Integrations page to connect and sync contacts
FireCrawl enables web scraping and company research features:
- Create a FireCrawl account at https://firecrawl.dev
- Get your API key from the dashboard
- Add the
FIRECRAWL_API_KEYenvironment variable - Features enabled:
- Prospect Research: Automatically scrapes company websites and searches for recent news when detecting triggers
- Profile Auto-fill: Crawls your company website to automatically populate profile fields
- Create a Clerk account at https://clerk.com
- Create a new application in Clerk dashboard
- Add
VITE_CLERK_PUBLISHABLE_KEYandCLERK_SECRET_KEYenvironment variables - Wrap routes with
<ProtectedRoute>component to enable authentication
For production deployment instructions, see:
- PRODUCTION_DEPLOYMENT.md - Complete deployment guide
- SECURITY.md - Security best practices and checklist
- STRIPE_SETUP.md - Stripe payment configuration
- Set all required environment variables
- Use production API keys (not test keys)
- Configure Stripe with live mode
- Set up SSL certificate (HTTPS)
- Configure session storage (Redis or PostgreSQL)
- Enable rate limiting
- Run security audit:
npm audit - Test all critical flows
| Tier | Emails/Month | Price | Features |
|---|---|---|---|
| Starter | 50 | Free | Basic features, community support |
| Pro | 1,000 | $19.99/month | Bulk campaigns, sequences, priority support |
| Enterprise | Unlimited | Custom | Custom AI training, SSO, dedicated support |
New users automatically receive a 14-day free trial with full Pro tier access:
- 1,000 emails per month during trial
- All Pro features unlocked
- No credit card required
- Automatically downgrades to Free tier after 14 days
- Node.js 18+ required
- PostgreSQL database (Neon recommended)
- npm for package management
- Make changes to code
- TypeScript will auto-compile in dev mode
- Vite will hot-reload client changes
- Server restarts automatically with tsx
npm run checkAfter modifying shared/schema.ts:
npm run db:push- Fork the repository
- Create a feature branch
- Make your changes
- Run
npm run checkto verify types - Submit a pull request
MIT
For issues or questions:
- Email: [email protected]
- Check existing documentation first
- Review security practices in SECURITY.md