Skip to content

LutherNavigator/LutherNavigator

Repository files navigation

LutherNavigator

Coverage lines Coverage functions Coverage statements Coverage branches

The Luther Navigator project seeks to provide students a way to share their experiences abroad.

Table of Contents

Prerequisites

Cloning the Project

$ git clone https://github.com/LutherNavigator/LutherNavigator.git

Local Deployment

In order to build and run the application, run the following command:

$ heroku local web

After the local deployment, the built application can be accessed at localhost:3000.

Testing

Several testing packages are used:

For getting more help on running the tests, execute the following:

$ python3 scripts/test.py -h

Database

It is also possible to interface with the MySQL database. In order to achieve this, run:

$ python3 scripts/db.py

Backend

Our backend is divided into routes and services. The routes handle the routing and rendering. Routes will, if necessary, make use of the services. The services make database queries. This is done using the NPM package mysql.

Admin

It is also possible to change administrators from the terminal. In order to get more help, run the following:

$ python3 scripts/admin.py -h

Frontend

No frontend frameworks are used. Everything is kept simple with the only special thing being the NPM package express-handlebars for HTML rendering.

Deployment

The application is deployed to Heroku. It can be found at luthernavigator.com.

Coverage

Coverage numbers are shown above. More detailed coverage report is available at luthernavigator.github.io/coverage/.

Documentation

Packages TypeDoc and typedoc-neo-theme are used for generating the project code documentation. It includes annotations for virtually all of the important functions, classes, declarations, etc. Documentation can be generated by executing npm run document. For viewing the documentation, open the file documentation/index.html.

GitHub Actions

Tests are run automatically on push or pull request. GitHub Actions reports can be accessed here. Documentation also gets generated automatically and gets pushed to docs repo.

Style Guide

The codebase is developed in a style-consistent manner. Black and Prettier are used for formatting Python and CSS/HTML/TypeScript code respectively.

Commands:

  • CSS/HTML/TypeScript: prettier --write --print-width 79
  • Python: black --line-length 79

Variable and Function naming conventions:

  • Python: snake_case
  • TypeScript: camelCase

Import Statements

  • Direct import statements first, followed by from imports
  • Order: Standard Library, Related Third Party, Local (same order for from imports)
  • At each level, separate imports with a newline and sort them alphabetically

License

MIT License