GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lightwindy/backend: Backend for Roam (The Game). Python2.7, Flask, Redis, Postgres and Docker.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

49 Commits
49 Commits

Folders and files

NameName
Last commit message
Last commit date
db
db
 
 
services
services
 
 
utils
utils
 
 
.env_sample
.env_sample
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
decorators.py
decorators.py
 
 
docker-compose.yml
docker-compose.yml
 
 
requirements.txt
requirements.txt
 
 
route.py
route.py
 
 

Repository files navigation

🚨 💻 🚨

Roam (Backend)

An augmented reality game set in a futuristic post-apocalyptic world. Battle your enemies, team up with your friends, scavenge for inventory items and conquer bosses!

Purpose

Our backend server is in charge of data storage, GeoJSON location-based polygon shape generation, AI-based generation of items and bosses, user authentication, live multiplayer tallying (both of scores and positions), weather checkup (to augment game environment) and other sorts of stuff. Of course, this is all accessible both as a RESTful API and as a realtime websocket-based interface!

TechStack

We used the following technology stack for our game:

  • 🛄 Redis - quick in-memory key-value store for storing user location
  • 🛄 Postgres - good ol' relational database to store good ol' relational data. We'll also be using the Postgres PostGIS
  • 🐍 Python - backend application server language of choice
  • 🐳 Docker - for containerizing our backend application

As we're using Docker, our backend is completely portable! Just make sure to have Docker and Docker-Compose installed and run docker-compose up!

API Routes

  • POST /signup

    • Request Body: {username:string, password:string, class_id:int}
    • Response: {status:int, message:"success"|"failure"}
  • POST /login

    • Request Body: {username:string, password:string}
    • Response: {jwt_token:string}
  • GET /user/me/account

    • Request Header: User's JWT Token
    • Response:
    {
        username: string, 
        hp: int, 
        xp: int, 
        inventory: [{
          id: int, quantity: int, 
          name: string, description: string 
        }]
    }
    
  • POST /user/me/account

    • Request Header: User's JWT Token
    • Request Body
    {
        username: string, 
        hp: int, 
        xp: int, 
        inventory: [{
          id: int, quantity: int
        }]
    }
    
  • POST /maprender

    • Request Header: User's JWT Token
    • Request Body:
    {
        x:int, 
        y:int, 
        {
          latitude: float, 
          longitude:float
        }
    }
    
    • Response:
    {
       image_url: string, 
       weather: "sunny"|"rainy"|"cloudy", 
       render_objects:[
          {
           type: "player"|"ai"|"marker"|"item", 
           description: string, 
           latitude: float,
           longitude: float,
           ...
          }
        ]
    }
    
  • GET /items

    • Response: items_schema as JSON
  • GET /experiences

    • Response: experiences_schema as JSON

Database Schema

The schema of the data, as represented in Postgres

  • classes - id:int, name:varchar, description:text
  • items - id:int, name:varchar, description:text
  • ais - id:int, name:varchar, description:text
  • experiences - id:int, name:varchar, description:text, xp:int
  • users - id:int, username:varchar, password:varchar, class_id:int, created_at:timestamp, xp:int, hp:int
  • users_items - user_id:int, item_id:int, quantity:int
  • users_experiences - user_id:int, experience_id:string

About

Backend for Roam (The Game). Python2.7, Flask, Redis, Postgres and Docker.

devpost.com/software/roam-qkjl4v

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.