{"id":20731856,"url":"https://github.com/mbeps/next_discussion_platform","last_synced_at":"2025-12-12T06:06:13.642Z","repository":{"id":167387701,"uuid":"595166448","full_name":"mbeps/next_discussion_platform","owner":"mbeps","description":"Full Stack Website for Forum Discussion Platform using Next.JS and Firebase","archived":false,"fork":false,"pushed_at":"2025-06-09T12:33:09.000Z","size":2771,"stargazers_count":74,"open_issues_count":22,"forks_count":26,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-12T20:31:53.606Z","etag":null,"topics":["chakra-ui","firebase","full-stack","nextjs","react","recoil","social-media","typescript","webdevelopment"],"latest_commit_sha":null,"homepage":"https://circus-discussion.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/mbeps.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":"2023-01-30T14:35:40.000Z","updated_at":"2025-05-18T21:27:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"ed9e841f-573a-4c82-af82-a52e37cd5160","html_url":"https://github.com/mbeps/next_discussion_platform","commit_stats":null,"previous_names":["mbeps/next_discussion_platform"],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/mbeps/next_discussion_platform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbeps%2Fnext_discussion_platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbeps%2Fnext_discussion_platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbeps%2Fnext_discussion_platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbeps%2Fnext_discussion_platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbeps","download_url":"https://codeload.github.com/mbeps/next_discussion_platform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbeps%2Fnext_discussion_platform/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259522454,"owners_count":22870469,"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":["chakra-ui","firebase","full-stack","nextjs","react","recoil","social-media","typescript","webdevelopment"],"created_at":"2024-11-17T05:16:53.938Z","updated_at":"2025-12-12T06:06:13.636Z","avatar_url":"https://github.com/mbeps.png","language":"TypeScript","funding_links":[],"categories":["NextJS"],"sub_categories":["Discussion Platform"],"readme":"# **Circus Discussions**\n*Forum Discussions Web Application*\n\n\u003cimg width=\"1000\" alt=\"cover\" src=\"https://github.com/mbeps/next_discussion_platform/assets/58662575/21829226-db49-4f91-815c-8af72ff6dacf\"\u003e\n\n---\n\nIntroducing Circus, a discussion platform built on Next.js and Firebase. It now covers communities, voting, saved posts, and admin controls.\nUsers join and manage communities, post with images, vote, share, and save posts for later. Threaded comments and search keep discussions connected.\nAuthentication supports email/password plus Google and GitHub. Profile edits sync to posts and comments. The UI is responsive with light/dark mode and global toasts.\n\n# **Requirements**\nThese are the requirements needed to run the project:\n- Node.js 20+\n- Yarn 1.22+\n- Firebase project with Auth, Firestore, and Storage\n- Firebase CLI for deploying functions\n\n# **Features**\n## **Authentication \u0026 Account Management**\nThe system has several key user authentication and account management features designed to ensure that users have a seamless and secure experience:\n- Users can sign up using email and password\n- Users can sign up using third-party authentication providers such as Google and GitHub\n- Users can log in and log out\n- Users can reset their password\n- Users can update their profile image and username, with changes synced to posts and comments\n\n## **Community**\nThe system has several key community management features designed to promote engagement and collaboration among users:\n- Users can create communities with public, restricted, or private types\n- Users can subscribe and unsubscribe to and from a community\n- Admins can upload, change, or delete the community logo\n- Admins can change community visibility\n- Admins can add or remove other admins\n- Admins can remove members from a community\n- Users can view and paginate public and restricted communities, grouped by moderating, joined, or discover\n- Admins can delete a community with cascade cleanup of posts, comments, votes, snippets, and images\n\n## **Posts**\nThe system has several key features designed to make it easy for users to create and view posts within communities:\n- Users can create a post in a specific community with an optional image\n- Users can browse infinite feeds per community or home, with personalized subscribed feeds and a vote-ranked feed for guests\n- Users can open a post to interact with threaded comments\n- Users can view posts from subscribed communities and discover posts from all communities\n- Users can delete a post they have created\n- Users can vote on a post\n- Users can share a post\n- Users can save and unsave posts, and review them in a saved posts modal\n\n## **Comments**\nThe web application has several key features designed to make it easy for users to engage with others by creating and viewing comments:\n- Users can create threaded replies to posts and comments\n- Users can view nested comments in a post\n- Users can delete a comment they created\n- Comment counts stay in sync when threads change\n\n## **General**\nThe system has several general features to make the site user-friendly and accessible:\n- Logged-in users can view an infinite home feed from communities they are subscribed to\n- Logged-out users can view a vote-ranked home feed from all communities\n- Global search modal for public communities and recent posts\n- Community discovery and recommendations with infinite scroll\n- System UI is responsive, hence it can be used on smartphones, tablets, or computers\n- Global light/dark-mode toggle with preference persistence across sessions\n- Toast notifications for key actions\n\n# **Stack**\nThese are the main technologies that were used in this project:\n\n## **Front-End**\n- [**TypeScript**](https://www.typescriptlang.org/): Typed React code for safer changes and strong editor support.\n- [**Next.js (App Router)**](https://nextjs.org/): Runs on Next.js 16 with the App Router on React 18, using server components, streaming layouts, and route handlers in `app/`.\n- [**Jotai State Manager**](https://github.com/pmndrs/jotai/): Lightweight global state for posts, votes, communities, saved posts, and modals.\n- [**Chakra UI**](https://chakra-ui.com/): Chakra UI 3 with a custom theme, Emotion styling, and `next-themes` for persistent light/dark mode.\n\n\n## **Back-End**\n- [**Firebase**](https://firebase.google.com/): Firestore, Auth, and Storage power the app; Cloud Functions sync user documents and remove saved posts when a post is deleted.\n\n# **Running Application Locally**\nThese are simple steps to run the application locally. For more detail instructions, refer to the [Wiki](https://github.com/mbeps/next_discussion_platform/wiki). \n\n## 1. **Clone the Project Locally**\n```sh\ngit clone https://github.com/mbeps/next_discussion_platform.git\n```\n\n## 2. **Install Dependencies**\n```sh\nyarn install\n```\n\n## 3. **Set Up Environment**\n1. Copy the `.env.example` file and call it `.env.local`\n2. Populate the `.env.local` with the required Firebase secrets \n\n## 4. **Set Up Firebase**\n### **Set Up Cloud Functions**\n1. **Install Firebase tools**\n```sh\nnpm install -g firebase-tools\n```\n\n2. **Initialise Firebase project**\n```sh\nfirebase init\n```\n\n3. **Deploy cloud functions**\n```sh\nfirebase deploy --only functions\n```\n\n### **Set Up Firestore Indexing**\nSet the following indexes in the `Firestore Database` under the `Indexes` section. \nThese support feed and comments queries.\n\n| Collection ID | Fields Indexed                                                      |\n| ------------- | ------------------------------------------------------------------- |\n| `posts`       | `communityId` Ascending `createdAt` Descending __name__ Descending  |\n| `comments`    | `postId` Ascending `createdAt` Descending __name__ Descending       |\n| `posts`       | `communityId` Ascending `createTime` Descending __name__ Descending |\n\n## 5. **Run Project**\n```sh\nyarn dev\n```\nThis should run the project on `localhost:3000`\n\n# **Running via Docker**\nYou can build and run the application through Docker. This requires the `.env.local` file to be completed, refer to \ninstallation instructions in the [Wiki](https://github.com/mbeps/next_discussion_platform/wiki/3.-Installation#step-32-obtain-firebase-secrets-and-add-them-to-the-envlocal-file) for setting it up.\n\nOnce everything is ready, use the command bellow to run the application. \n```sh\ndocker-compose -f docker/docker-compose.yml up --build\n```\n\n# **Demo**\nThis video demonstrates the features and functionality of the project. \n\nhttps://user-images.githubusercontent.com/58662575/236821702-25dfb59c-162f-4de5-af8f-e0e7b8315aae.mp4\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbeps%2Fnext_discussion_platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbeps%2Fnext_discussion_platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbeps%2Fnext_discussion_platform/lists"}