Currently lives at http://game-rocket-frontend.vercel.app
Note: Your browser probably enables https by default, which is not currently supported by this project's stack. You may have to disable https for the requests to the backend API to function properly. HTTPS support is on its way, don't worry.
A crowdsourced recommendation algorithm for video games using natural language processing (i.e., sentiment analysis and word2vec topic modeling) to recommend games based on a variety of common game descriptors. This repo is a frontend web application which speaks to the backend recommender API to allow for non-programmers to access its recommendations more easily.
Although I plan to host this site at a permanent domain in the near future, here are some screenshots detailing the general layout:
Users input their preferences using two dropdown boxes, and two checkboxes. When they click the, "Find Reviews" button, the application makes a POST request to the Game Rocket /recommend/ endpoint built using Rust (Diesel and Rocket) and PostgreSQL (see https://github.com/GoatedChopin/game_rocket for more details).
As you should be able to see, each review corresponds to a score (in the top left pink bubbles, higher is better), and has a steam icon which links to the Steam store page for the game in question. Some links don't work properly, but that's due to Steam moving Game ID's around, which is bad database management, in my opinion. Of course, Steam's parent company, Valve, is worth 7.7 billion dollars at time of writing, so they probably don't need to be listening to me.
The details below are for ease of use in testing and deploying. Cheers!
Install the dependencies...
cd svelte-app
npm install...then start Rollup:
npm run devNavigate to localhost:8080. You should see your app running. Edit a component file in src, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv commands in package.json to include the option --host 0.0.0.0.
If you're using Visual Studio Code we recommend installing the official extension Svelte for VS Code. If you are using other editors you may need to install a plugin in order to get syntax highlighting and intellisense.
To create an optimised version of the app:
npm run buildYou can run the newly built app with npm run start. This uses sirv, which is included in your package.json's dependencies so that the app will work when you deploy to platforms like Heroku.
By default, sirv will only respond to requests that match files in public. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere.
If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for any path. You can make it so by editing the "start" command in package.json:
"start": "sirv public --single"This template comes with a script to set up a TypeScript development environment, you can run it immediately after cloning the template with:
node scripts/setupTypeScript.jsOr remove the script via:
rm scripts/setupTypeScript.jsIf you want to use baseUrl or path aliases within your tsconfig, you need to set up @rollup/plugin-alias to tell Rollup to resolve the aliases. For more info, see this StackOverflow question.
With Vercel
Install vercel if you haven't already:
npm install -g vercelThen, from within your project folder:
cd public
vercel deploy --name my-projectWith surge
Install surge if you haven't already:
npm install -g surgeThen, from within your project folder:
npm run build
surge public my-project.surge.sh
