A social media platform designed for busy professionals to stay connected with their loved ones.
The Diary is more than just a social media appโit's a bridge between your professional life and personal relationships. Designed specifically for busy professionals who struggle to maintain meaningful connections with family and friends, The Diary provides a simple, intimate wa## ๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Aman Kumar (Amank-root)o share your daily moments and let your loved ones know you're thinking of them.
In today's fast-paced world, busy professionals often find themselves:
- Too exhausted to make phone calls after long work days
- Struggling to maintain regular contact with family and friends
- Wanting to share life moments but overwhelmed by complex social media platforms
- Needing a more personal, meaningful way to stay connected
The Diary solves this by providing a simple, elegant platform where you can:
- Share your day in bite-sized, meaningful posts
- Send quick notes to let loved ones know you're thinking of them
- Stay connected without the noise and distractions of traditional social media
- Create lasting memories through your personal digital diary
- Quick Diary Entries: Share your day with beautiful, journal-style posts
- Interactive Page Flips: Experience the charm of a real diary with smooth page-turning animations
- Rich Media Support: Add photos, videos, and styled text to bring your stories to life
- Privacy First: Choose who sees your entriesโfamily only, close friends, or keep them private
- Sticky Notes: Perfect for those "thinking of you" moments
- Quick Thoughts: Share brief but meaningful messages throughout your day
- Colorful & Personal: Customize notes with colors and styles that reflect your mood
- Instant Connection: Let loved ones know they're on your mind, even during busy days
- Family Circles: Create intimate groups for family members
- Close Friends Network: Connect with your inner circle in a distraction-free environment
- Follow System: Stay updated on your loved ones' daily lives
- Explore Feed: Discover heartwarming moments from your network
- Secure Authentication: Email/password and Google OAuth integration
- Privacy Controls: Fine-grained control over who sees your content
- Data Protection: Your personal moments are protected with enterprise-level security
- Email Verification: Ensuring authentic connections within your network
- Clean Interface: Designed to be calming and distraction-free
- Dark/Light Themes: Adapt to your preferences and time of day
- Mobile Optimized: Perfect for busy professionals on the go
- Accessibility First: Built with inclusive design principles
- Next.js 15.4.6 with App Router for optimal performance
- React 19.1.0 for modern, reactive user interfaces
- TypeScript 5 for type-safe development
- Tailwind CSS 4 for beautiful, responsive designs
- PostgreSQL database for reliable data storage
- Prisma ORM for type-safe database operations
- Better Auth 1.3.7 for secure authentication
- Server Actions for seamless client-server communication
- TipTap 3.2.0 rich text editor for expressive writing
- React Page Flip for authentic diary experience
- Cloudinary integration for media management
- React Sticky Notes for quick, colorful thoughts
- ESLint & Prettier for code quality
- Prisma Studio for database management
- Turbopack for lightning-fast development builds
- Vercel ready for seamless deployment
- Node.js 18 or higher
- PostgreSQL database
- pnpm (recommended) or npm
-
Clone and Setup
git clone https://github.com/Amank-root/The-Diary.git cd diary pnpm install
-
Environment Configuration Create
.env.local
with:# Database Connection DATABASE_URL="postgresql://user:password@localhost:5432/diary" # Authentication BETTER_AUTH_SECRET="your-secure-secret-key" BETTER_AUTH_URL="http://localhost:3000" # Google OAuth (Optional) GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret" # Email Service SMTP_HOST="smtp.gmail.com" SMTP_PORT="587" SMTP_USER="[email protected]" SMTP_PASS="your-app-password" # Media Storage NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="your-cloudinary-name"
-
Database Setup
pnpm db:migrate
-
Launch Development Server
pnpm dev
-
Open The Diary Visit http://localhost:3000 and start connecting!
Command | Description |
---|---|
pnpm dev |
Start development server with Turbopack |
pnpm build |
Build for production (includes DB migration) |
pnpm start |
Start production server |
pnpm lint |
Run code quality checks |
pnpm db:migrate |
Run database migrations |
pnpm db:studio |
Open Prisma Studio for DB management |
src/
โโโ app/ # Next.js App Router
โ โโโ (root)/ # Main application
โ โ โโโ dashboard/ # Personal dashboard
โ โ โโโ diary/ # Diary entries management
โ โ โโโ notes/ # Quick notes interface
โ โ โโโ profile/ # User profiles & settings
โ โ โโโ explore/ # Discover loved ones' content
โ โโโ api/ # Backend API routes
โ โ โโโ auth/ # Authentication endpoints
โ โ โโโ v1/ # API versioning
โ โโโ auth/ # Authentication pages
โโโ components/ # Reusable UI components
โ โโโ auth/ # Login, signup, profile
โ โโโ shared/ # Common components
โ โโโ singleton/ # Feature-specific components
โ โโโ ui/ # Design system components
โโโ lib/ # Core utilities
โ โโโ actions/ # Server actions
โ โโโ types/ # TypeScript definitions
โ โโโ utils.ts # Helper functions
โโโ hooks/ # Custom React hooks
The Diary uses a robust PostgreSQL database schema designed to handle personal relationships and content sharing efficiently:
- User: Profiles with authentication and social features
- Account: OAuth and credential management
- Session: Secure user sessions
- Diary: Personal diary entries with privacy controls
- Note: Quick thoughts and sticky notes
- Reader: Follow/follower relationships for social connections
- Saved: Bookmarked content system
The schema is optimized for:
- Fast Relationship Queries: Efficiently fetch followers, following, and shared content
- Privacy Controls: Granular permissions for diary entries and notes
- Scalable Social Features: Support for growing user networks
- Data Integrity: Proper cascading deletes and foreign key constraints
View the full schema details in prisma/schema.prisma
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy with automatic CI/CD
- Vercel Postgres (Recommended for Vercel deployments)
- Railway (Great for PostgreSQL hosting)
- NeonDB (Serverless PostgreSQL)
- Working Parents who want to share moments with extended family
- Professionals in Different Time Zones staying connected with home
- Healthcare Workers, Consultants, Entrepreneurs with irregular schedules
- Anyone who values meaningful connections over social media noise
- Share a photo of your lunch to let family know you're eating well
- Send a quick note about a beautiful sunset you saw on your commute
- Update loved ones about your day without lengthy phone calls
- Create a digital memory book of your professional and personal journey
The Diary is continuously evolving to better serve busy professionals. Here are the key features currently in development:
Status: Database schema ready, implementation pending
What's Coming:
- Bookmark Diary Entries: Save meaningful posts from your loved ones
- Collections: Organize saved content into themed collections (family moments, inspiration, etc.)
- Quick Access: Dedicated saved section in your dashboard
- Sharing Collections: Share curated collections with family members
Technical Implementation:
-- Saved model already exists in schema
model Saved {
id String @id @default(cuid())
userId String
diaryId String
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id])
diary Diary @relation(fields: [diaryId], references: [id])
}
Development Tasks:
- Create saved content API endpoints
- Build saved dashboard UI component
- Implement save/unsave functionality
- Add collections feature
- Create shared collections interface
Status: Planning phase
What's Coming:
- Share with Specific Users: Send particular diary entries to selected family/friends
- Private Sharing Links: Generate secure links for individual diary posts
- Sharing Permissions: Control who can reshare your content
- Notification System: Alert recipients when they receive shared content
Technical Implementation:
// Proposed schema additions
model DiaryShare {
id String @id @default(cuid())
diaryId String
fromUserId String
toUserId String
shareType ShareType @default(DIRECT)
createdAt DateTime @default(now())
expiresAt DateTime?
}
enum ShareType {
DIRECT // Direct user-to-user sharing
LINK // Shareable link
COLLECTION // Part of shared collection
}
Development Tasks:
- Design sharing UI/UX flow
- Create sharing database schema
- Build share modal component
- Implement notification system
- Add privacy controls for sharing
- Create shared content view
Status: Critical for scalability
Current Issues:
- No caching layer for frequent database queries
- Search functionality lacks optimization
- Explore feed regenerates on every request
- User profile data fetched repeatedly
Optimization Roadmap:
// Implement query caching with Redis
const getCachedUserProfile = async (userId: string) => {
const cached = await redis.get(`user:${userId}`);
if (cached) return JSON.parse(cached);
const user = await db.user.findUnique({ where: { id: userId } });
await redis.setex(`user:${userId}`, 3600, JSON.stringify(user));
return user;
};
// Full-text search with PostgreSQL
model Diary {
// Add search vector for optimized text search
searchVector Unsupported("tsvector")?
@@index([searchVector], type: Gin)
}
- User Feed Cache: Cache personalized feeds for 15 minutes
- Popular Content Cache: Cache trending content for 1 hour
- Search Results Cache: Cache search queries for 30 minutes
Development Tasks:
- Integrate Redis for caching layer
- Implement PostgreSQL full-text search
- Add feed caching mechanisms
- Optimize database indexes
- Implement lazy loading for images
- Add service worker for offline capabilities
// WebSocket implementation for live updates
const useRealtimeUpdates = () => {
useEffect(() => {
const ws = new WebSocket('/api/ws');
ws.onmessage = (event) => {
const { type, data } = JSON.parse(event.data);
// Handle real-time diary updates, new followers, etc.
};
}, []);
};
Performance Targets:
- Reduce initial page load to < 2 seconds
- Implement infinite scroll for feeds
- Cache user sessions for faster authentication
- Optimize image loading with Next.js Image
- Implement search suggestions with debouncing
- React Native app for iOS and Android
- Push notifications for new diary entries
- Offline diary writing capabilities
- Diary Reactions: Heart, hug, thinking of you reactions
- Comment System: Private comments on diary entries
- Family Groups: Create family-specific diary spaces
- Memory Timeline: AI-powered yearly recap of shared moments
- Writing Suggestions: Help busy professionals express themselves
- Mood Detection: Understand emotional patterns in diary entries
- Smart Reminders: Suggest when to check in with loved ones
- Content Recommendations: Suggest what to share based on patterns
We welcome contributions from developers who understand the importance of meaningful connections! Whether you're fixing bugs, adding features, improving documentation, or helping with translations, your contributions are valued.
- Fork the repository and clone your fork
- Set up the development environment (see Getting Started)
- Create a feature branch (
git checkout -b feature/your-feature
) - Make your changes following our coding standards
- Test thoroughly and ensure no existing functionality is broken
- Submit a Pull Request with a clear description
Please read our CONTRIBUTING.md for detailed guidelines on:
- Development workflow and coding standards
- How to report bugs and request features
- Testing requirements and best practices
- Documentation standards
๐ข Good First Issues:
- UI/UX improvements
- Documentation updates
- Bug fixes
- Accessibility enhancements
๐ก Intermediate:
- Saved content system implementation
- Performance optimizations
- Mobile responsiveness improvements
๐ด Advanced:
- Real-time features with WebSocket
- Advanced caching strategies
- Database optimization
- User Experience First: Every feature should make connections easier
- Privacy by Design: Respect user data and relationships
- Performance Matters: Busy professionals need fast, reliable tools
- Accessibility: Everyone deserves to stay connected
- Open Source Spirit: Collaborative, inclusive, and transparent development
- Bug Reports: Create a bug report
- Feature Requests: Suggest new features
- Security Issues: See our Security Policy
- GitHub Discussions: Join conversations
- Issues: Browse existing issues
- Pull Requests: See active contributions
- Contributing Guide: CONTRIBUTING.md
- Code of Conduct: CODE_OF_CONDUCT.md
- Security Policy: SECURITY.md
- API Documentation: Coming soon
Thanks to all the amazing people who contribute to The Diary! ๐
Want to see your name here? Check out our Contributing Guide!
This project is proprietary and maintained by Amank-root. All rights reserved.
The Diary was born from the understanding that maintaining relationships shouldn't be another stressful task in your busy life. It should be a moment of joy, connection, and love. We hope this platform helps you stay close to the people who matter most, one diary entry and sweet note at a time.
Built with โค๏ธ for busy professionals who refuse to let distance or schedules diminish their relationships.
Ready to start your diary journey? Get started now and let your loved ones know you're thinking of them. ๐