{"id":15095846,"url":"https://github.com/qwidex/go-chat","last_synced_at":"2026-01-06T17:13:50.529Z","repository":{"id":252807248,"uuid":"841160023","full_name":"QWIDEX/go-chat","owner":"QWIDEX","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-26T15:36:17.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T16:37:03.745Z","etag":null,"topics":["chat-application","gin","go","jwt","mongodb","websockets"],"latest_commit_sha":null,"homepage":"","language":"Go","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/QWIDEX.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}},"created_at":"2024-08-11T20:16:06.000Z","updated_at":"2025-03-26T15:36:21.000Z","dependencies_parsed_at":"2025-03-26T16:40:24.602Z","dependency_job_id":null,"html_url":"https://github.com/QWIDEX/go-chat","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"11cc041c2587a655b47428369065abd88312ee36"},"previous_names":["qwidex/go-chat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QWIDEX%2Fgo-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QWIDEX%2Fgo-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QWIDEX%2Fgo-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QWIDEX%2Fgo-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QWIDEX","download_url":"https://codeload.github.com/QWIDEX/go-chat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245852589,"owners_count":20683063,"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":["chat-application","gin","go","jwt","mongodb","websockets"],"created_at":"2024-09-25T15:42:35.338Z","updated_at":"2026-01-06T17:13:50.500Z","avatar_url":"https://github.com/QWIDEX.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-chat\n\nA simple chat application built with Go, Gin, and MongoDB.\n\n## Features\n\n- User registration and authentication\n- Create and join chat rooms\n- Send and receive messages in real-time using WebSockets\n- MongoDB integration for storing user and chat data\n\n## Prerequisites\n\n- Go 1.23 or later\n- Docker (for running MongoDB)\n- Make\n\n## Setup\n\n1. Clone the repository:\n\n    ```bash\n    git clone https://github.com/yourusername/go-chat.git\n    cd go-chat\n    ```\n\n2. Copy the .env.default file to .env and update the environment variables as needed:\n\n    ```bash\n    cp .env.default .env\n    ```\n\n3. Install dependencies:\n\n    ```bash\n    go mod download\n    ```\n\n## Running the Application\n\n### Using Docker\n\n1. Build and run the Docker containers:\n\n    ```bash\n    make docker-run\n    ```\n\n2. Build and run the application:\n\n    ```bash\n    make build\n    make run\n    ```\n\n## Makefile Commands\n\n- Build the application:\n\n    ```bash\n    make build\n    ```\n\n- Run the application:\n\n    ```bash\n    make run\n    ```\n\n- Live reload the application:\n\n    ```bash\n    make watch\n    ```\n\n- Clean up binary from the last build:\n\n    ```bash\n    make clean\n    ```\n\n## API Endpoints\n\n### Authentication\n\n- `POST /auth/register` - Register a new user\n- `POST /auth/login` - Login a user\n- `GET /auth/refresh-token` - Refresh access token\n\n### Users\n\n- `GET /users` - Get all users\n- `GET /users/:uid` - Get user data by UID\n\n### Chats\n\n- `GET /chats` - Get all chat rooms for the authenticated user\n- `POST /chats` - Create a new chat room\n- `PATCH /chats` - Add a member to a chat room\n- `GET /chats/:chatId` - Get chat history by chat ID\n\n### WebSocket\n\n- `GET /ws` - Connect to WebSocket for real-time messaging\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwidex%2Fgo-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqwidex%2Fgo-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwidex%2Fgo-chat/lists"}