Giter Site home page Giter Site logo

bribe_server's Introduction

Online Tic-Tac-Toe "BRIBE" Server

Overview

This demo project is the backend server for a two-player online Tic-Tac-Toe web app "BRIBE". I implemented a registration-free matching system using JWT tokens and invitation URLs. In addition to that, "bribe" system makes this game definitely funnier than conventional tic-tac-toe!

Built with natural language

As a complete beginner with no prior programming experience, I started this project after just a basic tutorial in Go. With the help of ChatGPT, I managed to build this server using natural language processing. Although the project has a strong element of being a joke app, I took serious steps to ensure the gameplay process was enjoyable and implemented real-time battle through WebSocket communication. This project allowed me to learn basic development procedures, and I look forward to creating more enjoyable and beneficial projects in the future.

Features

  • Bribe System: You can give a bribe or accuse unfair judge!
  • Token-based Authentication: Securely manage user sessions and game states using JWT.
  • Invitation Link System: Allows users to join games without needing to register, just by clicking a link.

Technologies and Libraries

Important Libraries Used:

  • Logging: go.uber.org/zap
  • ORM: gorm.io/gorm
  • Real-time Communication: github.com/gorilla/websocket
  • Token Management: github.com/dgrijalva/jwt-go

Directories

  • main.go
  • auth/ (Validation of JWT)
  • bribe/
    • actions/ (Handle client's actions)
    • broadcast/ (Broadcast game state to clients)
    • connection/ (Manage game instances and websocket connections)
    • database/ (Manage Session ID with Redis)
  • handlers/ (Handlers of screen state and websocket connections)
  • middleware/ (Manage JWT)
  • models/
  • screens/ (Handle HTTP requests )
  • utils/ (Initialization of Cron and Logger)

Future Prospects

The frontend of this web app is currently being developed as a Flutter web application. The goal for this phase was to ensure that all features function correctly.

bribe_server's People

Contributors

abehiroto avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.