A modern AI-powered diary web application that allows users to write, manage, and reflect on their daily thoughts. MyDiary enhances journaling with automatic summaries and mood detection using AI.
- Create, edit, and delete diary entries
- AI-generated summaries (exactly 2 sentences)
- AI mood detection (1 word + emoji)
- User authentication (including Google login)
- Clean and responsive UI
- Fast and simple user experience
- Backend: Django (Python)
- Frontend: HTML, CSS, JavaScript
- AI Integration: OpenRouter and Openai client
- Authentication: Django Auth + Google OAuth
mydiary/ │ ├── diary_app/ │ ├── migrations/ │ ├── templates/ │ ├── static/ │ ├── views.py │ ├── models.py │ ├── urls.py │ ├── manage.py ├── requirements.txt └── README.md
git clone https://github.com/Achala-Elijah/diary_application.git
python -m venv venv
Activate it:
- Linux/Mac: source venv/bin/activate
- Windows: venv\Scripts\activate
pip install -r requirements.txt
cd diary
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
follow the instructions
OPENROUTER_API_KEY="your api key"
- Go to Google Cloud Console
- Create OAuth credentials
- Add redirect URI: http://localhost:8000/accounts/google/login/callback/
- Add credentials to your Django app (Social applications)
python manage.py runserver
Open your browser and visit: http://127.0.0.1:8000/ or http://127.0.0.1:8000/diary_app/
Generates a concise 2-sentence summary that captures the main ideas and tone.
Returns one word + one emoji representing the dominant emotion. Example: Happy 😊, Sad 😢
- Always run migrations after changing models
- Keep your API keys secure
- Use a virtual environment to manage dependencies
- Ensure your API keys are valid
- Google login requires proper OAuth setup
Built with ❤️ by Elijah Achala