engineer-daily-coach
v1.0.2
Published
A personalized daily learning coach for Engineering Leads delivered via Telegram.
Readme
Engineer Daily Coach (EDC)
EDC is a personalized daily learning platform delivered via Telegram, designed for engineering, preparing for top-tier tech interviews (Amazon, Uber, Flipkart, etc.).
🚀 Features
- Daily Lessons: 15-20 min modules covering DSA, System Design, and AI.
- Saturday Revision: Consolidated weekly content for better retention.
- Sunday Deep Dives: Intensive 30-40 min deep dives into complex topics.
- Multi-AI Powered: Content generated using Groq (Llama 3), OpenAI (GPT-4o), or Google Gemini.
- Automatic Fallback: Intelligent switching between AI providers (Groq -> Gemini -> OpenAI) to ensure delivery.
- Message Chunking: Automatically splits long AI lessons into multiple Telegram messages to bypass the 4096-character limit.
- Personalized: Content focus adjusts based on your Experience, Role, Weak Topics, and Strong Topics.
- Automated Delivery: Scheduled delivery at 06:00 PM IST daily.
🛠 Tech Stack
- Backend: Node.js, Express.js
- Database: MongoDB (Mongoose)
- AI: Groq API, OpenAI API, Google Gemini API
- Messaging: Telegram Bot API (Telegraf)
- Scheduling: node-cron
- Validation: Zod
- Logging: Winston, Morgan
📁 Project Structure
src/
├── config/ # Environment variables & validation
├── database/ # Connection and Mongoose models
├── modules/
│ ├── users/ # User profiles & Personalization Engine
│ ├── progress/ # Progress tracking
│ ├── curriculum/ # Curriculum management logic
│ ├── openai/ # LLM Service (Unified Groq/Gemini/OpenAI) and Prompt Builders
│ ├── telegram/ # Telegram Bot integration (with Message Chunking)
│ ├── scheduler/ # node-cron job definitions
├── shared/ # Utils, Logger, Error Handling
├── app.js # Express application setup
└── server.js # Entry point⚙️ Setup (Standalone Use)
- Clone the repository
- Install dependencies:
npm install - Configure Environment:
Create a
.envfile based on.env.example:PORT=3000 MONGODB_URI=your_mongodb_connection_string # AI Provider Configuration AI_PROVIDER=groq # 'groq', 'gemini', or 'openai' # Groq (Free & Fast - Recommended) GROQ_API_KEY=your_groq_key GROQ_MODEL=llama-3.3-70b-versatile # Google Gemini (Free Tier) GEMINI_API_KEY=your_gemini_key GEMINI_MODEL=gemini-pro GEMINI_API_VERSION=v1 # OpenAI (Paid) OPENAI_API_KEY=your_openai_key OPENAI_MODEL=gpt-4o-mini TELEGRAM_BOT_TOKEN=your_telegram_bot_token NODE_ENV=development - Run the application:
- Development:
npm run dev - Production:
npm start
- Development:
📦 NPM Package Usage
You can also use EDC as a dependency in your own project:
Install the package:
npm install engineer-daily-coachInitialize in your code: Ensure you have the required environment variables (see
.env.example) set in your process environment.const edc = require('engineer-daily-coach'); async function startMyBot() { try { // Starts the scheduler, bot, and health server await edc.start({ port: 3000 // optional health check port }); console.log("EDC Service Started!"); } catch (err) { console.error("Failed to start EDC:", err); } } startMyBot();
🧠 AI Priority & Fallback Logic
The system uses a unified LLMService to manage content generation:
- Priority: Controlled by the
AI_PROVIDERenvironment variable. - Fallback: If the primary provider fails (e.g., Quota exceeded or 404), the system automatically cycles through other configured providers to ensure the lesson is delivered.
📡 Telegram Bot Commands
/start: Initialize the bot interaction./register: Interactive profile setup (Experience, Role, Targets, Weak/Strong Topics)./profile: View your current profile settings./status: Check your current learning progress (Day count)./reset: Delete your profile to restart the registration.
🧪 Helper Scripts
- Diagnostic Gemini:
node scripts/check-gemini.js(Check which Gemini models are available). - Seed & Test:
TELEGRAM_ID=your_id node scripts/seed-and-test.js(Manually trigger a lesson delivery for testing).
🚀 Deployment
The project is ready for deployment on Render.
- Build Command:
npm install - Start Command:
npm start - Ensure all Environment Variables are configured in the Render dashboard.
⚖️ License
ISC
