A beautiful journaling app with mood tracking, AI-powered insights, and analytics. Track the rhythm of your daily reflections and gain deeper understanding of your emotional patterns.
π Live App: cadencenotes.com
- π Daily Journaling - Write entries with Markdown support for rich formatting
- π Mood Tracking - Track how you're feeling with five distinct mood levels
- π₯ Streak Counter - Stay motivated with daily, longest, and total entry counts
- π Heat Map Visualization - See your journaling patterns at a glance with a year-long calendar
- β¨ AI Note Enhancement - Transform shorthand notes into polished entries with one click - AI improves formatting, fixes grammar, and adds context from your previous entries
- π€ AI Insights - Ask questions about your entries and get thoughtful insights powered by Claude AI
- π·οΈ Smart Tags - Organize entries with automatic hashtag detection and filtering
- π Analytics Dashboard - View average mood trends and journaling statistics
- π± Mobile Friendly - Responsive design with bottom navigation for mobile devices
- π¨ Beautiful UI - Clean, modern interface with orange accent theme
- π Secure Authentication - JWT-based auth with bcrypt password hashing
- β‘ Rate Limiting - Smart AI query limits (5 per hour) to manage API usage
- π Edit Protection - Lock entries after the day passes to preserve journal history
- React 18 - Modern React with hooks
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool
- React Router - Client-side routing
- date-fns - Date manipulation
- react-markdown - Markdown rendering
- Node.js - JavaScript runtime
- Express - Web framework
- TypeScript - Type-safe backend
- TypeORM - Database ORM with migrations
- PostgreSQL - Relational database
- JWT - Authentication tokens
- bcrypt - Password hashing
- Anthropic Claude API - AI-powered insights
- Docker - Containerization for backend and database
- AWS Lightsail - Production hosting
- Nginx - Reverse proxy and static file serving
- Let's Encrypt - SSL certificates
- Node.js 18+ (22+ recommended)
- Docker Desktop
- npm or pnpm
- PostgreSQL (via Docker)
git clone https://github.com/jram930/micro-journal.git
cd micro-journalnpm run install:allBackend (backend/.env):
PORT=3000
NODE_ENV=development
# Database
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=journal_user
DB_PASSWORD=journal_pass
DB_DATABASE=micro_journal
# Authentication
JWT_SECRET=your-super-secret-jwt-key-change-in-production
# AI (Optional - for AI Insights feature)
ANTHROPIC_API_KEY=your-anthropic-api-keynpm run docker:upcd backend
npm run migration:runnpm run dev- Frontend: http://localhost:5173 (or 5174 if 5173 is in use)
- Backend: http://localhost:3000
cadence/
βββ backend/ # Express API server
β βββ src/
β β βββ config/ # Database and app configuration
β β βββ controllers/ # Request handlers
β β βββ entities/ # TypeORM entities (User, Entry, Tag, EntryTag, AiQueryUsage)
β β βββ migrations/ # Database migrations
β β βββ routes/ # API routes
β β βββ services/ # Business logic (AI, Auth, Tags, Rate limiting)
β β βββ middleware/ # Auth and admin middleware
β β βββ types/ # TypeScript types
β βββ Dockerfile
β βββ package.json
βββ frontend/ # React SPA
β βββ public/
β β βββ favicon.svg # App icon
β βββ src/
β β βββ components/ # React components
β β βββ contexts/ # React contexts (Auth)
β β βββ pages/ # Page components (Home, Login)
β β βββ services/ # API client
β β βββ styles/ # Global styles
β β βββ types/ # TypeScript types
β βββ index.html
β βββ package.json
βββ docker-compose.yml # PostgreSQL container
βββ DEPLOYMENT.md # Production deployment guide
βββ package.json # Root package with scripts
npm run install:all # Install all dependencies
npm run dev # Start both frontend and backend
npm run build # Build both projects
npm run docker:up # Start PostgreSQL
npm run docker:down # Stop PostgreSQLnpm run dev # Start dev server with hot reload
npm run build # Build TypeScript
npm run migration:generate # Generate new migration
npm run migration:run # Run pending migrations
npm run migration:revert # Revert last migrationnpm run dev # Start Vite dev server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- Authentication and user management
- Stores username, email, and hashed passwords
- Journal entries with mood tracking
- One entry per user per day (enforced by unique index)
- Markdown content support
- Only editable on the day they're created
- User-specific tag system with automatic hashtag detection
- Many-to-many relationship with entries via EntryTag junction table
- Usage count tracking for popular tags
- Tracks AI query usage for rate limiting
- Records query time and type per user
- Enables 5 queries per hour limit
POST /api/auth/signup- Create new user accountPOST /api/auth/login- Login and receive JWT tokenGET /api/auth/me- Get current user info
POST /api/entries- Create new entryGET /api/entries- Get all entries (with date filters)GET /api/entries/:id- Get specific entryGET /api/entries/date/:date- Get entry for specific datePUT /api/entries/:id- Update entry (only today's entry)DELETE /api/entries/:id- Delete entry (only today's entry)
GET /api/tags- Get all user tags with usage countsGET /api/tags/:tagName/entries- Get entries with specific tag
GET /api/streak- Get streak statisticsGET /api/heatmap?days=365- Get heat map dataGET /api/average-mood- Get average mood statistics
POST /api/ai/query- Ask questions about entriesPOST /api/ai/enhance- Enhance note with AI (formatting, grammar, context)GET /api/ai/rate-limit- Check remaining queriesGET /api/ai/health- Check AI service health
GET /api/admin/stats- Get system statistics (admin only)
The app is deployed on AWS Lightsail. See DEPLOYMENT.md for detailed deployment instructions.
- Frontend: Nginx static hosting at
/var/www/cadence/frontend/ - Backend: Docker container with systemd service
- Database: PostgreSQL on the same Lightsail instance
- Domain: Configured via Route 53 with Let's Encrypt SSL
- SSL: Automated certificate renewal via certbot
# Build and deploy frontend
cd frontend
npm run build
sudo cp -r dist/* /var/www/cadence/frontend/
# Build and restart backend
cd ../backend
docker build -t cadence-backend .
sudo systemctl restart cadence-backend- Background: Dark grays (#1a1a1a, #2d2d2d, #3d3d3d)
- Text: Light grays (#f5f5f5, #b8b8b8, #8a8a8a)
- Accent: Orange (#d97706, #ea580c)
- Moods: Green to red gradient spectrum
- Bottom navigation bar on mobile devices
- Responsive layouts for all screen sizes
- Touch-friendly UI elements
- JWT authentication with httpOnly considerations
- Bcrypt password hashing (salt rounds: 10)
- Rate limiting on AI queries
- Environment-based configuration
- Input validation and sanitization
- SQL injection protection via TypeORM
MIT
- Built with Claude AI assistance
- Inspired by minimalist journaling apps
- UI design influenced by Claude's aesthetic
Made with β€οΈ for mindful reflection