Giter Site home page Giter Site logo

brass-backend's Introduction

project brass backend

Simple ctf-like platform for irl treasure hunt. (don't let my friend know I'm planning his surprise birthday party)

about

purpose

Small project made for a friends surpise birthday party. Project was limited in scope and only meant to be used a single day by a single user, so few resources were invested in architecture, robustness and security.

solution

In order to keep costs down and rapidly iterate without having to deal with setting up servers and stuff, the project was built on the Google Cloud Platform (gcp)

The following is a simple backend that serves as a thin layer between gcp data and the frontend (WIP) running on gcp app engine.

The API allows for basic read and modify operation on the task entity, which represents a task the birthdayboitm has to complete. On each of the IRL checkpoints, the birthdayboitm has to complete a task, and is awarded with a solution string that is inputet via the frontend. When the correct solution string is provided, the task is marked as solved and the birthdayboitm can move on to the next task.

usage

run for local development

export gcp credentials

export GOOGLE_APPLICATION_CREDENTIALS="[path to credentials file]"

install dependencies

pip install -r requirements.txt

run project on local machine:

python main.py

deploy to google cloud platform

gcloud app deploy

API documentation

get a specified task.

GET /task/<task_number>

update specified task.

patch /task/<task_number>

This endpoint takes in form data. If the form data contains a the field reset (with any value), the task is reset to unsolved without checking the answer string.

If not, the field answer is compared with the solution. Returns 200 on correct answer string and 400 on incorrect answer string.

list all tasks

GET /task/

Returns a list of all tasks, sorted by natural order.

reset all tasks

PATCH /task/

Resets all tasks to unsolved

brass-backend's People

Contributors

smailund avatar

Watchers

James Cloos avatar  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.