Skip to content

ozzShpigel/ThinkingDiary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 ThinkingDiary

ThinkingDiary is an intelligent, AI-powered digital journal that helps users reflect on their thoughts and extract actionable tasks from their entries — like a virtual therapist. The backend is built in .NET 8, with a React frontend, and includes a modular architecture for scalability, security, and integration with NLP models.


✨ Key Features

  • 📝 User Management: Registration, authentication, profile handling, RBAC.
  • 📔 Diary Entries: Create, view, edit personal journal entries.
  • 🤖 AI-Powered Task Extraction: Automatically extract tasks from entries using an LLM (e.g., Mistral, fine-tuned).
  • 📋 Task Management: View, complete, and track actionable tasks.
  • 🧠 NLP Integration: Plug-in architecture to support fine-tuned models via REST API.
  • 🔐 Security: JWT, role-based authorization, and secure password storage.
  • 🚀 CI/CD: GitHub Actions + Render.com deployment.
  • 🔍 Monitoring: Sentry integration for real-time issue tracking.

🏗️ Architecture Overview

ThinkingDiary/
├── UserManagement.API/          # .NET 8 Web API for users
├── DiaryManagement.API/         # Journal entry management
├── TaskManagement.API/          # Task creation, tracking
├── AI.Analysis/                 # Python server (CRNN + CTC or LLM API)
├── Frontend/                    # React frontend
└── Shared/                      # Shared models/utilities

🔄 Workflow

  1. User writes journal entry (via frontend)
  2. Entry is saved via .NET API to MongoDB
  3. NLP component (Python) is triggered to analyze content
  4. Extracted tasks are stored and shown to the user

🧪 Tech Stack

Layer Technology
Backend .NET 8 Web API
Frontend React + Tailwind
AI/NLP Mistral LLM (via Python API), CRNN + CTC OCR
Database MongoDB
Testing MSTest, Integration tests
Deployment Render.com
CI/CD GitHub Actions
Monitoring Sentry

⚙️ Setup Instructions

🔧 Prerequisites

🔑 JWT Authentication Setup

Configure JWT secret for user authentication:

cd UserManagement.API
dotnet user-secrets set "JwtSettings:Secret" "[YOUR_JWT_SECRET_64_CHARS]"

Windows PowerShell:
[System.Convert]::ToBase64String([System.Security.Cryptography.RandomNumberGenerator]::GetBytes(64))

Mac/Linux Terminal:
bashopenssl rand -base64 64

Online Generator: generate-random.org/encryption-key-generator (select 512-bit)

💳 PayPal Configuration

  1. Get PayPal credentials from developer.paypal.com:

    • Go to "Apps & Credentials"
    • Create or select your app
    • Copy Client ID and Client Secret
  2. Backend setup (User Secrets):

    cd UserManagement.API
    dotnet user-secrets init
    dotnet user-secrets set "PayPal:ClientId" "[YOUR_SANDBOX_CLIENT_ID]"
    dotnet user-secrets set "PayPal:ClientSecret" "[YOUR_SANDBOX_CLIENT_SECRET]"
    
  3. Frontend setup (User ClientID):

    cd Frontend
    npm install @paypal/react-paypal-js
    echo "REACT_APP_PAYPAL_CLIENT_ID=[YOUR_SANDBOX_CLIENT_ID]" >> .env.local

🐍 Python AI Server

cd AI.Analysis
pip install -r requirements.txt
python -m uvicorn server.ocr_api:app --host 0.0.0.0 --port 8000

▶️ .NET Backend

cd ThinkingDiary/UserManagement.API
dotnet run

💻 Frontend

cd Frontend
npm install
npm run dev

🤝 Contributing

  1. Create a feature branch from develop
  2. Follow existing folder and naming conventions
  3. Run tests before PR
  4. Submit a clear pull request with description

📦 Roadmap

  • Basic user auth
  • Diary and task APIs
  • Basic NLP task extraction
  • Full LLM fine-tuned task generation
  • OCR handwritten input support
  • Mobile-friendly frontend
  • Mental wellness scoring (experimental)

📄 License

MIT License


🧠 Inspired by

  • Psychological therapy practices
  • Self-awareness journaling
  • Intelligent agents for behavior change

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published