mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-21 07:06:42 +02:00
Add three new Telegram bot services: - telegram-nutriphi-bot: Nutrition tracking bot with Gemini AI analysis - Photo meal analysis - Daily nutrition goals and tracking - Statistics and reports - telegram-todo-bot: Todo list management bot - Integration with Todo backend API - Reminder scheduling - User preferences per chat - telegram-zitare-bot: Daily inspiration quotes bot - Scheduled daily quotes - Quote database with authors - User subscription management All bots use NestJS with nestjs-telegraf for Telegram integration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
35 lines
950 B
TypeScript
35 lines
950 B
TypeScript
export default () => ({
|
|
port: parseInt(process.env.PORT || '3303', 10),
|
|
telegram: {
|
|
token: process.env.TELEGRAM_BOT_TOKEN,
|
|
allowedUsers: process.env.TELEGRAM_ALLOWED_USERS
|
|
? process.env.TELEGRAM_ALLOWED_USERS.split(',').map((id) => parseInt(id.trim(), 10))
|
|
: [],
|
|
},
|
|
database: {
|
|
url:
|
|
process.env.DATABASE_URL || 'postgresql://manacore:devpassword@localhost:5432/nutriphi_bot',
|
|
},
|
|
gemini: {
|
|
apiKey: process.env.GEMINI_API_KEY,
|
|
},
|
|
});
|
|
|
|
// Meal type labels
|
|
export const MEAL_TYPES = {
|
|
breakfast: 'Frühstück',
|
|
lunch: 'Mittagessen',
|
|
dinner: 'Abendessen',
|
|
snack: 'Snack',
|
|
} as const;
|
|
|
|
export type MealType = keyof typeof MEAL_TYPES;
|
|
|
|
// Get suggested meal type based on current time
|
|
export function suggestMealType(): MealType {
|
|
const hour = new Date().getHours();
|
|
if (hour >= 5 && hour < 11) return 'breakfast';
|
|
if (hour >= 11 && hour < 15) return 'lunch';
|
|
if (hour >= 17 && hour < 21) return 'dinner';
|
|
return 'snack';
|
|
}
|