Giter Club home page Giter Club logo

groot's Introduction

GROOT

Groot is the next generation web application serving the UIUC Chapter of ACM. It is the replacement for liquid which goes defunct 1/1/2016. The groot repo itself is an API Gateway written in Fall of 2015 It provides the following capabilities:

  • Easy registration of services
  • Universal Authentication for the entire application - via an external authentication provided (Atlassian crowd)
  • Proxying API calls
  • Managing inter-service communication

Groot provides a JSON face to any service. When registering as service specify the data encoding and when requesting a resource though groot make the request using json.

RUNNING GROOT

Add the API spec in a new file (ex. todo.go) in the services package

There is a set of proxy api calls defined in the proxy package that will route call to the backend services

AS OF 10/28/15

/**
 *  Pass the http Request from the client and the ResponseWriter it expects
 *  Pass the target url of the backend service (not the url the client called)
 *  Pass the format of the service
 *  Pass a authorization token (optional)
 *  Will call the service and return the result to the client.
 **/
 func GET(w http.ResponseWriter, url string, format string, token string, r *http.Request)
 /**
  *  Pass the http Request from the client and the ResponseWriter it expects
  *  Pass the target url of the backend service (not the url the client called)
  *  Passes the encoded json(only format currently supported) to the service.
  *  Pass a authorization token (optional)
  *  Will call the service and return the result to the client.
  **/
  func POST(w http.ResponseWriter, url string, format string, token string, r *http.Request)
 /**
  *  Pass the http Request from the client and the ResponseWriter it expects
  *  Pass the target url of the backend service (not the url the client called)
  *  Passes the encoded json(only format currently supported) to the service.
  *  Pass a authorization token (optional)
  *  Will call the service and return the result to the client.
  **/
  func PUT(w http.ResponseWriter, url string, format string, token string, r *http.Request)
/**
 *  Pass the http Request from the client and the ResponseWriter it expects
 *  Pass the target url of the backend service (not the url the client called)
 *  Pass a authorization token (optional)
 *  Will call the service and return the result to the client.
 **/
 func DELETE(w http.ResponseWriter, url string, format string, token string, r *http.Request)

All secret data should be kept in a file called config.go in the config directory

Install Dependencies [First time setup]

go get github.com/gorilla/mux

go get github.com/boltdb/bolt

go get github.com/kennygrant/sanitize

go install github.com/gorilla/mux

go install github.com/boltdb/bolt

go install github.com/kennygrant/sanitize

install packages

go install github.com/acm-uiuc/groot/proxy

go install github.com/acm-uiuc/groot/config

go install github.com/acm-uiuc/groot/services

go install github.com/acm-uiuc/groot/security

run the server

go run ./server/*.go

compile the service

go build -o groot [PATH TO GROOT]/server

CLI

groot [-r | --register-client client_name] [-c | --check-registration token] [-u | --unsecured]

-r | --register-client client_name

registers a client, generates a token

-c | --check-registration token

checks if a token is valid and returns name of client

-u | --unsecured

runs groot without the security layer

without args

runs groot with the security layer

License

This project is licensed under the University of Illinois/NCSA Open Source License. For a full copy of this license take a look at the LICENSE file.

When contributing new files to this project, preappend the following header to the file as a comment:

Copyright © 2016, ACM@UIUC

This file is part of the Groot Project.  
 
The Groot Project is open source software, released under the University of Illinois/NCSA Open Source License. 
You should have received a copy of this license in a file with the distribution.

groot's People

Contributors

aashishkapur avatar bcongdon avatar modi95 avatar narendasan avatar perilynn avatar sameetandpotatoes avatar theishshah 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.