This backend powers an advanced AI-driven self-development app named "Self". The app engages users in meaningful conversations using a LLM chatbot, facilitating self-exploration, positive psychology, goal setting, habit formation, and more through various frameworks and tasks.
- Framework: NestJS
- Databases:
- MySQL (for relational data: user core data, sessions, categories)
- MongoDB (for non-relational data: user goals, values, limiting beliefs, etc.)
- Language Model Integration: Modular LLM service for generating human-like conversations
- Authentication: JWT-based authentication
- API: RESTful API endpoints
src/
├── config/ # Configuration files
├── core/ # Core modules
│ ├── auth/ # Authentication module
│ ├── users/ # User management
│ ├── chat/ # Chat functionality
│ ├── sessions/ # Session management
│ └── llm/ # LLM integration
├── common/ # Shared utilities, guards, and interceptors
├── database/ # Database configurations and migrations
└── main.ts # Application entry point
-
LLM-Powered Conversations: Custom prompts guide the LLM to facilitate meaningful interactions across various self-development topics.
-
Dual Database System:
- MySQL for structured, relational data
- MongoDB for flexible, document-based storage of user progress and insights
-
Session Management: Tracks user progress through various self-development tasks and questionnaires.
-
Event-Driven Architecture: Uses events to trigger actions based on LLM responses, updating databases and user states.
-
Internationalization: Supports multiple languages for a global user base.
-
Secure Authentication: Implements JWT-based authentication for user security.