GameHorizon is a web application designed to help users choose and manage free games. The app allows users to manage their game library, including adding games to personal lists, removing games, and tracking progress across different categories such as "Play Later," "Currently Playing," "Played," and "Completed."
-
User Profile:
- Display the user's avatar and name in all pages.
- Allow users to edit their profile data.
- Users can update or remove their profile picture URL.
- If no profile picture is provided, the app will display the user's initials over a colored background.
-
Game List:
- The homepage shows all available games.
- Users can search for games by title.
- Clicking on a game opens its details page, including information like genre, platform, and system requirements.
-
User Lists:
- Each user has four customizable lists: "Play Later," "Currently Playing," "Played," and "Completed."
- Users can add or remove games from these lists.
- On the game detail page, users can see if a game is already in one of their lists and move the game between lists.
-
Notifications:
- Feedback notifications are shown to the user for every action, such as successfully adding/removing a game, or errors that may occur.
-
Layout:
- The app has a dynamic and intuitive layout.
- Styling is done using Angular Material.
- Custom identity visual suggestions are applied in the UI design.
The app uses a mock JSON API powered by json-server. This API handles user profile management, game search, and game list management. The API allows you to filter data and update user lists. You can set up the backend with the provided db.json file and the following instructions.
-
Install json-server globally if you haven't already:
npm install -g json-server
-
Place your
db.jsonfile (which contains the structure and test data for users and games) in the root of the project. -
Run the JSON server:
json-server --watch db.json --port 3000
-
The API will be available at
http://localhost:3000/.
- GET /profile: Fetches the user's profile data.
- GET /games: Fetches a list of games.
- GET /games/:id: Fetches details of a specific game by ID.
- PUT /profile: Updates the user's profile data.
- POST /profile/lists: Add a game to one of the user's lists.
- DELETE /profile/lists: Remove a game from one of the user's lists.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI, use ng help or go check out the Angular CLI Overview and Command Reference page.
- The user profile includes a name, email, avatar (image URL), and lists (personalized game lists).
- For each game in a user's list, the game's ID and name are stored.
- The
GameAppdesign follows the business logic for managing personalized lists of games and ensuring the user has full control over them, as described in the requirements.
With these updates, your README.md now reflects the additional functionality of the GameApp, and provides detailed information about the setup and the new features added to the app.