{"id":15864468,"url":"https://github.com/benjaminch/app-store","last_synced_at":"2025-04-01T20:45:40.698Z","repository":{"id":57525553,"uuid":"82327719","full_name":"benjaminch/app-store","owner":"benjaminch","description":null,"archived":false,"fork":false,"pushed_at":"2017-03-03T07:24:29.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T13:39:18.156Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/benjaminch.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}},"created_at":"2017-02-17T18:48:31.000Z","updated_at":"2017-02-20T06:45:44.000Z","dependencies_parsed_at":"2022-09-04T11:32:25.087Z","dependency_job_id":null,"html_url":"https://github.com/benjaminch/app-store","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/benjaminch%2Fapp-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminch%2Fapp-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminch%2Fapp-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benjaminch%2Fapp-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benjaminch","download_url":"https://codeload.github.com/benjaminch/app-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709919,"owners_count":20821298,"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":[],"created_at":"2024-10-05T23:01:33.093Z","updated_at":"2025-04-01T20:45:40.674Z","avatar_url":"https://github.com/benjaminch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# App-store application\n\n## Introduction\nThis application is a fake app-store search demo using [Algolia search](https://www.algolia.com/).\n\nIt's composed in two parts:\n- A backend, written in Go\n  * [Sources](https://github.com/BenjaminCh/app-store/tree/master/backend)\n- A frontend using [InfernoJS](https://github.com/infernojs/inferno)\n  * [Sources](https://github.com/BenjaminCh/app-store/tree/master/frontend)\n\n## Table of content\n\n1. **[Install](#install)**\n\n    * [Clone the code](#code)\n    * [Frontend (Yarn)](#frontend)\n    * [Backend (Go)](#backend)\n\n1. **[Quick Start](#quick-start)**\n\n    * [Run Frontend](#run-frontend)\n    * [Run Backend](#run-backend)\n\n1. **[Tests](#tests)**\n\n    * [Tests Frontend](#tests-frontend)\n    * [Tests Backend](#tests-backend)\n\n1. **[Project](#project)**\n\n    * [What has been done so far?](#what-has-been-done)\n    * [What are the next steps?](#next-steps)\n\n\n# Getting Started\n\n## Install\n\n### Code\nGet the code on your machine cloning the repository.\n```\ngit clone https://github.com/BenjaminCh/app-store.git\n```\n\n### Frontend\nWe will use [Yarn](https://yarnpkg.com) to run the frontend code (make sure you have it installed on your machine first).\nGo in the repository (root level) and type the following commands:\n```\ncd frontend\nyarn install\n```\n\n### Backend\nWe will use [Go](https://golang.org/) to run the backend code (make sure you have it installed on your machine first).\nGo in the repository (root level) and type the following commands:\n```\ncd backend\ngo install\n```\nNow, we need to set Algolia's key and index in our configuration.\nWe need to specify it as environnement variable.\nExample on Mac :\n```\nexport APPSTORE_ALGOLIA_APPLICATIONID=[YOUR_APPLICATION_ID]\nexport APPSTORE_ALGOLIA_APIKEY=[YOUR_API_KEY]\n```\nThere is also a way to specify those keys in the config file but for some reason (not found yet), the configuration doesn't seem to be taken into account when specified in the config file.\n```\n{\n   \"version\":\"0.0.1.0\",\n   \"server\":{\n      \"port\":\"5000\"\n   },\n   \"application\":{\n      \"debug\":false\n   },\n   \"algolia\":{\n      \"applicationID\":\"[YOUR_APPLICATION_ID]\",\n      \"apiKey\":\"[YOUR_API_KEY]\",\n      \"indexes\":{\n         \"apps\":\"apps\"\n      }\n   }\n}\n```\n\n## Quick Start\n\n### Run Frontend\nWe use [Yarn](https://yarnpkg.com) to launch locally our app.\nType the following command from the frontend folder:\n```\nyarn start\n```\n\nThe server will start :\n```\n$ yarn start\nyarn start v0.20.3\n$ webpack-dev-server --quiet --config webpack.conf.js --host 0.0.0.0\nProject is running at http://0.0.0.0:8080/\nwebpack output is served from http://localhost:8080/\nContent not from webpack is served from ./\n```\n\nYou can now go to http://localhost:8080/ and play with the app.\n\n### Run Backend\nWe use [Go](https://golang.org/) to launch locally our app.\nType the following command from the backend folder:\n```\ngo run *.go\n```\n\nThe server will start.\n\nYou can now go to http://localhost:8080/ and play with the app.\n\n#### Queries examples\n##### Get an app from its identifier\n```\ncurl -X GET \"http://localhost:8080/api/1/apps/346374311\"\n```\n\nWill produce :\n```\n{\n   \"name\":\"Alaska Airlines\",\n   \"image\":\"http://a1.mzstatic.com/us/r1000/113/Purple/v4/78/29/10/78291078-1abf-e98b-668a-c4b8389c6746/mzl.vpxscteh.175x175-75.jpg\",\n   \"link\":\"http://itunes.apple.com/us/app/alaska-airlines/id356143077?mt=8\",\n   \"category\":\"Travel\",\n   \"rank\":80\n}\n```\n##### Create a new app\n```\ncurl --data '\n{\n    \"name\" : \"WhatTheTVShow\",\n    \"image\" : \"static.whatthetvshow.com:9000/media/snapshots/c4c3021b168ba93572d402e313f0f884_medium.png\",\n    \"link\" : \"http://whatthetvshow.com\",\n    \"Category\" : \"Quiz\",\n    \"rank\" : 223\n}\n' http://localhost:8080/api/1/apps\n```\n\nWill produce an HTTP 200 if object was created and will returns its ID.\n\n##### Delete an app from its identifier\n```\ncurl -X DELETE \"http://localhost:8080/api/1/apps/362950001\"\n```\n\nWill produce an HTTP 200 if ok, an HTTP 404 otherwise.\n\n## Tests\n\n### Tests Frontend\nTests to be added on the frontend.\n\n### Tests Backend\nWe will use [Go](https://golang.org/) to test the backend code (make sure you have it installed on your machine first).\nGo in the repository (root level) and type the following commands:\n```\ncd backend\ngo test ./...\n```\n\n## Project\n\n### What has been done so far?\nThe following things has been done: \n- [x] First backend version handling apps get / create and delete operations via REST \n- [x] First frontend version playing with algolia search\n- [x] Handle image 404 fallback to a default image (for apps that don't have images, or bad links)\n- [x] Allow to reset a query\n- [x] Query string\n- [x] Facets\n- [x] Pagination\n- [x] Ranking (on app ranking desc)\n\n### What are the next steps?\n- [ ] Write frontend unit tests\n- [ ] Setup Travis for continuous testing\n- [ ] Encapsulate Algolia calls in a clean ServiceAPIComponent\n- [ ] Encapsulate Imaginaary (custom image operations) calls in a clean ServiceAPIComponent\n- [ ] Create a new index to be able to set a different custom ranking (for now we have only ranking desc)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminch%2Fapp-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenjaminch%2Fapp-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenjaminch%2Fapp-store/lists"}