{"id":50288676,"url":"https://github.com/codewithveek/viby","last_synced_at":"2026-05-28T04:04:21.547Z","repository":{"id":146437517,"uuid":"521294332","full_name":"codewithveek/viby","owner":"codewithveek","description":"Discord-like Chat App with audio message.","archived":false,"fork":false,"pushed_at":"2022-10-01T19:48:50.000Z","size":6204,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-04T14:37:19.540Z","etag":null,"topics":["chat","discord","hackathon","redis","socket","socket-io"],"latest_commit_sha":null,"homepage":"https://viby-app.vercel.app","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/codewithveek.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-04T14:16:00.000Z","updated_at":"2022-09-23T15:25:40.000Z","dependencies_parsed_at":"2023-03-30T11:06:15.048Z","dependency_job_id":null,"html_url":"https://github.com/codewithveek/viby","commit_stats":null,"previous_names":["darkcodewrangler/viby","codewithveek/viby"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codewithveek/viby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithveek%2Fviby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithveek%2Fviby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithveek%2Fviby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithveek%2Fviby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewithveek","download_url":"https://codeload.github.com/codewithveek/viby/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewithveek%2Fviby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33593422,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["chat","discord","hackathon","redis","socket","socket-io"],"created_at":"2026-05-28T04:04:15.332Z","updated_at":"2026-05-28T04:04:21.541Z","avatar_url":"https://github.com/codewithveek.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Viby - discord-like chat app\n\nViby is a discord-like chat application but with audio message like WhatsApp\n\n### Homepage\n\n![home page](assets/images/home-image-2.png)\n\n### Sign up page\n\n![sign up page](assets/images/home-image-1.png)\n\n### create channel preview\n\n![create channel preview](assets/images/image-1.png)\n\n### create room preview\n\n![create room preview](assets/images/image-3.png)\n\n### profile preview\n\n![profile preview](assets/images/image-2.png)\n\n### Audio preview\n\nyou can play your audio message before sending\n![audio preview](assets/images/image-5.png)\n\n### chat preview\n\n![chat  preview](assets/images/image-6.png)\n\n### chat options preview\n\nyou can edit, copy and delete a message\n![chat  preview](assets/images/image-6.png)\n\n### Redis insight\n\nshowing some data\n![chat  preview](assets/images/redis-insight.png)\n\n# Overview video (Optional)\n\nHere's a short video that explains the project and how to use it:\n\n[![Embed your YouTube video](assets/images//home-image-2.png)](https://youtu.be/pES-meKPwVE)\n\n## How it works\n\nViby consist of two parts,\n\n- Frontend: Built with Angular and Ionic, uses an API and web socket (socket.io) to interact with the backend.\n- Backend: Uses RedisJSON and RedisSearch for storage, and exposes endpoints for the frontend to interact with, as well web socket (socket.io);\n\n### How the data is stored:\n\nThe data is stored using RedisJSON,\nit uses node redis-om to store data\nin form of Entities, Each `Entity` is accessed through a `Repository`,\n\nwhich are as follows:\n\n- MessagesRepo: This repo controls the message entities\n  - MessageEntity: this entity handles messages,\n\n```js\nconst MessagesSchema = new Schema(MessagesEntity, {\n  user_id: { type: \"string\" },\n  content: { type: \"text\", sortable: true },\n  attachments: { type: \"string[]\" },\n  type: { type: \"string\" },\n  message_id: { type: \"string\" },\n  room_id: { type: \"string\" },\n  channel_id: { type: \"string\" },\n  status: { type: \"string\" },\n  created_at: { type: \"date\", sortable: true },\n});\n\nexport const MessagesRepo: Promise\u003cRepository\u003cMessagesEntity\u003e\u003e = (async () =\u003e {\n  const repo = await (await client).fetchRepository(MessagesSchema);\n  await repo.createIndex();\n  return repo;\n})();\n```\n\n- RoomsRepo: This repo controls the room entities\n  - RoomEntity: this entity handles rooms,\n\n```js\nconst RoomsSchema = new Schema(RoomsEntity, {\n  channel_id: { type: \"string\" },\n  title: { type: \"text\", sortable: true },\n  description: { type: \"text\", sortable: true },\n  room_id: { type: \"string\" },\n  owner_id: { type: \"string\" },\n  members: { type: \"string[]\" },\n  message_allowed: { type: \"boolean\" },\n  created_at: { type: \"date\", sortable: true },\n});\n\nexport const RoomsRepo: Promise\u003cRepository\u003cRoomsEntity\u003e\u003e = (async () =\u003e {\n  const repo = await (await client).fetchRepository(RoomsSchema);\n\n  await repo.createIndex();\n  return repo;\n})();\n```\n\n- ChannelsRepo: This repo controls the channel entities\n  - ChannelEntity: this entity handles channels,\n\n```js\nconst ChannelsSchema = new Schema(ChannelsEntity, {\n  channel_id: { type: \"string\" },\n  title: { type: \"text\", sortable: true },\n  description: { type: \"text\", sortable: true },\n  owner_id: { type: \"string\" },\n  rooms: { type: \"string[]\" },\n  is_public: { type: \"boolean\" },\n  channel_picture: { type: \"string\" },\n  channel_cover: { type: \"string\" },\n  created_at: { type: \"date\", sortable: true },\n  members: { type: \"string[]\" },\n});\n\nexport const ChannelsRepo: Promise\u003cRepository\u003cChannelsEntity\u003e\u003e = (async () =\u003e {\n  const repo = await (await client).fetchRepository(ChannelsSchema);\n  await repo.createIndex();\n  return repo;\n})();\n```\n\n- UsersRepo: This repo controls the user entities\n  - UserEntity: this entity handles users,\n\n```js\nconst UsersSchema = new Schema(UsersEntity, {\n  user_id: { type: \"string\" },\n  username: { type: \"text\", sortable: true },\n  fullname: { type: \"text\", sortable: true },\n  email: { type: \"string\" },\n  password: { type: \"string\", sortable: false },\n  profile_picture: { type: \"string\" },\n  cover_picture: { type: \"string\" },\n  created_at: { type: \"date\", sortable: true },\n  bio: { type: \"text\" },\n  status: { type: \"string\" },\n  friends: { type: \"string[]\" },\n});\n\nexport const UsersRepo: Promise\u003cRepository\u003cUsersEntity\u003e\u003e = (async () =\u003e {\n  const repo = await (await client).fetchRepository(UsersSchema);\n\n  await repo.createIndex();\n  return repo;\n})();\n```\n\n### How the data is accessed:\n\nThe data is accessed through each repo instance,\nit uses the `search()` method of `redis-om` to access data,\nfor instance:\nTo create a new channel,\n\n```js\nawait ChannelsRepo.createAndSave(newChannel);\n```\n\nTo query a channel\n\n```js\nconst channel = await ChannelsRepo.search()\n  .where(\"channel_id\")\n  .equal(channelId)\n  .returnFirst();\n```\n\nTo query multiple channels\n\n```js\nconst channels = await ChannelsRepo.search()\n  .where(\"channel_id\")\n  .equal(channelId)\n  .returnAll({ pageSize: 100 });\n\n// or\nconst channels = await ChannelsRepo.search()\n  .where(\"is_public\")\n  .is.true()\n  .page(offset, limit);\n```\n\nTo remove/delete a channel, query the channel and use `remove()` method, passing in the channel's `entityId`,\n\n\u003e **Note:**`entityId` is autogenerated by redis-om\n\n```js\nconst channel = await ChannelsRepo.search()\n  .where(\"channel_id\")\n  .equal(channelId)\n  .returnFirst();\n\nawait ChannelsRepo.remove(channel.entityId);\n```\n\n## How to run it locally?\n\n\u003e Before running the app locally, make sure you have Typescript installed, if not, then run this command `npm i -g typescript` to install it globally.\n\nThen,\n\n```\ngit clone https://github.com/lucky-victory/viby.git\n```\n\nThe repo consist of two main folders `frontend` and `backend`,\n\nYou will have to set up the `backend` first before the `frontend`, so run the following commands\n\n```\ncd backend\ncp .env.example .env\n\n```\n\nyou will need to set up the following environment variables\n**REQUIRED**\n\n- REDIS*DB_URL: a valid redis url for your redis instance, \\_Note: it should contain username and password parts*.\n\n- JWT_SECRET: this could be a string of any value, it is used as a secret to generate a JWT token\n\n**OPTIONAL**\n\n- JWT_EXPIRATION: Expiration time for the JWT token, default is '5m' (5mins)\n- CLOUDINARY_URL: this is needed to process the audio files, if you just want to send text message, you can skip this\n- ALLOWED_ORIGIN: CORS setting, default is '\\*'\n\nonce all is done, run\n\n```\nnpm install\nnpm run dev\n```\n\nThis will startup the server at http://localhost:3300\n\nNow move to the frontend\n\n```\ncd ..\ncd frontend\n# move into src folder and update the environment.ts\n# and update apiBaseUrl and socketUrl\n```\n\n```js\n{\n    apiBaseUrl:'http://localhost:3300',\n    socketUrl:'http://localhost:3300/socket'\n}\n```\n\nNow run `npm run start`, the application would be started at http://localhost:4200\n\n### Prerequisites\n\n- Typescript v4 or newer\n- Node: v14 or newer\n- npm: v8 or newer\n\n### Local installation\n\n## Deployment\n\nTo make deploys work, you need to create free account on [Redis Cloud](https://redis.info/try-free-dev-to)\n\n### Google Cloud Run\n\n[Insert Run on Google button](https://cloud.google.com/blog/products/serverless/introducing-cloud-run-button-click-to-deploy-your-git-repos-to-google-cloud)\n\n### Heroku\n\n[Insert Deploy on Heroku button](https://devcenter.heroku.com/articles/heroku-button)\n\n### Netlify\n\n[Insert Deploy on Netlify button](https://www.netlify.com/blog/2016/11/29/introducing-the-deploy-to-netlify-button/)\n\n### Vercel\n\n[Insert Deploy on Vercel button](https://vercel.com/docs/deploy-button)\n\n## More Information about Redis Stack\n\nHere some resources to help you quickly get started using Redis Stack. If you still have questions, feel free to ask them in the [Redis Discord](https://discord.gg/redis) or on [Twitter](https://twitter.com/redisinc).\n\n### Getting Started\n\n1. Sign up for a [free Redis Cloud account using this link](https://redis.info/try-free-dev-to) and use the [Redis Stack database in the cloud](https://developer.redis.com/create/rediscloud).\n1. Based on the language/framework you want to use, you will find the following client libraries:\n   - [Redis OM .NET (C#)](https://github.com/redis/redis-om-dotnet)\n     - Watch this [getting started video](https://www.youtube.com/watch?v=ZHPXKrJCYNA)\n     - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-dotnet/)\n   - [Redis OM Node (JS)](https://github.com/redis/redis-om-node)\n     - Watch this [getting started video](https://www.youtube.com/watch?v=KUfufrwpBkM)\n     - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-node/)\n   - [Redis OM Python](https://github.com/redis/redis-om-python)\n     - Watch this [getting started video](https://www.youtube.com/watch?v=PPT1FElAS84)\n     - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-python/)\n   - [Redis OM Spring (Java)](https://github.com/redis/redis-om-spring)\n     - Watch this [getting started video](https://www.youtube.com/watch?v=YhQX8pHy3hk)\n     - Follow this [getting started guide](https://redis.io/docs/stack/get-started/tutorials/stack-spring/)\n\nThe above videos and guides should be enough to get you started in your desired language/framework. From there you can expand and develop your app. Use the resources below to help guide you further:\n\n1. [Developer Hub](https://redis.info/devhub) - The main developer page for Redis, where you can find information on building using Redis with sample projects, guides, and tutorials.\n1. [Redis Stack getting started page](https://redis.io/docs/stack/) - Lists all the Redis Stack features. From there you can find relevant docs and tutorials for all the capabilities of Redis Stack.\n1. [Redis Rediscover](https://redis.com/rediscover/) - Provides use-cases for Redis as well as real-world examples and educational material\n1. [RedisInsight - Desktop GUI tool](https://redis.info/redisinsight) - Use this to connect to Redis to visually see the data. It also has a CLI inside it that lets you send Redis CLI commands. It also has a profiler so you can see commands that are run on your Redis instance in real-time\n1. Youtube Videos\n   - [Official Redis Youtube channel](https://redis.info/youtube)\n   - [Redis Stack videos](https://www.youtube.com/watch?v=LaiQFZ5bXaM\u0026list=PL83Wfqi-zYZFIQyTMUU6X7rPW2kVV-Ppb) - Help you get started modeling data, using Redis OM, and exploring Redis Stack\n   - [Redis Stack Real-Time Stock App](https://www.youtube.com/watch?v=mUNFvyrsl8Q) from Ahmad Bazzi\n   - [Build a Fullstack Next.js app](https://www.youtube.com/watch?v=DOIWQddRD5M) with Fireship.io\n   - [Microservices with Redis Course](https://www.youtube.com/watch?v=Cy9fAvsXGZA) by Scalable Scripts on freeCodeCamp\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithveek%2Fviby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithveek%2Fviby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithveek%2Fviby/lists"}