{"id":13725370,"url":"https://github.com/pedronave/spoti-stats-api","last_synced_at":"2025-05-07T20:32:10.911Z","repository":{"id":42850485,"uuid":"261263317","full_name":"pedronave/spoti-stats-api","owner":"pedronave","description":"A simple API that allows users to track their Spotify play history","archived":false,"fork":false,"pushed_at":"2023-01-24T02:26:18.000Z","size":522,"stargazers_count":6,"open_issues_count":15,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-04T01:27:41.735Z","etag":null,"topics":["express","graphql","mongodb","nodejs","spotify"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pedronave.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-04T18:23:53.000Z","updated_at":"2023-07-04T09:20:55.000Z","dependencies_parsed_at":"2023-01-30T13:15:45.705Z","dependency_job_id":null,"html_url":"https://github.com/pedronave/spoti-stats-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronave%2Fspoti-stats-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronave%2Fspoti-stats-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronave%2Fspoti-stats-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedronave%2Fspoti-stats-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedronave","download_url":"https://codeload.github.com/pedronave/spoti-stats-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224645345,"owners_count":17346129,"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":["express","graphql","mongodb","nodejs","spotify"],"created_at":"2024-08-03T01:02:20.831Z","updated_at":"2024-11-14T15:31:13.913Z","avatar_url":"https://github.com/pedronave.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Spoti Stats API\n\nThe Spoti Stats API is a simple GraphQL API to track some Spotify play history and share them with other users. It allows users to authenticate using Spotify and have their play history be saved.\n\nThe tech stack used is the following:\n- **GraphQL** - Query user data\n- **Express** and **Node.js** - Server and authentication\n- **MongoDB** - Data storage\n\n**Please note that this project is still in the very early stages of development, avoid using in production!**\n\n## Installation\n\nTo install the project you first need to clone it. Open the project directory in a terminal and run `npm install` to install the dependencies needed.\n\nSome additional configuration steps are described below.\n\n### Spotify settings\n\nIn order to run this project, you need to create a Spotify app in the [developer dashboard](https://developer.spotify.com/dashboard). Then you can get the **Client ID** and **Client Secret** needed for the environment configuration.\n\nYou will additionally need to set up the callback URL. This will be the URL of your client that will be redirected to after the user logins with Spotify. This will need to be added to the environment variables and to the Spotify app settings under **Redirect URIs**.\n\n### Environment variables\n\nMake sure to configure the environment variables before running. For this you will need:\n\n- The URI to your MongoDB instance as well as the login information.\n- The Spotify app's **Client ID**, **Client Secret**, and **Redirect URI** mentioned in the section above.\n- A string to be used as the secret in the JWT token generation.\n\nThere is a template for the expected environment variables in `src/config/.env.template`. The default configuration expects the file `src/config/.env.development` to exist, so duplicate the template and rename it.\n\n**!!! Make sure to never commit a .env file as these will contain secret information !!!**\n\n## Running the project\n\nBefore running the project make sure the MongoDB database you configured in the environment file is running.\n\n### Running Locally\n\nTo run the API locally you can use `npm run start:dev`. \n\nThis launches the API server on port 8888 and uses the file `src/config/.env.development` to set the environment. Either create one following the template or change the location in the `package.json`\n\n## Clients\n\nFor a client implementation check out [spoti-stats-angular](https://github.com/pedronave/spoti-stats-angular).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedronave%2Fspoti-stats-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedronave%2Fspoti-stats-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedronave%2Fspoti-stats-api/lists"}