Reflecta is an intelligent journaling application that helps users with self-reflection, goal setting, and personal growth through AI-powered conversations and insights.
Frontend (Vercel): https://aidiary-reflecta.vercel.app/demo
Backend API (Google Cloud Run): https://reflecta-backend-762303020827.us-central1.run.app
Reflecta combines the power of AI with structured journaling to help users:
- Engage in meaningful self-reflection through AI-powered conversations
- Set and track goals using the Mandalart goal-setting framework
- Convert conversations into structured journal entries
- Track progress toward personal growth objectives
- Visualize their reflection journey through interactive timelines
- Real-time chat interface powered by OpenAI GPT
- Contextual responses based on user's goals and past reflections
- Smart conversation-to-diary conversion
- Automatic goal mapping and progress tracking
- Interactive 9x9 Mandalart grid for structured goal planning
- Core goal and 8 sub-goal categories
- Each sub-goal broken down into 8 actionable tasks
- Visual progress tracking for all goals
- Create, edit, and organize journal entries
- Tag entries with moods and categories
- AI-generated entries from chat conversations
- Search and filter capabilities
- Visual timeline of journal entries
- Goal completion metrics
- Mood patterns and insights
- Weekly, monthly, and yearly summaries
- Framework: React.js
- Styling: CSS3 with responsive design
- State Management: React Context API
- Routing: React Router v6
- Deployment: Vercel
- Runtime: Node.js with Express.js
- Database: MongoDB Atlas
- Authentication: JWT (JSON Web Tokens)
- AI Integration: OpenAI GPT API
- Deployment: Google Cloud Run (MLOps course application)
┌─────────────────────────────────────────────────────────────┐
│ Frontend (Vercel) │
│ React.js Application │
│ https://aidiary-reflecta.vercel.app │
└────────────────────────┬────────────────────────────────────┘
│
│ HTTPS/REST API
│
┌────────────────────────▼────────────────────────────────────┐
│ Backend (Google Cloud Run) │
│ Express.js Server │
│ https://reflecta-backend-762303020827.us-central1.run.app │
└────────────┬───────────────────────┬────────────────────────┘
│ │
│ MongoDB Driver │ OpenAI API
│ │
┌────────────▼────────────┐ ┌──────▼─────────────────────────┐
│ MongoDB Atlas │ │ OpenAI GPT-4 │
│ User Data & Journals │ │ AI Conversation Engine │
└──────────────────────────┘ └────────────────────────────────┘
reflecta/
├── reflecta-frontend/ # React frontend application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── contexts/ # Context providers (Auth, Journal)
│ │ ├── services/ # API service layer
│ │ └── App.js # Main application component
│ ├── public/ # Static assets
│ └── package.json
│
├── reflecta-backend/ # Node.js backend API
│ ├── models/ # MongoDB schemas
│ │ ├── User.js
│ │ ├── Goal.js
│ │ ├── JournalEntry.js
│ │ ├── ChatSession.js
│ │ └── GoalProgress.js
│ ├── server.js # Express server & API routes
│ ├── Dockerfile # Container configuration
│ └── package.json
│
└── README.md # This file
The frontend is deployed on Vercel with the following configuration:
- Root Directory:
reflecta-frontend - Framework: Create React App
- Build Command:
npm run build - Output Directory:
build
Environment variables configured in Vercel:
REACT_APP_API_URL=https://reflecta-backend-762303020827.us-central1.run.app/api
REACT_APP_APP_NAME=Reflecta
REACT_APP_APP_VERSION=1.0.0
REACT_APP_MOCK_API=false
The backend is deployed on Google Cloud Run, applying concepts learned from the MLOps course:
Key MLOps Practices Applied:
- Containerization: Using Docker for consistent deployment environments
- Cloud-Native Deployment: Serverless architecture with automatic scaling
- Environment Management: Secure handling of secrets and configurations
- CI/CD Ready: Source-based deployment with Cloud Build
- Monitoring: Built-in logging and health check endpoints
Deployment Command:
gcloud run deploy reflecta-backend \
--source . \
--region us-central1 \
--platform managed \
--allow-unauthenticated \
--env-vars-file .env.yaml \
--port 5000Environment Variables:
MONGODB_URI: MongoDB Atlas connection stringJWT_SECRET: Secret key for authenticationCORS_ORIGIN: Allowed frontend originsOPENAI_API_KEY: OpenAI API keyOPENAI_API_URL: OpenAI API endpoint
- Node.js 18 or higher
- MongoDB (local or Atlas)
- OpenAI API key
cd reflecta-frontend
npm install
cp .env.example .env
# Edit .env with your configuration
npm startThe frontend will run on http://localhost:3000
cd reflecta-backend
npm install
cp env.example .env
# Edit .env with your configuration
npm startThe backend will run on http://localhost:5000
POST /api/auth/register- Register new userPOST /api/auth/login- Login user
GET /api/goals- Get user's goalsPOST /api/goals- Save/update goalsPOST /api/goals/ai-suggestions- Get AI-powered goal suggestions
GET /api/journal- Get all journal entriesGET /api/journal/:id- Get specific entryPOST /api/journal- Create new entry
GET /api/chat- Get chat sessionPOST /api/chat- Save chat sessionPOST /api/chat/enhanced- Send message with AI response
POST /api/convert-to-diary- Convert conversation to journal entryPOST /api/analyze-goal-mapping- Analyze diary for goal connections
GET /api/goals/:id/progress- Get goal progressPOST /api/goals/:id/progress- Update goal progressGET /api/goals/:id/progress/summary- Get progress summary
GET /api/health- Backend health status
Users can select messages from their chat with the AI assistant and convert them into structured journal entries. The AI analyzes the conversation and:
- Generates a coherent diary entry
- Identifies related goals
- Suggests relevant tags and mood
The application implements the Mandalart (9x9) goal-setting method:
- 1 central goal
- 8 sub-goals around the center
- Each sub-goal expands into 8 actionable tasks (total 64 tasks)
- Visual progress tracking for all levels
AI automatically analyzes journal entries to:
- Identify connections to existing goals
- Track progress on specific tasks
- Provide insights on goal completion patterns
- JWT-based authentication
- Secure password hashing with bcrypt
- CORS configuration for frontend-backend communication
- Environment-based secret management
- MongoDB Atlas network security
- Mobile app (React Native)
- Data export functionality (PDF, JSON)
- Social features (share reflections with trusted users)
- Advanced analytics dashboard
- Voice-to-text journal entries
- Habit tracking integration
- Reminder and notification system
Developed by: Hunjun Shin
Course: MLOps - Applied cloud deployment practices using Google Cloud Run
Technologies: React, Node.js, MongoDB, OpenAI GPT, Vercel, Google Cloud Run
This project is developed for educational purposes.
Start your reflection journey today: https://aidiary-reflecta.vercel.app