COMMIT Journal is a personal journaling application that helps users track their thoughts, goals, tasks, and personal growth using the COMMIT methodology. The application uses MongoDB for data storage and provides a modern web interface for users to interact with their journal entries.
The backend API and database integration are now complete and functional. The Intelligence Layer has been implemented with OpenAI integration for natural language processing capabilities. The server successfully connects to MongoDB Atlas and all API endpoints for user authentication, journal entries, and AI analysis are working.
- User Authentication: Register and login with JWT token-based authentication
- Journal Entries: Create, read, update, and delete journal entries
- Entry Types: Organize entries by type (Context, Objectives, Mindmap, Ideate, Track)
- Tags: Add custom tags to entries for better organization
- AI Analysis: Automatic analysis of journal entries for emotions, goals, tasks, and themes
- Smart Classification: AI-powered classification of entry types based on content
- Semantic Search: Search journal entries using natural language queries
- Weekly Summaries: Generate AI-enhanced weekly summaries of journal entries
- Backend: Node.js with Express
- Database: MongoDB Atlas (cloud-hosted)
- Authentication: JWT (JSON Web Tokens) with bcryptjs for password hashing
- AI Integration: OpenAI API for natural language processing
- Development: Nodemon for auto-restarting during development
- Testing: Simple HTML/JS test client for API verification
/
├── src/
│ ├── controllers/ # Request handlers for users and journal entries
│ ├── models/ # MongoDB schema models
│ ├── routes/ # API route definitions
│ ├── utils/ # Utility functions including database connection and OpenAI integration
│ ├── middleware/ # Express middleware including auth protection
│ └── config/ # Configuration settings
├── .env # Environment variables (not tracked in git)
├── server.js # Main server file
├── test-client.html # Simple HTML client for testing API endpoints
└── package.json # Project dependencies
The following API endpoints have been implemented:
POST /api/users/register- Register a new userPOST /api/users/login- Login and receive JWT tokenGET /api/users/profile- Get user profile (protected route)
POST /api/journal- Create a new journal entryGET /api/journal- Get all journal entries for the logged-in userGET /api/journal/:id- Get a specific journal entryPUT /api/journal/:id- Update a journal entryDELETE /api/journal/:id- Delete a journal entryGET /api/journal/summary/weekly- Get weekly summary of journal entriesGET /api/journal/search- Search entries using natural language queriesGET /api/journal/tag/:tag- Get entries by tagGET /api/journal/type/:type- Get entries by type
The application now features an AI-powered Intelligence Layer that provides the following capabilities:
- Emotion Detection: Identifies emotions expressed in journal entries
- Goal Extraction: Extracts goals mentioned in the content
- Task Identification: Identifies tasks and to-dos from entries
- Theme Recognition: Recognizes key themes and concepts
- Automatically classifies entries into the COMMIT framework categories:
- Context: Background information and circumstances
- Objectives: Goals and desired outcomes
- Mindmap: Brainstorming and idea connections
- Ideate: Creative solutions and possibilities
- Track: Progress monitoring and reflection
- Creates connections between related entries
- Builds a semantic network of journal content
- Enables discovery of patterns and insights
- Create a
.envfile in the root directory using the.env.exampletemplate - Add your environment variables:
PORT=5004 MONGODB_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret OPENAI_API_KEY=your_openai_api_key OPENAI_MODEL=gpt-4-turbo - Never commit the
.envfile to version control
The application uses a configuration file approach:
// src/config/config.js
module.exports = {
PORT: 5004,
MONGODB_URI: 'your_mongodb_connection_string',
JWT_SECRET: 'your_jwt_secret',
OPENAI_API_KEY: 'your_openai_api_key'
};- Node.js (v14 or higher)
- npm or yarn
- MongoDB Atlas account
- OpenAI API key
-
Clone the repository
git clone https://github.com/yourusername/AI-Journal.git cd AI-Journal -
Install dependencies
npm install -
Configure the application by updating the
src/config/config.jsfile with your MongoDB connection string, JWT secret, and OpenAI API key -
Start the development server
npm run dev -
Open the test client in your browser
start test-client.html
A simple HTML/JavaScript test client (test-client.html) has been created to test all API endpoints. This client provides a user-friendly interface to:
- Register a new user
- Login with existing credentials
- Create journal entries with content, type, and tags
- View all journal entries with AI analysis results
- Search entries using natural language queries
- Filter entries by tags and entry types
- Get weekly AI-generated summaries
- Develop a full-featured frontend interface
- Add data visualization for journal insights
- Implement adaptive learning to improve AI analysis over time
- Add support for image and file attachments
- Create mobile application for on-the-go journaling
This project is currently in active development. If you're interested in contributing, please reach out to the project maintainers.