A modern email client built with Next.js 13, TypeScript, Tailwind CSS, and Neon Database. Features a responsive design with email management capabilities including compose, reply, search, folder organization, and real user authentication.
- π Authentication: Secure user registration and login
- π§ Email Management: View, read, star, and organize emails
- βοΈ Compose & Reply: Create new emails and reply to existing ones
- π Search: Search through emails by subject, sender, or content
- π Folders: Organize emails in different folders (Inbox, Starred, Sent, etc.)
- β Star Emails: Mark important emails with stars
- π Attachments: View and download email attachments (UI ready)
- π± Responsive: Works on desktop and mobile devices
- π¨ Modern UI: Clean and intuitive email interface
- ποΈ Real Database: Uses Neon PostgreSQL database for data persistence
- Framework: Next.js 13 with App Router
- Language: TypeScript
- Database: Neon PostgreSQL
- ORM: Drizzle ORM
- Authentication: JWT with secure cookies
- Styling: Tailwind CSS
- Icons: Lucide React
- Date Handling: date-fns
- Node.js 18+ installed
- A Neon database account (free tier available)
-
Clone and install dependencies:
npm install
-
Set up your Neon database:
- Follow the detailed guide in DATABASE_SETUP.md
- Create a
.env.localfile with your database credentials
-
Generate and push database schema:
npm run db:generate npm run db:push
-
Run the development server:
npm run dev
-
Open your browser and navigate to http://localhost:3000
-
Create your account and start using Malify!
src/
βββ app/
β βββ api/ # API routes
β β βββ auth/ # Authentication endpoints
β β βββ emails/ # Email CRUD operations
β β βββ folders/ # Folder management
β βββ globals.css # Global styles
β βββ layout.tsx # Root layout with AuthProvider
β βββ page.tsx # Main page with auth handling
βββ components/
β βββ Header.tsx # Top navigation with user menu
β βββ Sidebar.tsx # Left sidebar with dynamic folders
β βββ EmailList.tsx # Email list with loading states
β βββ EmailDetail.tsx # Individual email view
β βββ ComposeModal.tsx # Compose email modal
β βββ LoginForm.tsx # User login form
β βββ RegisterForm.tsx # User registration form
β βββ GmailApp.tsx # Main app component
βββ contexts/
β βββ AuthContext.tsx # Authentication context
βββ db/
β βββ schema.ts # Database schema definitions
β βββ index.ts # Database connection
βββ lib/
β βββ auth.ts # Authentication utilities
βββ types/
βββ email.ts # TypeScript type definitions
- Modern header with search functionality
- Menu toggle for sidebar
- User profile section
- Compose button
- Folder navigation (Inbox, Starred, Sent, etc.)
- Labels section
- List of emails with sender, subject, and preview
- Star toggle functionality
- Read/unread status indicators
- Attachment indicators
- Full email view with formatted content
- Reply, Reply All, and Forward actions
- Attachment viewing
- Star toggle
- Floating compose window
- To, Cc, Bcc fields
- Rich text composition
- Send functionality
Edit src/data/mockEmails.ts to add new folders:
export const folders = [
{ id: 'custom', name: 'Custom Folder', count: 0, icon: 'folder' },
// ... other folders
];The app uses Tailwind CSS with a modern color scheme:
gmail-red: #ea4335gmail-blue: #4285f4gmail-green: #34a853gmail-yellow: #fbbc04
The application uses a real Neon PostgreSQL database with:
- User authentication and management
- Email storage and retrieval
- Folder organization
- Real-time data persistence
- π Authentication system
- π Backend API integration
- π€ Real email sending
- π·οΈ Custom labels management
- ποΈ Advanced filtering and sorting
- π Bulk actions (select all, delete multiple)
- π Dark mode support
- π Real-time notifications
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run db:generate- Generate database migrationsnpm run db:push- Push schema to databasenpm run db:studio- Open Drizzle Studio (database GUI)
Malify is a modern email client that demonstrates best practices in React/Next.js development with real-world functionality.