Skip to content

Commit 4a979a1

Browse files
committed
fix: many issues relating to old utils
1 parent c418507 commit 4a979a1

File tree

8 files changed

+640
-624
lines changed

8 files changed

+640
-624
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ Our architecture is designed to help maintain compliance with:
7979

8080
## 🚀 Getting Started
8181

82+
### Using Docker Compose (Recommended)
83+
84+
```bash
85+
# Start the required services
86+
docker compose up -d
87+
88+
# The following services will be available:
89+
# - PostgreSQL: localhost:5432
90+
# - Redis: localhost:6379
91+
# - Qdrant Vector DB: localhost:6333
92+
```
93+
94+
### Manual Setup
95+
8296
```bash
8397
# Clone the repository
8498
git clone https://github.com/izadoesdev/mailer
@@ -101,11 +115,14 @@ bun run dev
101115

102116
Create a `.env.local` file with the following variables:
103117

104-
```
105-
DATABASE_URL=your_database_connection_string
106-
GOOGLE_CLIENT_ID=your_google_client_id
107-
GOOGLE_CLIENT_SECRET=your_google_client_secret
108-
ENCRYPTION_KEY=your_fallback_encryption_key
118+
```env
119+
# Database
120+
DATABASE_URL="postgresql://mailbuddy:mailbuddy@localhost:5432/mailbuddy"
121+
122+
# Redis
123+
REDIS_URL="redis://localhost:6379"
124+
125+
# Other variables as specified in .env.example
109126
```
110127

111128
## 🛠️ Tech Stack
@@ -164,7 +181,7 @@ ENCRYPTION_KEY=your_fallback_encryption_key
164181
│ └── public/ # Static assets
165182
```
166183

167-
## �� Documentation
184+
## 📄 Documentation
168185

169186
<!-- Comprehensive documentation is available at [docs.example.com](https://docs.example.com) covering: -->
170187

docker-compose.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
services:
2+
postgres:
3+
image: postgres:16-alpine
4+
container_name: mailbuddy-postgres
5+
environment:
6+
POSTGRES_USER: mailbuddy
7+
POSTGRES_PASSWORD: mailbuddy
8+
POSTGRES_DB: mailbuddy
9+
ports:
10+
- "5432:5432"
11+
volumes:
12+
- postgres_data:/var/lib/postgresql/data
13+
healthcheck:
14+
test: ["CMD-SHELL", "pg_isready -U mailbuddy"]
15+
interval: 10s
16+
timeout: 5s
17+
retries: 5
18+
19+
redis:
20+
image: redis:7-alpine
21+
container_name: mailbuddy-redis
22+
ports:
23+
- "6379:6379"
24+
volumes:
25+
- redis_data:/data
26+
command: redis-server --appendonly yes
27+
healthcheck:
28+
test: ["CMD", "redis-cli", "ping"]
29+
interval: 10s
30+
timeout: 5s
31+
retries: 5
32+
33+
# Vector database for semantic search
34+
qdrant:
35+
image: qdrant/qdrant:latest
36+
container_name: mailbuddy-qdrant
37+
ports:
38+
- "6333:6333"
39+
volumes:
40+
- qdrant_data:/qdrant/storage
41+
healthcheck:
42+
test: ["CMD", "curl", "-f", "http://localhost:6333/health"]
43+
interval: 30s
44+
timeout: 10s
45+
retries: 3
46+
47+
volumes:
48+
postgres_data:
49+
redis_data:
50+
qdrant_data:

src/app/(dev)/ai/new/ai.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,18 @@ export { categorizeEmail } from "./utils/categorize";
3232
export { cleanEmail, cleanMetadata } from "./utils/clean";
3333

3434
// Groq LLM functions
35-
export {
36-
categorizeEmail as groqCategorizeEmail,
37-
prioritizeEmail,
38-
summarizeEmail,
39-
extractActionItems,
40-
extractContactInfo,
41-
processEmail,
42-
} from "./utils/groq";
35+
// export {
36+
// categorizeEmail as groqCategorizeEmail,
37+
// prioritizeEmail,
38+
// summarizeEmail,
39+
// extractActionItems,
40+
// extractContactInfo,
41+
// processEmail,
42+
// } from "./utils/groq";
4343

4444
// Batch processing
4545
export {
46-
processBatchEmails,
4746
storeBatchEmails,
48-
analyzeBatchEmails,
4947
} from "./utils/batch";
5048

5149
// Database operations

src/app/(dev)/ai/new/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ const openrouter = new OpenAI({
1515
maxRetries: 3,
1616
});
1717

18-
const groq = new Groq({
19-
apiKey: process.env.GROQ_API_KEY,
20-
timeout: 30000,
21-
maxRetries: 3,
22-
});
18+
// const groq = new Groq({
19+
// apiKey: process.env.GROQ_API_KEY,
20+
// timeout: 30000,
21+
// maxRetries: 3,
22+
// });
2323

24-
export default { index, groq, openrouter };
24+
export default { index, openrouter };

0 commit comments

Comments
 (0)