{"id":18332939,"url":"https://github.com/mohamed-lifa7/simple-email-client","last_synced_at":"2026-05-10T05:06:15.678Z","repository":{"id":206729051,"uuid":"717568099","full_name":"mohamed-lifa7/simple-email-client","owner":"mohamed-lifa7","description":"A lightweight email client built with Next.js and Vercel Postgres.","archived":false,"fork":false,"pushed_at":"2023-11-11T21:34:43.000Z","size":82,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T11:21:33.936Z","etag":null,"topics":["email-client","nextjs14","postgresql","server-actions","shadcn-ui","vercel","vercel-postgres"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mohamed-lifa7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-11T21:31:46.000Z","updated_at":"2024-10-07T12:18:31.000Z","dependencies_parsed_at":"2023-11-11T22:29:14.605Z","dependency_job_id":"30395b68-96c6-449b-8477-c000ce915211","html_url":"https://github.com/mohamed-lifa7/simple-email-client","commit_stats":null,"previous_names":["mohamed-lifa7/simple-email-client"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-lifa7%2Fsimple-email-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-lifa7%2Fsimple-email-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-lifa7%2Fsimple-email-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohamed-lifa7%2Fsimple-email-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohamed-lifa7","download_url":"https://codeload.github.com/mohamed-lifa7/simple-email-client/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248089711,"owners_count":21045955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email-client","nextjs14","postgresql","server-actions","shadcn-ui","vercel","vercel-postgres"],"created_at":"2024-11-05T19:40:43.762Z","updated_at":"2026-05-10T05:06:15.624Z","avatar_url":"https://github.com/mohamed-lifa7.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Email Client\n\nA lightweight email client built with Next.js and Vercel Postgres.\n\n## Features \n**Column Layout Navigation**: Navigate seamlessly between routes using a column layout for an intuitive user experience.\n**Progressive Enhancement**: Enhance user experience progressively by leveraging modern web technologies.\n**Prefetching and Caching**: Optimize performance with prefetching and caching strategies.\n**Server Actions: Implement**: server actions reminiscent of traditional PHP-based applications.\n\n## Tech\n\n- [Next.js](https://nextjs.org/)\n- [Vercel Postgres](https://vercel.com/docs/storage/vercel-postgres)\n- [Tailwind CSS](https://tailwindcss.com/)\n- [Shadcn UI](https://ui.shadcn.com)\n- [TypeScript](https://www.typescriptlang.org/)\n\n## To-Do (Fixes)\n\n- [ ] **Forward and Reply Functionality**: Implement forwarding and replying to emails for enhanced communication.\n- [ ] **Enhanced Sender/Recipient Handling**: Refine sender/recipient information handling to pull data seamlessly anywhere in the application.\n- [ ] Need to add a way to manage users\n- [ ] Error handling for form submissions\n- [ ] Make it reponsive\n- [x] Need to add a way to manage folders\n- [x] Add search\n\n## Setup\n\nIn order to run this project locally, you'll need to create a Postgres database and add the connection string to your `.env.local` file.\n\nFurther, you'll need to create the tables and insert some sample data.\n\nFollow these steps to get started:\n\n1. Create a Postgres database\n2. Navigate to the `.env.local` tab in the quickstart section Postgres dashboard\n3. Copy the snippet and paste it into your `.env.local` file\n4. Run `pnpm run setup` to create the tables and insert sample data\n\n## Schema\n\n```\nCREATE TABLE users (\n    id SERIAL PRIMARY KEY,\n    first_name VARCHAR(50),\n    last_name VARCHAR(50),\n    email VARCHAR(255) UNIQUE NOT NULL\n);\n\nCREATE TABLE emails (\n    id SERIAL PRIMARY KEY,\n    sender_id INTEGER REFERENCES users(id),\n    recipient_id INTEGER REFERENCES users(id),\n    subject VARCHAR(255),\n    body TEXT,\n    sent_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n\nCREATE TABLE folders (\n    id SERIAL PRIMARY KEY,\n    name VARCHAR(50) NOT NULL\n);\n\nCREATE TABLE user_folders (\n    id SERIAL PRIMARY KEY,\n    user_id INTEGER REFERENCES users(id),\n    folder_id INTEGER REFERENCES folders(id)\n);\n\nCREATE TABLE email_folders (\n    id SERIAL PRIMARY KEY,\n    email_id INTEGER REFERENCES emails(id),\n    folder_id INTEGER REFERENCES folders(id)\n);\n```\n\n## Sample Data\n\n```\nINSERT INTO users (first_name, last_name, email)\nVALUES ('John', 'Doe', 'john.doe@example.com'),\n       ('Jane', 'Doe', 'jane.doe@example.com'),\n       ('Alice', 'Smith', 'alice.smith@example.com'),\n       ('Bob', 'Johnson', 'bob.johnson@example.com');\n\nINSERT INTO emails (sender_id, recipient_id, subject, body, sent_date)\nVALUES (1, 2, 'Meeting Reminder', 'Don''t forget about our meeting tomorrow at 10am.', '2022-01-10 09:00:00'),\n       (1, 3, 'Hello', 'Just wanted to say hello.', '2022-01-09 08:00:00'),\n       (2, 1, 'Re: Meeting Reminder', 'I won''t be able to make it.', '2022-01-10 10:00:00'),\n       (3, 1, 'Re: Hello', 'Hello to you too!', '2022-01-09 09:00:00'),\n       (4, 1, 'Invitation', 'You are invited to my party.', '2022-01-11 07:00:00'),\n       (1, 2, 'Work Project', 'Let''s discuss the new work project.', '2022-01-12 07:00:00'),\n       (1, 4, 'Expenses Report', 'Please find the expenses report attached.', '2022-01-13 07:00:00'),\n       (4, 1, 'Personal Note', 'Let''s catch up sometime.', '2022-01-14 07:00:00');\n\nINSERT INTO folders (name)\nVALUES ('Inbox'),\n       ('Flagged'),\n       ('Sent'),\n       ('Work'),\n       ('Expenses'),\n       ('Personal');\n\nINSERT INTO user_folders (user_id, folder_id)\nVALUES (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6),\n       (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6),\n       (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6),\n       (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6);\n\nINSERT INTO email_folders (email_id, folder_id)\nVALUES (1, 1),\n       (2, 1),\n       (3, 3),\n       (4, 1),\n       (5, 1),\n       (6, 4),\n       (7, 5),\n       (8, 6);\n```\n\n## Database Relationships\n\n- Users can send and receive emails (users.id -\u003e emails.sender_id and emails.recipient_id)\n- Users can have multiple folders (users.id -\u003e user_folders.user_id)\n- Folders can contain multiple emails (folders.id -\u003e email_folders.folder_id)\n- An email can be in multiple folders (emails.id -\u003e email_folders.email_id)\n\n## License\n\nBy contributing to this project, you agree that your contributions will be licensed under the project's [LICENSE](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed-lifa7%2Fsimple-email-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohamed-lifa7%2Fsimple-email-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohamed-lifa7%2Fsimple-email-client/lists"}