Skip to content

rickschubert/amazonka

 
 

Repository files navigation

Sublime's custom image

Amazonka - archery tournament organizer

Organize tournament with your own categories and settings, add participants and let our app help you track scores and manage the whole event!

Intuitive interface designed for desktop and mobile allows participants to input scores directly via phones or tablets.

Project was developed during Software Engineering classes at AGH University Of Science And Technology

Table of Contents

Functionalities

  • User can view
    • upcoming competitions
    • qualification results
    • schedule and tournament info
  • Organizer can also
    • register and login
    • modify
      • competitions
      • competition details
      • categories and distances
      • participants
      • target assignments
      • competitors scores
  • System will
    • generate target assignments
    • collect and compute scores
    • choose winners
    • help in searching for competitors using historical data

Homepage

image

Competition view

image

Team

Stack

  • Backend
    • Node.js
    • MongoDB
    • Mongoose
    • GraphQL
    • Apollo Server
    • Express
    • jsonwebtoken
  • Frontend
    • React
    • Redux
    • Apollo Client
    • Bootstrap
  • Testing
    • Jest
    • Easy GraphQL Tester
    • React Testing Library
    • MongoDB Memory Server
    • Mockingoose
    • Supertest
    • Selenium
    • Easy GraphQL Load Tester
    • k6

Launch

  1. Clone the repository
    • git clone git@github.com:Darkosz1012/amazonka.git
  2. Install packages for front and back with one simple command
    • npm install
  3. Create .env and fill with you settings:
ACCESS_TOKEN_SECRET = <key for access token authentication, should be generated randomly>
DATABASE_LINK = <mongodb+srv address>
PORT = <port number, 3001 by default and frontend settings should be aligned if set otherwise>
  1. Now you can launch application:
    1. Run backend:
      • npm run
    2. Run frontend:
      • cd front
      • npm start

Testing

Backend unit tests

At the moment there are unit tests mainly for functions and classes implementing complex logic, like authorization or data loaders. Mockingoose allows to mock values returned by Mongoose's functions.

Execution:

  • npm run test-unit

Unit tests backend results

Backend GraphQL tests

These tests verify GraphQL queries according to schema. Useful for validation of required parameters and their types.

Execution:

  • npm run test-graph

GraphQL tests backend results

Backend functional tests

Basic assumption is to test backend functionalities provided via GraphQL API. MongoDB In-Memory Server isolates tests from real database and makes them much faster, additionally allowing to assert DB content. Supertest is responsible for handling HTTP requests and responses. Custom test framework encapsulates logic tied with GraphQL queries and makes tests short, simple and descriptive.

Execution:

  • npm run test-func

image

Backend performance tests

For now performance tests are conducted on dummy database generated with generate_test_database.js (create perf.env like .env beforehand). Easy-graphql-load-tester generates queries for k6 runner, which needs to be installed on your machine separately and can be configured with number of virtual users, test duration and more. Results are presented in command line and dumped to .json files. Queries may be auto-generated from GraphQL schema or custom.

Execution:

  • start performance testing environment:
    • npm run start-perf-env
  • run tests in other terminal:
    • npm run test-perf

image

Frontend unit tests

Unit tests for React components use React Testing Library and Jest for preparing state, executing actions, events and asserting their results.

Execution:

  • npm run test-front

Frontend functional tests

Selenium-based suites of tests for frontend: logging in and out, adding competitions, navigating admin panel etc. It requires Selenium browser plugin and importing test files into it.

Execution:

image

Project status

MVP is completed, although application is far from being finished. Project was handed for assignment on course's completion and graded positively, but requires more work and hopefully will be developed further.

Completed features are listed in Functionalities section.

Features in development:

  • generation and management of eliminations
  • inputting qualification scores by competitors verified with unique access codes
  • personal archer stats

Features planned:

  • generation of result cards for printing
  • preparing tournament summary
  • support for teams and mixed teams

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 93.4%
  • CSS 6.0%
  • Other 0.6%