{"id":25171532,"url":"https://github.com/basemax/codesharehublaravelgraphql","last_synced_at":"2026-04-11T22:03:26.447Z","repository":{"id":192300895,"uuid":"680320864","full_name":"BaseMax/CodeShareHubLaravelGraphQL","owner":"BaseMax","description":"A collaborative code snippet manager powered by GraphQL, built on Laravel 10 and PHP 8.2. Share, discuss, and collaborate on code effortlessly.","archived":false,"fork":false,"pushed_at":"2024-12-10T01:27:56.000Z","size":1157,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:08:04.794Z","etag":null,"topics":["code-snippet","code-snippet-laravel","code-snippets","graphql","graphql-laravel","graphql-php","laravel","laravel-code","laravel-graphql","laravel1-","php","php-graphql","php8"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaseMax.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}},"created_at":"2023-08-18T22:38:41.000Z","updated_at":"2024-11-13T21:32:05.000Z","dependencies_parsed_at":"2023-09-04T03:15:50.278Z","dependency_job_id":"50681d69-5512-416c-b870-7bb7c3fb9621","html_url":"https://github.com/BaseMax/CodeShareHubLaravelGraphQL","commit_stats":null,"previous_names":["basemax/codesharehublaravelgraphql"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCodeShareHubLaravelGraphQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCodeShareHubLaravelGraphQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCodeShareHubLaravelGraphQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaseMax%2FCodeShareHubLaravelGraphQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaseMax","download_url":"https://codeload.github.com/BaseMax/CodeShareHubLaravelGraphQL/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247079309,"owners_count":20880030,"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":["code-snippet","code-snippet-laravel","code-snippets","graphql","graphql-laravel","graphql-php","laravel","laravel-code","laravel-graphql","laravel1-","php","php-graphql","php8"],"created_at":"2025-02-09T09:20:50.078Z","updated_at":"2026-04-11T22:03:26.384Z","avatar_url":"https://github.com/BaseMax.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Snippet Manager GraphQL Laravel\n\nCode Snippet Manager is a tool designed to simplify the process of managing and sharing code snippets among developers. It leverages Laravel 10, PHP 8.2, and Redis for caching to provide an efficient and user-friendly platform for developers to store, retrieve, and collaborate on code snippets seamlessly.\n\n## Features\n\n- **GraphQL API:** The core of this tool is built around a GraphQL API, allowing developers to interact with the system using a flexible and powerful query language.\n- **Snippet Management:** Easily create, update, delete, and retrieve code snippets. Each snippet is associated with metadata such as title, description, tags, and language for efficient organization.\n- **Search and Filtering:** Quickly find the snippets you need using search queries and filtering options based on tags, language, and more.\n- **User Authentication:** Secure user authentication and authorization are integrated, ensuring that only authorized users can access and modify their own snippets.\n- **Sharing and Collaboration:** Share snippets with other developers by generating unique links, allowing for easy collaboration and discussion.\n- **Caching with Redis:** Utilize Redis for caching to optimize the performance of the application, ensuring fast response times even during peak usage.\n\n## Installation\n\nFollow these steps to set up and run the Code Snippet Manager on your local environment:\n\nClone the repository:\n\n```bash\ngit clone https://github.com/basemax/CodeShareHubLaravelGraphQL.git\ncd CodeShareHubLaravelGraphQL\n```\n\nInstall dependencies using Composer:\n\n```bash\ncomposer install\n```\n\nCopy the `.env.example` file to `.env`:\n\n```bash\ncp .env.example .env\n```\n\nConfigure your database settings in the `.env` file.\n\nSet up Redis for caching by providing the necessary Redis connection details in the .env file.\n\nGenerate the application key:\n\n```bash\nphp artisan key:generate\n```\n\nRun database migrations:\n\n```bash\nphp artisan migrate\n```\n\nStart the development server:\n\n```bash\nphp artisan serve\n```\n\nAccess the application via your browser at `http://localhost:8000`.\n\n## Usage\n\n- Register for an account or log in if you already have one.\n- Once logged in, you can create, view, edit, and delete your code snippets.\n- Utilize the GraphQL API at /graphql to interact with the system programmatically. Refer to the API documentation for available queries and mutations.\n- To share a snippet, generate a shareable link and share it with other developers. They can access and discuss the snippet through the provided link.\n\n## GraphQL Queries and Mutations\n\n| Operation             | Description                                         | Example Usage                                           |\n|-----------------------|-----------------------------------------------------|---------------------------------------------------------|\n| **Queries**           |                                                     |                                                         |\n| `getUser`             | Get user information by ID                          | `getUser(id: ID!): User`                                |\n| `getSnippet`          | Get snippet by ID                                   | `getSnippet(id: ID!): Snippet`                          |\n| `searchSnippets`      | Search snippets based on filters                    | `searchSnippets(filters: SnippetFilters!): [Snippet]`   |\n| `getAllTags`          | Get a list of all available tags                    | `getAllTags: [String]`                                 |\n| `getUserSnippets`     | Get all snippets created by a user                  | `getUserSnippets(userID: ID!): [Snippet]`               |\n| `getTopRatedSnippets` | Get top-rated snippets by star rating               | `getTopRatedSnippets(limit: Int!): [Snippet]`           |\n| `getSnippetComments`  | Get comments associated with a snippet              | `getSnippetComments(snippetID: ID!): [Comment]`         |\n| **Mutations**         |                                                     |                                                         |\n| `createUser`          | Create a new user                                   | `createUser(input: CreateUserInput!): User`             |\n| `createSnippet`       | Create a new snippet                                | `createSnippet(input: CreateSnippetInput!): Snippet`    |\n| `updateSnippet`       | Update an existing snippet                          | `updateSnippet(id: ID!, input: UpdateSnippetInput!): Snippet` |\n| `deleteSnippet`       | Delete a snippet by ID                              | `deleteSnippet(id: ID!): Boolean`                      |\n| `addTagToSnippet`     | Add a tag to a snippet                              | `addTagToSnippet(snippetID: ID!, tag: String!): Snippet` |\n| `removeTagFromSnippet` | Remove a tag from a snippet                         | `removeTagFromSnippet(snippetID: ID!, tag: String!): Snippet` |\n| `shareSnippet`        | Generate a shareable link for a snippet             | `shareSnippet(snippetID: ID!): String`                 |\n| `rateSnippet`         | Rate a snippet with a star value                    | `rateSnippet(snippetID: ID!, rating: Int!): Snippet`    |\n| `createComment`       | Create a comment on a snippet                       | `createComment(snippetID: ID!, text: String!): Comment` |\n| `deleteComment`       | Delete a comment by ID                              | `deleteComment(id: ID!): Boolean`                      |\n| `flagComment`         | Flag a comment as inappropriate                     | `flagComment(commentID: ID!): Comment`                 |\n| `approveSnippet`      | Approve a snippet pending review                    | `approveSnippet(snippetID: ID!): Snippet`              |\n| `createReview`        | Create a review for a snippet                       | `createReview(snippetID: ID!, rating: Int!, text: String!): Review` |\n| `updateReview`        | Update an existing review                           | `updateReview(reviewID: ID!, rating: Int!, text: String!): Review` |\n| `deleteReview`        | Delete a review by ID                               | `deleteReview(id: ID!): Boolean`                       |\n| `addCollaborator`     | Add a collaborator to a snippet                    | `addCollaborator(snippetID: ID!, userID: ID!): Snippet` |\n| `removeCollaborator`  | Remove a collaborator from a snippet               | `removeCollaborator(snippetID: ID!, userID: ID!): Snippet` |\n| `forkSnippet`         | Fork an existing snippet to create a new one       | `forkSnippet(snippetID: ID!): Snippet`                 |\n| `tagSuggestion`       | Suggest tags based on snippet content              | `tagSuggestion(snippetID: ID!): [String]`              |\n\n## GraphQL\n\n```graphql\ntype User {\n  id: ID!\n  username: String!\n  email: String!\n  snippets: [Snippet]\n}\n\ntype Snippet {\n  id: ID!\n  title: String!\n  description: String!\n  code: String!\n  language: String!\n  tags: [String]\n  owner: User!\n  collaborators: [User]\n  ratings: [Review]\n  comments: [Comment]\n}\n\ntype Comment {\n  id: ID!\n  text: String!\n  user: User!\n  snippet: Snippet!\n}\n\ntype Review {\n  id: ID!\n  rating: Int!\n  text: String!\n  user: User!\n  snippet: Snippet!\n}\n\ntype Collaborator {\n  id: ID!\n  user: User!\n  snippet: Snippet!\n}\n\ninput CreateUserInput {\n  username: String!\n  email: String!\n  # Other user input fields\n}\n\ninput CreateSnippetInput {\n  title: String!\n  description: String!\n  code: String!\n  language: String!\n  tags: [String]\n}\n\ninput UpdateSnippetInput {\n  title: String\n  description: String\n  code: String\n  language: String\n  tags: [String]\n}\n\ntype Query {\n  getUser(id: ID!): User\n  getSnippet(id: ID!): Snippet\n  searchSnippets(filters: SnippetFilters!): [Snippet]\n  getAllTags: [String]\n  getUserSnippets(userID: ID!): [Snippet]\n  getTopRatedSnippets(limit: Int!): [Snippet]\n  getSnippetComments(snippetID: ID!): [Comment]\n  searchSnippetsWithOptions(options: SearchOptions!): SearchResult\n  getUserByUsername(username: String!): User\n  getSnippetByTitle(title: String!): Snippet\n  # Other queries\n}\n\ninput SnippetFilters {\n  tags: [String]\n  language: String\n  # Other filtering fields\n}\n\ninput EditUserInput {\n  username: String\n  email: String\n  # Other user editable fields\n}\n\ntype Subscription {\n  snippetCreated: Snippet\n  commentAdded(snippetID: ID!): Comment\n  reviewAdded(snippetID: ID!): Review\n}\n\ntype Comment {\n  id: ID!\n  text: String!\n  user: User!\n  snippet: Snippet!\n  isFlagged: Boolean\n}\n\ntype FlaggedComment {\n  id: ID!\n  originalComment: Comment!\n  reason: String!\n}\n\nenum SortDirection {\n  ASC\n  DESC\n}\n\ninput SearchOptions {\n  query: String!\n  sortBy: String\n  sortDirection: SortDirection\n  limit: Int\n}\n\ntype SearchResult {\n  items: [Snippet]\n  totalCount: Int\n}\n\ntype Mutation {\n  createUser(input: CreateUserInput!): User\n  createSnippet(input: CreateSnippetInput!): Snippet\n  updateSnippet(id: ID!, input: UpdateSnippetInput!): Snippet\n  deleteSnippet(id: ID!): Boolean\n  addTagToSnippet(snippetID: ID!, tag: String!): Snippet\n  removeTagFromSnippet(snippetID: ID!, tag: String!): Snippet\n  shareSnippet(snippetID: ID!): String\n  rateSnippet(snippetID: ID!, rating: Int!): Snippet\n  createComment(snippetID: ID!, text: String!): Comment\n  deleteComment(id: ID!): Boolean\n  flagComment(commentID: ID!): Comment\n  approveSnippet(snippetID: ID!): Snippet\n  createReview(snippetID: ID!, rating: Int!, text: String!): Review\n  updateReview(reviewID: ID!, rating: Int!, text: String!): Review\n  deleteReview(id: ID!): Boolean\n  addCollaborator(snippetID: ID!, userID: ID!): Snippet\n  removeCollaborator(snippetID: ID!, userID: ID!): Snippet\n  forkSnippet(snippetID: ID!): Snippet\n  tagSuggestion(snippetID: ID!): [String]\n  deleteCollaborator(snippetID: ID!, userID: ID!): Snippet\n  createTag(tagName: String!): String\n  editUser(id: ID!, input: EditUserInput!): User\n  editComment(id: ID!, newText: String!): Comment\n  createFlaggedComment(snippetID: ID!, text: String!): Comment\n  # Other mutations\n}\n```\n\n## Contributing\n\n- Contributions to the Code Snippet Manager project are welcome! To contribute:\n- Fork the repository.\n- Create a new branch for your feature or bug fix.\n- Implement your changes and ensure all tests pass.\n- Submit a pull request to the main repository, describing your changes and their purpose.\n\n## License\n\nThis project is licensed under the GPL-3.0 License - see the LICENSE file for details.\n\nCopyright 2023, Max Base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fcodesharehublaravelgraphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasemax%2Fcodesharehublaravelgraphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasemax%2Fcodesharehublaravelgraphql/lists"}