{"id":25274363,"url":"https://github.com/levoratojoao/mail","last_synced_at":"2026-04-13T18:01:45.739Z","repository":{"id":188591303,"uuid":"677192778","full_name":"LevoratoJoao/Mail","owner":"LevoratoJoao","description":"Email client that makes API calls to send and receive emails.","archived":false,"fork":false,"pushed_at":"2023-12-19T16:22:21.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-15T15:45:56.920Z","etag":null,"topics":["cs50web","django","javascript","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LevoratoJoao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-11T01:10:09.000Z","updated_at":"2023-12-15T13:27:39.000Z","dependencies_parsed_at":"2023-08-16T02:41:28.060Z","dependency_job_id":"df51fcc6-26f2-4d2f-b3a8-bd258a163d05","html_url":"https://github.com/LevoratoJoao/Mail","commit_stats":null,"previous_names":["levoratojoao/mail"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LevoratoJoao/Mail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2FMail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2FMail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2FMail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2FMail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LevoratoJoao","download_url":"https://codeload.github.com/LevoratoJoao/Mail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2FMail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31764317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cs50web","django","javascript","python"],"created_at":"2025-02-12T14:29:50.873Z","updated_at":"2026-04-13T18:01:45.717Z","avatar_url":"https://github.com/LevoratoJoao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mail\n\nThis is a front-end app for an email client that makes API calls to send and receive emails.\n\n# Installation\n\nTo use this project first you need python and django\n\nTo install django\n```bash\npip3 install Django\n```\n\nTo run the project\n```bash\npython3 manage.py runserver\n```\n\nTo make migrations for the mail app.\n```bash\npython3 manage.py makemigrations mail\n```\n\nTo apply migrations to your database.\n```bash\npython manage.py migrate\n```\n\n# API\n\nThis application supports the following API routes\n\n## GET /emails/\u003cstr:mailbox\u003e\n\nSending a GET request to /emails/\u003cmailbox\u003e where \u003cmailbox\u003e is either inbox, sent, or archive will return back to you (in JSON form) a list of all emails in that mailbox, in reverse chronological order. For example, if you send a GET request to /emails/inbox, you might get a JSON response like the below (representing two emails):\n```json\n[\n    {\n        \"id\": 100,\n        \"sender\": \"foo@example.com\",\n        \"recipients\": [\"bar@example.com\"],\n        \"subject\": \"Hello!\",\n        \"body\": \"Hello, world!\",\n        \"timestamp\": \"Jan 2 2020, 12:00 AM\",\n        \"read\": false,\n        \"archived\": false\n    },\n    {\n        \"id\": 95,\n        \"sender\": \"baz@example.com\",\n        \"recipients\": [\"bar@example.com\"],\n        \"subject\": \"Meeting Tomorrow\",\n        \"body\": \"What time are we meeting?\",\n        \"timestamp\": \"Jan 1 2020, 12:00 AM\",\n        \"read\": true,\n        \"archived\": false\n    }\n]\n```\nNotice that each email specifies its id (a unique identifier), a sender email address, an array of recipients, a string for subject, body, and timestamp, as well as two boolean values indicating whether the email has been read and whether the email has been archived.\n\nNote also that if you request an invalid mailbox (anything other than inbox, sent, or archive), you’ll instead get back the JSON response ``{\"error\": \"Invalid mailbox.\"}``\n\n## GET /emails/\u003cint:email_id\u003e\n\nSending a GET request to /emails/email_id where email_id is an integer id for an email will return a JSON representation of the email, like the below:\n\n```json\n{\n        \"id\": 100,\n        \"sender\": \"foo@example.com\",\n        \"recipients\": [\"bar@example.com\"],\n        \"subject\": \"Hello!\",\n        \"body\": \"Hello, world!\",\n        \"timestamp\": \"Jan 2 2020, 12:00 AM\",\n        \"read\": false,\n        \"archived\": false\n}\n```\n\nNote that if the email doesn’t exist, or if the user does not have access to the email, the route instead return a 404 Not Found error with a JSON response of\n\n```json\n{\"error\": \"Email not found.\"}\n```\n\n## POST /emails\nTo send an email, you can send a POST request to the /emails route. The route requires three pieces of data to be submitted: a recipients value (a comma-separated string of all users to send an email to), a subject string, and a body string.\nIf the email is sent successfully, the route will respond with a 201 status code and a JSON response of  ``` {\"message\": \"Email sent successfully.\"} ```\n\nNote that there must be at least one email recipient: if one isn’t provided, the route will instead respond with a 400 status code and a JSON response of ```{\"error\": \"At least one recipient required.\"}```\n\nAll recipients must also be valid users who have registered on this particular web application: if you try to send an email to baz@example.com but there is no user with that email address, you’ll get a JSON response of ```{\"error\": \"User with email baz@example.com does not exist.\"} ```\n\n## PUT /emails/\u003cint:email_id\u003e\n\nTo mark an email as read/unread or as archived/unarchived. To do so, send a PUT request (instead of a GET) request to /emails/\u003cemail_id\u003e where email_id is the id of the email you’re trying to modify.\n\nThe body of the PUT request could also be ```{archived: false}``` to unarchive the message, and likewise could be either ``{read: true}`` or ``{read: false}`` to mark the email as read or unread, respectively.\n\n\n\n# Demo\n\nHere it is a simple usage example on YouTube: [Demo](https://youtu.be/H1IzgpIqSqE).\n\nOpen the web server in your browser, and use the “Register” link to register for a new account. The emails you’ll be sending and receiving in this project will be entirely stored in the database (they won’t actually be sent to real email servers), so you’re welcome to choose any email address ``(e.g. foo@example.com)`` and password you’d like.\n\n## Send Mail\n\nWhen a user submits the email composition form, the JavaScript code send the email.\n    * It makes a `POST`request to `/emails`, passing in values for `recipients`, `subject` and `body`.\n    * Once the email has been sent, the user's sent mailbox is loaded.\n\n## Mailbox\n\nWhen a user visti their Inbox, Sent mailbox or Archive, the appropriate mailbox is loaded\n* It makes a `GET` request to `/emails/\u003cmailbox\u003e` to request the emails for a particular mailbox.\n* When a mailbox is visited, the application will first query the API for the latest emails in that mailbox and the name of the mailbox will appear at the top of the page.\n* Each email should then be rendered in its own box that displays who the email is from, what the subject line is and the timestamp of the email.\n* If the email is unread it will appear with a white background and if not it will appear with a gray background.\n\n## View Email\n\nWhen a user clicks on an email, the user will be taken to a view where they see the content of that email.\n* It shows the email's sender, recipients, subject, timestamp and body.\n* Once the email has been clicked on it will be marked as read. It sends a `PUT`request to `/emails/\u003cemail_id\u003e`to update whether an email is read or not.\n\n## Archive and Unarchive\n\nAllow users to archive and unarchive emails that they have received.\n* When viewing an Inbox email, the user will be presented with a button that lets them archive the email and if it's already archived the button will be unarchive.\n* After the email has been archived or unarchived the user's inbox is loaded.\n\n## Reply Email\n\nWhen viewing an email, the user is presented with a \"Reply\" button that lets them reply to the email.\n* When the user clicks the \"Reply\" button, they are taken to the email composition form.\n* The composition form is prefilled with the `recipient` field set to whoever sent the original email.\n* The subject line begins with \"Re: \" followed by the original subject line of the email.\n* The email body starts off with \"On Jan 1 2020, 12:00 AM\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevoratojoao%2Fmail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevoratojoao%2Fmail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevoratojoao%2Fmail/lists"}