PlayDex is a website that tries to group all video game patch notes in a normalized manner. Follow your favorite games to get the patch notes as soon as they release. (Projet pour examen Concepteur Développeur d'applications)
The fastest way to run the whole stack (frontend + backend + MySQL database) is with Docker. You only need Docker Desktop installed.
-
Make sure the backend
.envexists with your API keys (Steam / Twitch / IGDB). See the "Set Up Environment Variables" step in the Backend Installation section below. -
Build and start everything from the project root:
docker compose up --build
On the first run this will download the images and install dependencies, so it can take a few minutes. On startup the backend automatically:
- runs the database migrations (creates the tables),
- loads the fixtures (demo data).
-
Access the app:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api
-
Stop everything:
docker compose down
Add
-v(docker compose down -v) to also delete the database volume and start fresh next time.
Note: the fixtures are reloaded on every startup, which resets the database. This is convenient for development but means data entered between two runs is lost.
The sections below describe the manual (non-Docker) installation.
Follow these steps to set up the frontend:
-
Install Dependencies:
- Navigate to the frontend directory:
cd frontend - Install the required dependencies:
npm install
- Navigate to the frontend directory:
-
Run the Development Server:
- Start the Next.js development server:
npm run dev
- Start the Next.js development server:
-
Build for Production (optional):
- To create an optimized production build:
npm run build
- Start the production server:
npm start
- To create an optimized production build:
Your frontend is now ready to use!
Follow these steps to set up the backend:
-
Get Your API Keys:
-
Set Up Environment Variables:
- Create a
.envfile in the root of your project. - Add the following variables to the
.envfile:STEAM_API_KEY=your_steam_api_key TWITCH_CLIENT_ID=your_twitch_client_id IGDB_ACCESS_TOKEN=your_igdb_access_token DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name # Steam account used by the patch note poller (see "Steam Patch Note Polling" below). # This is a real Steam LOGIN (username + password) — NOT the STEAM_API_KEY above. STEAM_USERNAME=your_steam_bot_username STEAM_PASSWORD=your_steam_bot_password
- Create a
-
Launch Your SQL Database:
- Start your SQL database server.
- Ensure the database user and name match the credentials in the
DATABASE_URLvariable.
-
Install Dependencies:
- Make sure to decomment
;extension=sodiumin your php config file - Run the following command to install PHP dependencies:
composer install
- Make sure to decomment
-
Set Up the Database:
- Create the database:
php bin/console doctrine:database:create
- Run migrations:
php bin/console doctrine:migrations:migrate
- Create the database:
-
Fill the database:
-
With your database created, you now need to launch the command to fill the database with IGDB's API data
php bin/console app:get-igdb-data
-
-
Generate JWT Tokens:
- Create a private key:
openssl genrsa -out backend/config/jwt/private.pem -aes256 4096
- Create a public key:
openssl rsa -pubout -in backend/config/jwt/private.pem -out backend/config/jwt/public.pem
- Create a private key:
-
Launch the scheduler:
To get the games automatically, you can launch the SYmfony scheduler that will launch the get-igdb-data command every day at midnight UTC:
-
cd backend/ php bin/console scheduler:start
-
Your backend is now ready to use!
Besides the IGDB catalog import, PlayDex can automatically collect patch notes published on Steam. It works in two layers:
- a small Node.js poller (
backend/scripts/steam-poller/) that logs into Steam, detects recently updated apps and fetches their community "update" events; - the Symfony command
app:poll-steam-patchnotes, which runs that poller, de-duplicates the results and stores the new patch notes in the database (attributed to an auto-createdSteamBotuser).
-
Node.js must be installed on the machine running the backend — the PHP command shells out to
node. -
Install the poller's dependencies (separate from the main project's dependencies):
cd backend/scripts/steam-poller npm install -
Set the Steam account credentials in
backend/.env(see step 2 of the Backend Installation):STEAM_USERNAME=your_steam_bot_username STEAM_PASSWORD=your_steam_bot_password
⚠️ Use a dedicated Steam account ("bot" account), not your personal one.These are the Steam login credentials, which are different from
STEAM_API_KEY(that key is used for other Steam Web API calls, not for the poller).
A new Steam account has Steam Guard (2FA) enabled, so the very first login needs the code Steam emails you. Do it once, interactively, with the dedicated script:
cd backend/scripts/steam-poller
node firstLogin.jsIt reads the credentials from backend/.env, prompts for the Steam Guard code (check your email), and on success saves a device token in backend/var/steam-user/. After that, Steam no longer asks for a code on this machine — so the automated command below runs headlessly.
In production (Docker) — the backend image already ships Node.js and the poller's dependencies, and var/steam-user/ is mounted as the steam_data volume (see docker-compose-prod.yml), so the device token survives redeployments. Do the one-time login on the server, inside the running container:
docker compose exec -it backend node scripts/steam-poller/firstLogin.jsEnter the emailed Steam Guard code once; the token is saved in the steam_data volume, and every scheduled poll afterwards runs headlessly (no code, no terminal needed).
Once the device token is saved, the Symfony command logs in without any code:
cd backend
php bin/console app:poll-steam-patchnotesThe command reports how many patch notes and games were created or skipped. Already-seen updates are skipped (cached for ~20 minutes and de-duplicated against the database), so the command is idempotent — running it repeatedly is safe.
Unlike the IGDB import — which is scheduled to run daily at midnight UTC by the Symfony scheduler (see step 8 above) — the Steam poller is not scheduled automatically. To run it regularly, either:
-
add it to the Symfony scheduler (a
#[AsCronTask]attribute on the command, or a recurring message insrc/Schedule.php), or -
call it from a system cron, for example every 15 minutes:
*/15 * * * * cd /path/to/backend && php bin/console app:poll-steam-patchnotes >> var/log/steam-poll.log 2>&1