Skip to content

Jordilg13/Angular_GinGonic

Repository files navigation

Angular_GinGonic

Fully dockerized online game based on websockets with GinGonic backend and an Angular 8 frontend.
Project developed by Raül, Ethan, Jordi and Iván.


Preview

tag1


Getting started

To get the repo running locally:

  • Clone this repo
  • Install Docker Community Edition
  • docker-compose up --build

untested


Features

Service Features
Register Regular register or login with GitHub or Google
Login Regular login or login with GitHub or Google
Lobby List of public rooms with ability to add more or join a private room
Game Functional tag game based on websockets

Technical Feature Where it works
Authentication Lobby and game requires logged in user with JWT
Docker Entire application is dockerized
Redis Total score of each user is saved in redis
Websocket Whole game works on websockets

Technologies used

  • GinGonic
  • Angular 8
  • Docker
  • MySQL
  • Redis

Other technologies used

  • JWT
  • Bootstrap
  • Toaster
  • Gorm
  • Gocialite

Backend Packages

Name Description
clients Websocket handler
common Database handler and utils functions (JWT GenToken)
game Character model
redis Redis request handler
rooms Rooms handler
social Social login route handler
tokens Tokens.json file with Social APIs, functions to extract from file
users Login, register and overall users handler
Dockerfile Our Go Dockerfile
main.go Main package

Frontend Application Structure

Name Description
e2e Angular generated e2e testing
src Main frontend Angular application
Dockerfile Our Angular Dockerfile
src/app Module folder
src/assets Images and font used
src/environments Constant environment variables
src/app/auth Login and register module
src/app/background Draws the background
src/app/character Draws the characters
src/app/core Core services, interceptors and models
src/app/game Game module
src/app/lobby Lobby module
src/app/logout Logout button component, linked to AuthModule
src/app/scoreboard Draws the scoreboard
src/app/social Social module
src/app/app.module.ts Main app module

Links to used Go packages

TODO

  • Implement Redux
  • User's image on ingame ranking