Skip to content

Peshmay/Game-Time-Tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Game Tracker

Backend Tests

A full-stack TypeScript application for tracking game play sessions, visualizing playtime statistics, and managing users through an admin dashboard.

The project demonstrates REST API design, authentication, database modeling, automated testing, and CI pipelines.

Screenshots

Login Page

Login Page

Users

Users

Play Game

Play Page

Timer Page

Timer Page

Statistics

Statistics

Admin Login

Admin Login

Admin Dashboard

Admin Dashboard

Admin Users

Admin Users

Register page

Register page

API Documentation (Swagger)

Swagger UI: http://localhost:4000/api-docs

CI Pipeline

CI

Key Features

User Features

  • Start and stop game sessions
  • Track playtime per game
  • View personal statistics and playtime insights
  • Weekly activity charts
  • Leaderboard rankings
  • Weather widget powered by OpenWeatherMap

Admin Features

  • View and manage all users
  • Create new users
  • Delete users
  • Upload user avatars
  • View detailed user statistics

Architecture

The application follows a full-stack client–server architecture.

Frontend (React)

  • User interface for gameplay tracking and dashboards
  • Firebase authentication for secure login
  • Game session tracking UI
  • Data visualization using Recharts

Backend (Express API)

  • REST API for users, games, sessions, and statistics
  • Authentication middleware
  • Request validation using Zod
  • Logging with Winston
  • File uploads handled with Multer

Database

  • PostgreSQL database
  • Prisma ORM for database modeling and queries

Testing & Continuous Integration

  • Backend testing with Jest and Supertest
  • Automated CI pipeline using GitHub Actions

Tech Stack

Frontend

  • React
  • TypeScript
  • Vite
  • Tailwind CSS
  • Recharts
  • Firebase Authentication

Backend

  • Node.js
  • Express
  • TypeScript
  • Prisma ORM
  • Zod (validation)
  • Multer (file uploads)
  • Winston (logging)

Database

  • PostgreSQL

Testing & CI

  • Jest
  • Supertest
  • GitHub Actions

API Documentation

Interactive Swagger documentation is available at: http://localhost:4000/api-docs

Testing

Backend tests are written using Jest and Supertest and are automatically executed through the CI pipeline.

Run tests locally:

cd backend
npm test

Run tests with coverage:

npm run test:coverage

Project Purpose

This project was built to demonstrate:

  • Full-stack TypeScript development
  • REST API design and architecture
  • Authentication using Firebase
  • Database modeling with Prisma
  • Automated backend testing
  • CI pipelines with GitHub Actions

About

Creating an application where users can play games and keep track of the time they played each game and get statistics of how much they played each game and compare it with others.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors