This is the backend service for the Videogame Hub App, built with Spring Boot and MySQL. It provides RESTful APIs for managing a personal video game collection and fetching gaming news from an external API.
- Provides APIs for:
- Handling CRUD operations for video games.
- Fetching gaming news from an external API.
- Persistent data storage using MySQL.
- Designed to integrate with the Vue.js frontend, where user authentication and management are handled.
- Backend Framework: Spring Boot
- Database: MySQL
- RESTful APIs: JSON-based endpoints
- External Services: Gaming news API
Integration with the Frontend
The backend is designed to work with the Vue.js frontend located at: See videogame-hub-frontend repo
The login and authentication are handled on the frontend (using Vue.js). No Spring Security or JWT implementation is used in this project.
-
Backend (Spring Boot):
- Java 17 or higher
- Maven
- MySQL 8 or higher
-
Frontend (Vue.js):
- Node.js 16 or higher
- npm (included with Node.js)
-
Database:
- MySQL installed and configured.
Set up the Database
- Navigate to the
src/main/resources/db
directory in the backend project. - Use the following command to load the database schema into MySQL:
mysql -u <username> -p < src/main/resources/db/schema.sql
Configure the application.properties
file:
- Edit the
application.properties
file with your credentials:spring.datasource.username=your_username spring.datasource.password=your_password
-
(Optional) Configure environment variables Instead of editing the
application.properties
file, you can configure the credentials as global environment variables. -
Start the backend: Run the server:
mvn spring-boot:run
-
Navigate to the videogames directory.
-
Install the dependencies:
npm install
-
Run dev server:
npm run dev