{"id":19781994,"url":"https://github.com/sparkeduab/sparked-server","last_synced_at":"2025-04-30T22:30:38.639Z","repository":{"id":40747928,"uuid":"185807060","full_name":"SparkEdUAB/sparked-server","owner":"SparkEdUAB","description":"GraphQL server for SparkEd ","archived":false,"fork":false,"pushed_at":"2023-01-06T01:50:21.000Z","size":5825,"stargazers_count":3,"open_issues_count":31,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-03-05T05:38:34.477Z","etag":null,"topics":["apollo-server","express","graphql","graphql-server","sparked"],"latest_commit_sha":null,"homepage":"https://sparked.netlify.com/","language":"JavaScript","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/SparkEdUAB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-09T13:43:24.000Z","updated_at":"2021-07-23T07:35:05.000Z","dependencies_parsed_at":"2023-02-05T02:00:51.533Z","dependency_job_id":null,"html_url":"https://github.com/SparkEdUAB/sparked-server","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkEdUAB%2Fsparked-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkEdUAB%2Fsparked-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkEdUAB%2Fsparked-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkEdUAB%2Fsparked-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkEdUAB","download_url":"https://codeload.github.com/SparkEdUAB/sparked-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224225331,"owners_count":17276435,"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-server","express","graphql","graphql-server","sparked"],"created_at":"2024-11-12T06:03:27.915Z","updated_at":"2024-11-12T06:03:28.612Z","avatar_url":"https://github.com/SparkEdUAB.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-Ready--to--Code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/SparkEdUAB/sparked-server) \n\n## sparked-server\n\n[![Build Status](https://travis-ci.com/SparkEdUAB/sparked-server.svg?branch=master)](https://travis-ci.com/SparkEdUAB/sparked-server)\n[![Build Status](https://dev.azure.com/Manolivier930767/SparkEd/_apis/build/status/sparked-srv%20-%20CI?branchName=master)](https://dev.azure.com/Manolivier930767/SparkEd/_build/latest?definitionId=3\u0026branchName=master)\n[![Build Status](https://dev.azure.com/Manolivier930767/SparkEd/_apis/build/status/sparked-srv%20-%20CI?branchName=master\u0026jobName=Build)](https://dev.azure.com/Manolivier930767/SparkEd/_build/latest?definitionId=3\u0026branchName=master)\n![GitHub](https://img.shields.io/github/license/Sparkeduab/sparked-server.svg?style=flat-square)\n![GitHub repo size](https://img.shields.io/github/repo-size/sparkeduab/sparked-server.svg?style=flat-square)\n![David](https://img.shields.io/david/dev/sparkeduab/sparked-server.svg?style=flat-square)\n![GitHub issues](https://img.shields.io/github/issues-raw/sparkeduab/sparked-server.svg?style=flat-square)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/sparkeduab/sparked-server.svg?style=flat-square)\n\nSparkEd is a responsive cross-browser software that helps you organize and present educational and training content, it supports different types of resources, v2 has been used in several schools in Ethiopia with more than 15000 resources on a single instance.\n\nThis is an initial graph representation of sparked-server\n![graph representation ](gr-updated.png)\nThe above graph is initial and doesn't contain all data, this is likely to be updated.\n\nThe following are examples of data of GraphQL queries and mutations\n\n### Authentication\n\nAll the queries need to be authenticated, you can authenticate via a login mutation\n**Register**\n\n```graphql\nmutation {\n  register(email: \"olivier@gmail.com\", password: \"oL7vi3#\") {\n    email\n    password\n  }\n}\n```\n\nThe password is hashed and never stored as plain text, the above mutation will return the email and a hashed password.\n\n**Login**\n\n```graphql\nmutation {\n  login(email: \"olivier@gmail.com\", password: \"oL7vi3#\")\n}\n```\n\nThe above mutation will give you results that include a token like this\n\n```json\n{\n  \"data\": {\n    \"login\": \"eyJhbGciOIkpXVCJ9.eyJ19pZCI6MzM2MDd9.trf9Rm-4w9nFBl4_gF1DfSTH2__xo\"\n  }\n}\n```\n\nYou can then use the login token to pass it in headers as \"authorization\" to authentication any of the queries and mutations below\n\n**Adding a course**\n\n```graphql\nmutation {\n  addCourse(name: \"Introduction\") {\n    name\n  }\n}\n```\n\n**Querying courses**\n\n```graphql\n{\n  query {\n    getCourses {\n      _id\n      name\n    }\n  }\n}\n```\n## Development\n\n**requirements**\n\n- Node ˆv6\n- npm@latest\n- MongoDb\n\nClone the repo\n\n`git clone https://github.com/OlivierJM/sparked-server.git`  \n`cd sparked-server`\n\ninstall dependencies\n\n`npm install` or `yarn`\n\ncreate a file in the root of the project called `.env` and add your contents as follows.\n\n```\nTOKEN=\"thegeneratedtoken\"\nURL= \"http://localhost:3000/graphiql\"\nGRAPHQL_PORT = 3000\nMONGO_PORT = 27017\nMONGO_URL = \"localhost\"\ndbName = \"sparked\"\nSECRET = \"yoursecretkey\"\nUSER=\"user\"\nPASS=\"pass\"\nTEST_DB=\"test\"\n```\n\n\n**Running**\n\n`npm dev` or `yarn dev`\n\n**Testing**\n\n`yarn test`\n\n**Contribution**\n\nFork this repo and clone your forked repo\n\n`git clone https://github.com/your-github-username/sparked-server.git`\n\nAdd this repo to your remotes as upstream.\n\n`git remote add upstream https://github.com/SparkEdUAB/sparked-server`\n\nBefore pushing anything to your fork, always\n\n`git pull upstream`\n\n\u003e Don't forget to add the .env file mentioned above.\n\n**Note:** Make sure all tests are passing and there are no lint errors before pushing, if you make changes to the code add the tests for that.\n\nThank you \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkeduab%2Fsparked-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkeduab%2Fsparked-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkeduab%2Fsparked-server/lists"}