Code Monkey home page Code Monkey logo

esof-423-belgrade-senior-center's Introduction

Belgrade Senior Center

Build Status Build Status

GitHub GitHub tag (latest SemVer)

Developer Documentation

To obtain the source code for the Belgrade Senior Center Website, developers should clone the repo here. The master branch contains the source code for the current release, the development branch is the bleeding edge.

Tools and technologies

This is a non-exhaustive list of the tools and technologies we are using.

Directory Layout

  • The firebase_rulesets directory contains the rulesets that the database, storage, and hosting system (Firebase) will abide by.

  • The functions directory contains the backend serverless-functions for the application.

  • The lib directory holds all of the main Dart source code for the project. This directory contains the following subdirectories:

    • components contains the different rendering components of the application. This ranges from the full page containers, to each reusable component, such as the navbar or the footer.
    • firebase contains the classes that directly interact with the database, and references to the storage appliance.
    • middleware contains Redux middlewares, which are used to intercept pending state changes and perform things
    • model contains immutable models of the datatypes in the app.
    • state contains all Redux state and actions for the app.
  • The web directory contains the static assets for the project, and the entrypoint for the Dart Transpiler.

  • The test directory contains the files used for testing the Dart source code.

  • THe sass directory will eventually contain any custom styling for the project.

UML Diagrams

Final:

Class Diagram

Older Versions

Feature Complete:

Class Diagram

First:

Class Diagram

Directions for Building from Source Code

  • Download and install Dart to build the website. Follow the setup instructions for Dart here.

  • Once Dart is installed, install webdev:

      pub global activate webdev

    Add the pub cache to your path:

      export PATH="$PATH":"$HOME/.pub-cache/bin"
    
  • Now navigate to the repository within a terminal window, and use the command make. This will print out all avalible commands and their functions:

    build-js                       build to minified, release js
    firebase-serve                 Serves built JS files locally
    format                         Format the dart files
    install                        Runs pub get to get dependencies
    serve                          Serves the frontend app with ddevc

    To run locally, type make serve. This will serve Just-in-time compiled dart code in javascipt, and automatically recompile for codechanges. to build the real, minified production javascript, run make firebase-serve. This will also run the Firebase Cloud Functions locally. This must be reran to regenerate.

Directions for Testing Source Code

  • To run Dart tests, run make unit-test.
  • To run functional js tests for the firebase serverless functions:
    • Navigate to test/functional
    • run npm install in the functions directory
    • run npm run test.

Directions for Accessing test coverage

In Dart 2, generating coverage is surprisingly difficult for Chrome platform tests. As such, generating an LCOV report is not possible. However, viewing coverage is possible.

  1. First, run make serve Coverage Panel

  2. Once the application is serving, navigate your browser to http://localhost:8081. You will now see links to all tests: Test Links

  3. Next, open your browser's developer console When you want to see logged messages or run JavaScript, press Command+Option+J (Mac) or Control+Shift+J (Windows, Linux, Chrome OS) to jump straight into the Console panel.

  4. Switch to the sources page, and select the lower burger menu, then the coverage option Coverage Panel

  5. Now, select the record button Coverage Panel

  6. Select a test link. You will see in the console that these test passed after a short delay Tests Passed

  7. From here, selecting the source-mapped file which was tested will show coverage on the left sidebar for the file. In this example, the path would be the following in the sources panel top/localhost:8081/packages/bsc/src/state/app.dart path

  8. Once this file has been opened, the coverage will applied by the Chrome sourcemapper automatically (since Dart is transpiled to Javascript) and will be visible in the file explorer! path

It's also possible to view the raw, unmapped coverage data by looking under the coverage tab, if necessary.

For example reports of test coverage, click here. These are not necessarily up to date.

Issue Links Documenting Dart 2.x Coverage Bugs

Here are the links to the various google issues related to the issues with coverage collection in Dart 2.x:

Setting up Automated Weekly Build and Test

The automated build system is run on Travis CI. All commits get tested, and the suite runs against master once a day. This is configured in the .travis.yml file in the root of the repository. Functional tests also get run on each push to development checking that the build files are correct and login requirements are enforced.

Releasing New Versions

Whenever a commit is pushed to master, the project is automatically built and deployed using Travis CI. This will only happen on tags, or scheduled daily/weekly builds.

Manual deploys are possible using firebase deploy, but proper credentials and environment variables must be set. Therefore, local deploys are nontrivial and should be avoided.

Accessing bug list

  • Issues are on the remote repository stored on this GitHub page. As bugs or progression steps are found they are added to the issues tab and assigned a user to focus attention on the task.

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.