{"id":13533967,"url":"https://github.com/josephcagle/Chatwrite","last_synced_at":"2025-04-01T22:31:05.672Z","repository":{"id":42686289,"uuid":"418267160","full_name":"josephcagle/Chatwrite","owner":"josephcagle","description":"A simple React-based chat app demo for Appwrite","archived":false,"fork":false,"pushed_at":"2023-01-07T22:07:23.000Z","size":1262,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-11T16:09:06.860Z","etag":null,"topics":["appwrite","chat-application","hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/josephcagle.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}},"created_at":"2021-10-17T22:07:07.000Z","updated_at":"2024-08-11T16:09:06.861Z","dependencies_parsed_at":"2023-02-08T02:32:41.738Z","dependency_job_id":null,"html_url":"https://github.com/josephcagle/Chatwrite","commit_stats":null,"previous_names":["josephcagle/chatwrite","darthfloopy/chatwrite"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephcagle%2FChatwrite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephcagle%2FChatwrite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephcagle%2FChatwrite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josephcagle%2FChatwrite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josephcagle","download_url":"https://codeload.github.com/josephcagle/Chatwrite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246720467,"owners_count":20822909,"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":["appwrite","chat-application","hacktoberfest"],"created_at":"2024-08-01T07:01:24.888Z","updated_at":"2025-04-01T22:31:05.342Z","avatar_url":"https://github.com/josephcagle.png","language":"TypeScript","readme":"\n# Chatwrite\nA simple React-based chat app demo for Appwrite\n\nThis is a simple instant message chat app with persistent message storage. Users\nare able to send messages without having to make accounts. Just pick a name and\njoin a room.\n\n## Screenshots\n![Menu screenshot](screenshot1.png)\n![Chat room screenshot](screenshot2.png)\n\n## Running Chatwrite\n1. Install Appwrite (https://appwrite.io/docs/installation)\n2. Open the Appwrite console and make a new project.\n3. Scroll to the bottom of the dashboard and add a new web app platform, typing\n   in your local IP address (not `localhost`).\n4. Click on \"Database\" and make a new collection called \"chatMessages\" (or\n   something similar).\n5. Go to the collection's settings and add these rules (with data types):\n     - roomName (text)\n     - sender (text)\n     - messageData (text)\n     - timestamp (numeric)\n   For each rule, put \"`*`\" (wildcard) in both the read and write permissions\n   list.\n6. Clone this repo, `cd` into it, and run `npm i` to install dependencies\n7. Edit `config.js` to include the relevant project's API endpoint and ID and\n   the messages collection's ID.\n8. Run `npm start` to build the web app and start the web server (on port 80 --\n   be sure to check your computer's firewall if it doesn't work).\n\n### Troubleshooting\n - (As mentioned before) Your computer's firewall may block incoming connections\n   to some or all network ports. Check your firewall settings if necessary.\n - To work around a CORS issue, make sure you are accessing the web app on the\n   same host name as the one entered as the `apiEndpoint` in `config.js`.\n - If something is still broken, make an issue on this GitHub repo and I'll see\n   if I can fix it.\n\n## How it works\n - A user picks a name, types in a room name, joins the room and starts sending\n   messages.\n - In the database, each message is stored as a document in a collection. All\n   messages, across all rooms, are stored in the same collection.  \n - When the user sends a message, the client app sends a request to the server,\n   which creates a document that has these fields:\n   - `roomName` - the room name the user typed in\n   - `sender` - the name the user typed in\n   - `messageData` - the message the user sent\n   - `timestamp` - unix ms timestamp\n - When a user joins a room, the client queries the server for all messages with\n   the matching `roomName` field. Additionally, the client subscribes to updates\n   to get other such messages.\n\n## To do\n - When the user leaves a room, the username and room name they previously typed\n   in should be kept in the input form.\n - Trigger the CORS dialog as soon as CORS errors are detected, instead of only\n   when \"Start Chatting\" is clicked\n\n","funding_links":[],"categories":["Showcase (Built with Appwrite 📣)"],"sub_categories":["React"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephcagle%2FChatwrite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosephcagle%2FChatwrite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosephcagle%2FChatwrite/lists"}