{"id":27604054,"url":"https://github.com/vit0rr/chat","last_synced_at":"2025-04-22T19:23:58.548Z","repository":{"id":283014581,"uuid":"914161210","full_name":"vit0rr/chat","owner":"vit0rr","description":"Realtime chat built with Go, WebSockets, Redis and NextJS","archived":false,"fork":false,"pushed_at":"2025-03-23T03:36:28.000Z","size":1555,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-21T20:55:58.299Z","etag":null,"topics":["chat","docker","flyio","golang","mongodb","nextjs","real-time","redis","shadcn-ui","tailwindcss","typescript","vercel","websocket"],"latest_commit_sha":null,"homepage":"https://chat-jet-ten-81.vercel.app","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/vit0rr.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":"2025-01-09T04:04:52.000Z","updated_at":"2025-04-07T00:33:17.000Z","dependencies_parsed_at":"2025-03-18T06:41:25.523Z","dependency_job_id":null,"html_url":"https://github.com/vit0rr/chat","commit_stats":null,"previous_names":["vit0rr/chat"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vit0rr%2Fchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vit0rr%2Fchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vit0rr%2Fchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vit0rr%2Fchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vit0rr","download_url":"https://codeload.github.com/vit0rr/chat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250306989,"owners_count":21409005,"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","docker","flyio","golang","mongodb","nextjs","real-time","redis","shadcn-ui","tailwindcss","typescript","vercel","websocket"],"created_at":"2025-04-22T19:23:57.854Z","updated_at":"2025-04-22T19:23:58.519Z","avatar_url":"https://github.com/vit0rr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat Service\n\nA full-stack real-time chat application featuring a Go backend with WebSockets, MongoDB for persistent storage, Redis for pub/sub functionality, and a React/Next.js frontend.\n\n- [Swagger doc.](https://chat-solitary-butterfly-9161.fly.dev/swagger/index.html)\n- [NextJS front-end](https://chat-jet-ten-81.vercel.app/)\n\n\u003cimg src=\"./img/chat.png\" alt=\"print showing the chat landing page\" style=\"border-radius: 6px !important;\"/\u003e\n\n\n## 🌟 Features\n- Real-time messaging using WebSocket\n- Room-based chat functionality\n- User authentication and authorization\n- Message persistence with MongoDB\n- Session management with Redis\n- UI with React/Next.js with Shadcn\n- API documentation with Swagger\n\n## 🛠️ Tech Stack\n### Backend\n- [Go](https://go.dev/)\n- [MongoDB](https://www.mongodb.com/)\n- [Redis](https://redis.io/)\n- [Coder WebSocket](https://github.com/coder/websocket) \n- [Swagger/Swag](https://github.com/swaggo/swag)\n\n### Frontend\n- [Next.js](https://nextjs.org/)\n- [React](https://react.dev/)\n- [TailwindCSS](https://tailwindcss.com/)/[Shadcn](https://ui.shadcn.com/)\n\n## Prerequisites\n- Go\n- Node.js\n- MongoDB\n- Redis\n- pnpm (preferred)\n\n## 🚀 Getting Started\n\n### Clone the Repository\n```bash\ngit clone https://github.com/vit0rr/chat.git\ncd chat\n```\n\n### Backend Setup\n1. Install dependencies:\n```bash\ngo mod tidy\n```\n\n2. Set up environment variables:\n```bash\ncp .env.example .env\n```\n\n3. Run the server:\n```bash\ngo run cmd/api/main.go\n```\n\n### Frontend Setup\n1. Navigate to the frontend directory:\n```bash\ncd front\n```\n\n2. Install dependencies:\n```bash\npnpm install\n```\n\n3. Run the development server:\n```bash\npnpm run dev\n```\n\n## 📚 API Documentation\nThis project uses Swagger to document the API. The code generation was made using [Swag](https://github.com/swaggo/swag). After updating the documentation - by adding/editing comments in the code - you can run the following command to generate the documentation:\n```bash\nswag init -d ./cmd/api/,./\n```\n\nIt will update the `docs` folder with the new documentation. You can access the documentation by running the project and accessing the `/swagger/index.html` endpoint at http://localhost:8080/swagger/index.html.\n\n## Environment Variables\nYou can check the environment variables needed to run this project in the `.env.example` file. Run the following command to create a `.env` file:\n```bash\ncp .env.example .env\n```\n\n## 🐳 Docker Support\nThe project includes Docker support for easy deployment. To run the entire stack:\n```bash\ndocker-compose up\n```\n\nThis will start:\n- MongoDB on port 27017\n- Redis on port 6379\n- Backend API on port 8080\n- Frontend on port 3000\n\n## 🚢 Deployment\n### Backend\nThe backend is configured for deployment on Fly.io. Configuration can be found in `fly.toml`.\n\n### Frontend\nThe frontend can be deployed to Vercel or any other Next.js-compatible hosting platform.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contributing\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvit0rr%2Fchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvit0rr%2Fchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvit0rr%2Fchat/lists"}