{"id":20185029,"url":"https://github.com/hasferrr/dazzlecord","last_synced_at":"2026-04-08T16:01:57.839Z","repository":{"id":228211312,"uuid":"758811596","full_name":"hasferrr/Dazzlecord","owner":"hasferrr","description":"Discord Clone created using React, Next.js, Next-Auth v5, MongoDB + Prisma, Socket.io, Google Cloud Storage, Docker, Cloud Run.","archived":false,"fork":false,"pushed_at":"2026-04-08T07:32:47.000Z","size":9093,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-08T09:27:34.355Z","etag":null,"topics":["cloudrun","cloudstorage","docker","gcp","mongodb","nextjs","reactjs","socket-io"],"latest_commit_sha":null,"homepage":"https://deezcord-zpxm4cwxta-as.a.run.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/hasferrr.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-02-17T06:27:07.000Z","updated_at":"2026-04-08T07:32:51.000Z","dependencies_parsed_at":"2024-04-15T09:46:13.471Z","dependency_job_id":"5ae35b99-85de-4e98-abf4-82040915726b","html_url":"https://github.com/hasferrr/Dazzlecord","commit_stats":null,"previous_names":["hasferrr/discord-clone","hasferrr/deezcord","hasferrr/dazzlecord"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hasferrr/Dazzlecord","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasferrr%2FDazzlecord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasferrr%2FDazzlecord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasferrr%2FDazzlecord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasferrr%2FDazzlecord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hasferrr","download_url":"https://codeload.github.com/hasferrr/Dazzlecord/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hasferrr%2FDazzlecord/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cloudrun","cloudstorage","docker","gcp","mongodb","nextjs","reactjs","socket-io"],"created_at":"2024-11-14T03:10:44.673Z","updated_at":"2026-04-08T16:01:57.819Z","avatar_url":"https://github.com/hasferrr.png","language":"TypeScript","readme":"# Dazzlecord - Discord clone in React\n\n- [Dazzlecord - Discord clone in React](#dazzlecord---discord-clone-in-react)\n  - [Overview](#overview)\n  - [Previews](#previews)\n  - [Features](#features)\n  - [How it works](#how-it-works)\n  - [Getting Started](#getting-started)\n  - [Deployment](#deployment)\n    - [Deploy to Docker](#deploy-to-docker)\n    - [Deploy to Cloud Run](#deploy-to-cloud-run)\n      - [Step 1 - Create Artifact Registry Repository](#step-1---create-artifact-registry-repository)\n      - [Step 2 - Deploy it](#step-2---deploy-it)\n      - [Step 3 - Add Permission](#step-3---add-permission)\n\n## Overview\n\nDazzlecord is an online chat application and Discord clone developed using React, Next.js, and Socket.io. It utilizes databases such as MongoDB + Prisma ORM and Google Cloud Storage, and is deployed into Docker containers on Cloud Run microservices.\n\nThe application enables real-time messaging and file storage, with authentication provided by Next-Auth v5. It is designed with inspiration from Discord's interface.\n\nLive: \u003chttps://deezcord-zpxm4cwxta-as.a.run.app\u003e\n\nMirror: \u003chttps://dazzlecord.vercel.app\u003e\n\n## Previews\n\n![ss1](../assets/images/ss-mult-1.png?raw=true)\n![ss2](../assets/images/ss-mult-2.png?raw=true)\n\n## Features\n\nUser Authentication\n\n- Register\n- Login\n\nMessages\n\n- Send, edit, delete, chat and images or files\n- Preview sending and sent images\n- Realtime server's channels messaging\n- Realtime direct messaging\n\nUser Management\n\n- List friends \u0026 pending friend request\n- Send, Accept, Decline friend request\n- Display user's profile\n- Change user's profile (display name, profile photo, description)\n\nServer and Channels\n\n- Server creation, edit, deletion, and invite link\n- Channel creation, edit, and deletion\n- Change server's name and photo\n- Change channels's name\n\nMember Management\n\n- List all members\n- Display members profile\n- Change member role (owner, admin, moderator, guest)\n- Kick member\n\nand more\n\n## How it works\n\n\u003cimg src=\"../assets/images/design.png?raw=true\" width=\"512\"\u003e\n\n\u003cimg src=\"../assets/images/diagrams.png?raw=true\" width=\"512\"\u003e\n\n## Getting Started\n\nFollow the instructions below:\n\n1. Clone the repository\n\n   ```bash\n   git clone https://github.com/hasferrr/Dazzlecord.git\n   ```\n\n1. Install dependencies\n\n   ```bash\n   bun i\n   cd socket-io/\n   bun i\n   ```\n\n1. Configure Google Cloud Storage\n\n   1. Create, download, and place Service Account key file in the `/service-accounts` directory\n\n   1. Create a cloud storage bucket\n\n   1. Make it public accessible\n\n   1. Add this custom role to `allUsers` principal (in your storage bucket):\n\n      - `resourcemanager.projects.get`\n      - `storage.managedFolders.get`\n      - `storage.objects.get`\n\n      \u003cbr\u003e\n      \u003cdetails\u003e\n         \u003csummary\u003e Click to expand \u003c/summary\u003e\n         \u003cbr\u003e\n\n      \u003cimg src=\"../assets/images/gcs-custome-role-getter.png?raw=true\" width=\"384\"\u003e\n\n      \u003cimg src=\"../assets/images/gcs-all-users.png?raw=true\" width=\"600\"\u003e\n\n      \u003c/details\u003e\n\n   1. Add this role to service account:\n\n      - Storage Object Creator role\n\n         \u003cdetails\u003e\n            \u003csummary\u003e Click to expand \u003c/summary\u003e\n            \u003cbr\u003e\n\n         \u003cimg src=\"../assets/images/sa.png?raw=true\" width=\"384\"\u003e\n\n         \u003c/details\u003e\n\n      - `storage.buckets.update` and `storage.objects.delete` **custome role**\n\n         \u003cdetails\u003e\n            \u003csummary\u003e Click to expand \u003c/summary\u003e\n            \u003cbr\u003e\n\n         \u003cimg src=\"../assets/images/sa2.png?raw=true\" width=\"512\"\u003e\n\n         \u003c/details\u003e\n\n1. Configure MongoDB database\n\n    1. Create MongoDB Database: \u003chttps://cloud.mongodb.com\u003e\n    1. Get MongoDB URI: \u003chttps://www.mongodb.com/basics/mongodb-connection-string\u003e\n\n1. Add environment variables to `.env` (similiar to `.env.example` and all required)\n\n1. Start the application\n\n   ```bash\n   # terminal 1\n   bun run dev\n\n   # terminal 2\n   cd socket-io/\n   bun run dev\n   ```\n\n## Deployment\n\n1. You need to Configure Google Cloud Storage and Configure MongoDB database\n1. Set Next.js to port 3000 and Socket.io to port 3001\n1. Select deploy to Docker, Cloud Run, or deploy it yourself\n\n### Deploy to Docker\n\n```bash\ndocker compose up -d\n```\n\n### Deploy to Cloud Run\n\n#### Step 1 - Create Artifact Registry Repository\n\n\u003cdetails\u003e\n   \u003csummary\u003e Click to expand \u003c/summary\u003e\n   \u003cbr\u003e\n\n\u003cimg src=\"../assets/images/artifact-registry-1.png?raw=true\" width=\"384\"\u003e\n\u003cbr/\u003e\n\u003cimg src=\"../assets/images/artifact-registry-2.png?raw=true\" width=\"256\"\u003e\n\u003cbr/\u003e\n\u003cimg src=\"../assets/images/artifact-registry-3.png?raw=true\" width=\"384\"\u003e\n\n\u003c/details\u003e\n\n#### Step 2 - Deploy it\n\nYou can manually deploy it using cloud console or using script (select one)\n\n1. Using Cloud Console\n   1. Push the containerized Next.js and Socket.io apps to Artifact Registry\n   1. Deploy it to Cloud Run\n\n1. Using Cloud Build\n\n   Documentation: [Deploying to Cloud Run using Cloud Build](https://cloud.google.com/build/docs/deploying-builds/deploy-cloud-run)\n\n   1. Install and configure [Cloud SDK](https://cloud.google.com/sdk/docs/install-sdk)\n\n      \u003e Alternatively, you can use Cloud Shell\n\n   1. Login to your Google Cloud account\n   1. Enable Cloud Run Admin role to Cloud build\n\n      \u003e You can always see how to do it here: [Deploying to Cloud Run using Cloud Build](https://cloud.google.com/build/docs/deploying-builds/deploy-cloud-run#required_iam_permissions)\n\n   1. Configure the deployment in the `cloudbuild.yaml` and `cloudbuild-socket-bun.yaml` files\n   1. Execute the script\n\n      ```bash\n      chmod +x deploy-all.sh\n      ./deploy-all.sh\n      ```\n\n1. Copy the published URLs, add those to `.env`\n1. Redeploy it\n\n   \u003cdetails\u003e\n      \u003csummary\u003e Click to expand \u003c/summary\u003e\n      \u003cbr\u003e\n\n   Alternatively, you could infer the URLs of other services by using your knowledge of the structure of Cloud Run service URLs\n\n   \u003cimg src=\"../assets/images/run-url.png?raw=true\" width=\"512\"\u003e\n\n   \u003c/details\u003e\n\n#### Step 3 - Add Permission\n\nAdd `Cloud Run Invoker` Permission to `allUsers` pricipal for both deployed cloud run services\n\n\u003cdetails\u003e\n   \u003csummary\u003e Click to expand \u003c/summary\u003e\n   \u003cbr\u003e\n\n\u003cimg src=\"../assets/images/cloud-run-1.png?raw=true\" width=\"512\"\u003e\n\u003cbr/\u003e\n\u003cimg src=\"../assets/images/cloud-run-2.png?raw=true\" width=\"256\"\u003e\n\u003cbr/\u003e\n\u003cimg src=\"../assets/images/cloud-run-3.png?raw=true\" width=\"384\"\u003e\n\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasferrr%2Fdazzlecord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhasferrr%2Fdazzlecord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhasferrr%2Fdazzlecord/lists"}