Coder Social home page Coder Social logo

5l1v3r1 / hardwhere Goto Github PK

View Code? Open in Web Editor NEW

This project forked from seemoo-lab/hardwhere

0.0 1.0 0.0 784 KB

snipeit-it based asset management app

License: GNU General Public License v3.0

Python 2.37% Rust 12.52% Kotlin 83.15% CSS 0.64% HTML 1.32%

hardwhere's Introduction

HardWhere

SEEMOO Accessories Retrieval System (HardWhere)

App + who-lent-to-whom functions based on [snipe-it]

This repo contains the mobile app, the required snipe-it patches and the "lent-by" backend that works in tandem with [snipe-it]

The backend daemon ist expected to handle all of the example.com/HardWhere/* requests and exposes its own API and webview at this path.

Currently compatible with snipeit v5.4.3

Get it on F-Droid

Building the daemon

install requirements: apt install libssl-dev pkg-config For other distributions see here

Get rustc and run cargo build --release

Log settings for the daemon

The RUST_LOG environment vairable can be set. Examples: RUST_LOG=hardwhere_backend=trace or for the full show RUST_LOG=trace You can also specify it for multiple moduls RUST_LOG=hardwhere_backend=debug,actix_web=trace.

Possible values are trace,debug,info,warn,error

Example apache config for backend

Running the daemon together on the same machine with snipeit. The daemon is expected to be present on /HardWhere for the app.

<VirtualHost *:443>
[...]
  <Location /HardWhere>
      ProxyPass http://127.0.0.1:8000/HardWhere
      ProxyPassReverse http://127.0.0.1:8000/HardWhere
      ProxyPreserveHost On
  </Location>

Structure

  • src/ contains the additional backend, referred to as HardWhere-Backend or daemon, used for
    • indexing who lent to whom
    • providing return/lent APIs for the app, so the index in the backend is updated at the same time
    • regularly making sure the default fieldset is applied to all models that have none
    • providing a webview on https:///HardWhere/ for inspecting lent assets without using the app
  • static/ is part of the HardWhere-Backend, containing templates, CSS icons and other stuff for the webview, it's required to be relative to the daemon application
  • hardwhere.patch contains code applied to snipeit to provide app login via QR code and auto-login from the snipeit menu into the HardWhere-Backend webview
  • app/ contains the sourcecode for the android app
  • res/ app resources

Workflow

You can open this folder as an android App in android studio and in VS Code for the HardWhere-Backend. It is recommended to use VS Code with the rust-analyzer plugin for it.

You can build the app via gradle or in android studio. HardWhere-Backend can be build using cargo build --release, --release being optional.

For the integration with snipeit you'll have to upgrade hardwhere.patch for new snipeit versions.

hardwhere's People

Contributors

0xpr03 avatar poussinou 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.