{"id":26891143,"url":"https://github.com/kevinangeles/thechatapp","last_synced_at":"2026-04-09T15:48:53.622Z","repository":{"id":285341080,"uuid":"957773985","full_name":"KevinAngeles/thechatapp","owner":"KevinAngeles","description":"The Chat App is a monorepo that contains three distinct projects, each serving a specific purpose in building a modern chat application. ","archived":false,"fork":false,"pushed_at":"2025-03-31T07:11:56.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T07:23:26.664Z","etag":null,"topics":["apollo-client","apollo-server","express","jwt","mongodb","nodejs","redux-toolkit","typescript","vite"],"latest_commit_sha":null,"homepage":"","language":null,"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/KevinAngeles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-03-31T05:27:19.000Z","updated_at":"2025-03-31T07:12:00.000Z","dependencies_parsed_at":"2025-03-31T07:23:36.100Z","dependency_job_id":"09e19efe-891f-414e-ab6e-1058ed39d8bb","html_url":"https://github.com/KevinAngeles/thechatapp","commit_stats":null,"previous_names":["kevinangeles/thechatapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAngeles%2Fthechatapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAngeles%2Fthechatapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAngeles%2Fthechatapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KevinAngeles%2Fthechatapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KevinAngeles","download_url":"https://codeload.github.com/KevinAngeles/thechatapp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246553005,"owners_count":20795834,"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":["apollo-client","apollo-server","express","jwt","mongodb","nodejs","redux-toolkit","typescript","vite"],"created_at":"2025-03-31T22:32:52.704Z","updated_at":"2025-12-30T19:26:01.125Z","avatar_url":"https://github.com/KevinAngeles.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Chat App\r\n\r\nThe Chat App is a monorepo containing the backend and frontend code for a modern chat application. This monorepo is managed using [Nx](https://nx.dev/), which provides a powerful toolset for managing multiple projects in a single repository.\r\n\r\n---\r\n\r\n## Code Structure in the Monorepo\r\n\r\n### 1. **Backend: express-passport-graphql-chat**\r\nThis is the backend service for the chat application, built with Node.js, Express, Passport.js, GraphQL, and WebSocket. It handles user authentication, GraphQL queries, mutations, subscriptions, and real-time messaging.\r\n\r\n- **Purpose**: Backend service for authentication and real-time messaging.\r\n- **Key Features**:\r\n  - User login and registration.\r\n  - JWT-based authentication.\r\n  - Session management with `express-session`.\r\n  - GraphQL API for chat messages.\r\n  - WebSocket server for real-time communication.\r\n  - Integration with Apollo Server.\r\n\r\n---\r\n\r\n### 2. **Frontend: redux-vite-apollo-chat**\r\nThis is the frontend application for the chat app, built with React, Redux, and Apollo Client. It provides the user interface for sending and receiving messages in real-time.\r\n\r\n- **Purpose**: Frontend for the chat application.\r\n- **Key Features**:\r\n  - Real-time messaging.\r\n  - State management with Redux.\r\n  - GraphQL integration with Apollo Client.\r\n\r\n---\r\n\r\n## Monorepo Purpose\r\nThe monorepo is designed to streamline the development and management of the chat application by housing both the backend and frontend code in a single repository. Using Nx, developers can efficiently build, serve, and test individual parts of the application or the entire system.\r\n\r\n---\r\n\r\n## MongoDB Setup\r\nThe backend requires a MongoDB database to store user and chat data. You can quickly set up a MongoDB instance using Docker.\r\n\r\nRun the following command to start a MongoDB container:\r\n```\r\ndocker run -d -p 27017:27017 -v C:/mydirectory/data:/data --rm mongodb/mongodb-community-server\r\n```\r\n\r\nThis command will:\r\n- Start a MongoDB container in detached mode.\r\n- Map port `27017` on your local machine to the MongoDB container.\r\n- Mount the local directory `C:/mydirectory/data` to the container's `/data` directory for persistent storage (you can replace `C:/mydirectory/data` with a different directory of your choice). \r\n- Automatically remove the container when stopped.\r\n\r\n---\r\n\r\n## Available Commands\r\n\r\n### Serve Projects Individually\r\n- **Serve the backend**:\r\n  ```\r\n  npx nx serve express-passport-graphql-chat\r\n  ```\r\n- **Serve the frontend**:\r\n  ```\r\n  npx nx serve redux-vite-apollo-chat\r\n  ```\r\n\r\n### Build Projects Individually\r\n- **Build the backend**:\r\n  ```\r\n  npx nx build express-passport-graphql-chat\r\n  ```\r\n- **Build the frontend**:\r\n  ```\r\n  npx nx build redux-vite-apollo-chat\r\n  ```\r\n\r\n### Serve All Projects at Once\r\n- **To serve both the backend and frontend simultaneously**:\r\n  ```\r\n  npx nx run-many --target=serve --all\r\n  ```\r\n\r\n### Build All Projects at Once\r\n- **To build both the backend and frontend simultaneously**:\r\n  ```\r\n  npx nx run-many --target=build --all\r\n  ```\r\n\r\n## Getting Started\r\n1. Clone the repository:\r\n  ```\r\n  git clone https://github.com/KevinAngeles/thechatapp\r\n  cd thechatapp\r\n  ```\r\n\r\n2. Install dependencies:\r\n  ```\r\n  npm install\r\n  ```\r\n\r\n3. Start a MongoDB server\r\n\r\n4. Create a `.env` file inside `apps/express-passport-graphql-chat`, `apps/express-passport-graphql-chat-e2e` and `apps/redux-vite-apollo-chat` using the variables provided in their respective `.env.backup` files.\r\n\r\n5. Serve or build the projects using the commands listed above.\r\n\r\n## Author\r\nThis project was created and maintained by [**Kevin Angeles**](https://www.kevinangeles.com/).\r\n\r\nFeel free to reach out for questions or contributions!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinangeles%2Fthechatapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinangeles%2Fthechatapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinangeles%2Fthechatapp/lists"}