GithubHelp home page GithubHelp logo

wavetrophy_server's Introduction

Wavetrophy server


Installation

Download the latest version of Gracili and extract it to the XAMPP htdocs-folder. You need to run the composer installation command once after the extraction to install all required libraries

$ composer install

There are usually many environments that your application is installed (you should not develop on the productive server ;) ). There is a environment configuration file to solve the problem with different configurations and password per environment. You have to rename the config/env.example.php file to config/env.php and fill in your data. If the config/env.php file is not found, the application will look for it in the parent directory (most probably the htdocs folder in your xampp environment). If the env.php file is not found there, the application will throw an Error. You can also define a APP_ENV environment variable and add a <APP_ENV>.php file in the config/ folder to specify public configurations for e.g. your CI Service (NOT PASSWORD OR ANY SECRETS)

Gracili is now successfully installed and ready to work on.

Afterwards you can start your local Apache Server with XAMPP. To visit your Website you have to open http://localhost/<project_directory>/.

Structure

The Gracili Application Template is build on the MVC Design Pattern. All source code should be in the src/ directory.

Folder Content
config/ All files required for the configuration of your application
public/ Static accessible web files (images, css, fonts, etc.)
resources/ Other resources, that should not be public (migrations or translations)
src/ All PHP source code (The App namespace)
src/Controller/ Directory for all Controllers (one pe§r 'page')
src/Datarow/ Classes for the Database sets that are returend and hydrated (one per 'select')
src/Service/ All services for the businesslogic are here. It is recommended to structure it modular
src/Table/ The classes for the database queries (one per 'table')
src/Util/ Helper classes like a validation context.
templates/ The Twig template files
tests/ Directory for tests
temp/ Temporary files (logfiles, cache)

Afterwards you can start your local Apache Server with XAMPP. To visit your Website you have to open http://localhost/<project_directory>/.

Running the tests

Supposing, that you have Apache Ant installed, just run the following command to run all PHPUnit tests

$ ant phpunit

Running the tests with coverage

Run the following command to generate a coverage file in the generated build folder build/logs/clover.xml

$ ant phpunit-coverage

Running single test files

To run just a few tests, not the whole test suite, you can run the following command after you added the @group actual annotation to the test class docblock

$ ant phpunit-actual

The test class doc block to run the test in the actual group must look like this

/**
 * My test class
 * @group actual
 */
class MyTest
{
  // PHPUnit Test here ...
}

Endpoints

TODO - improve documentation The server provides several endpoints to get the data.

  • POST /v1/auth for authentication
  • GET /v1/trophies to get all WAVETROPHY rallies
  • GET /v1/trophies/{wavetrophy_hash} to get all information about the given WAVETROPHY
  • GET /v1/trophies/{wavetrophy_hash}/contacts to get all important contacts of the given WAVETROPHY
  • GET /v1/trophies/{wavetrophy_hash}/events to get all events of a WAVETROPHY
  • GET /v1/trophies/{wavetrophy_hash}/events/{event_hash}/ to get all information about a WAVETROPHY event
  • GET /v1/trophies/{wavetrophy_hash}/groups to get all groups of the given WAVETROPHY
  • GET /v1/trophies/{wavetrophy_hash}/groups/{road_group_hash} to get all information about the given WAVETROPHY group

Built with

License

Copyright 2018

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

wavetrophy_server's People

Contributors

d4rkmindz avatar

Watchers

 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.