The Luther Navigator project seeks to provide students a way to share their experiences abroad.
- Prerequisites
- Cloning the Project
- Local Deployment
- Testing
- Database
- Backend
- Admin
- Frontend
- Deployment
- Coverage
- Documentation
- GitHub Actions
- Style Guide
- License
- Node.js 12.19.0 and NPM 6.13.4
- Python 3.6+
- The Heroku Command Line Interface.
- MySQL
- TypeScript 4.0.3
- HTML 5, CSS 3 (+ Bootstrap), JavaScript (ES6)
$ git clone https://github.com/LutherNavigator/LutherNavigator.gitIn order to build and run the application, run the following command:
$ heroku local webAfter the local deployment, the built application can be accessed at localhost:3000.
Several testing packages are used:
- Jest for backend testing
- Playwright for frontend testing
For getting more help on running the tests, execute the following:
$ python3 scripts/test.py -hIt is also possible to interface with the MySQL database. In order to achieve this, run:
$ python3 scripts/db.pyOur 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.
It is also possible to change administrators from the terminal. In order to get more help, run the following:
$ python3 scripts/admin.py -hNo frontend frameworks are used. Everything is kept simple with the only special thing being the NPM package express-handlebars for HTML rendering.
The application is deployed to Heroku. It can be found at luthernavigator.com.
Coverage numbers are shown above. More detailed coverage report is available at luthernavigator.github.io/coverage/.
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.
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.
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
importstatements first, followed byfromimports - Order: Standard Library, Related Third Party, Local (same order for
fromimports) - At each level, separate imports with a newline and sort them alphabetically