Skip to content

Commit

Permalink
update readme (finally :))
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoerlitz committed May 20, 2024
1 parent 9410c28 commit dd70f1a
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
# Trainingcenter-Frontend
# Trainingcenter

The trainingcenter-frontend project contains the frontend code for the VATSIM Germany ATC Training Center. Built using React, this project focuses on providing an interactive user interface for both trainees and mentors alike. Data is exchanged with the underlying SQL database using the Express.js based [trainingcenter-backend](https://github.com/vatger/trainingcenter-backend) project.
The trainingcenter project contains the code for the VATSIM Germany ATC Training Center.

Built using React & Express.js, this project focuses on providing an interactive user interface for both trainees and mentors alike.

## Contact

| Name | Responsible for | Contact |
|:------------:|:---------------:|:-------------------------------------------------:|
| Nikolas G. - 1373921 | * | `[email protected]` |
| Name | Responsible for | Contact |
|:--------------------:|:---------------:|:---------------:|
| Nikolas G. - 1373921 | * | `[email protected]` |

## Prerequisites
- **Node.js** (https://nodejs.org/en)
- **Node.js** (https://nodejs.org/en) - (`>= 9.8.1`, other versions may work, but are not guaranteed)
- **SQL Server** (e.g. https://mariadb.org/)

## Running the Application

1. Run `npm install`
4. Run `npm run dev`
Firstly, you will need to install the required packages by running `npm install` (we will likely switch to bun or pnpm in the future though...).

You will also need to have an SQL Database (MariaDB for example) setup and running. Configure the `.env` file located within the `./backend` directory to reflect your local environment.
You can use the `.env.example` file located in the same directory as a starting point.

### First Run
During the first run, you will likely want to both migrate and seed the database. For this, use the following commands (whilst in the root directory):
1. `npm run seq db:migrate`
2. `npm run seq db:seed:all` (optionally for only a specific seeder: `npm run seq db:seed -- --seed ./path/to/seeder.js`)

### Starting the Frontend & Backend

1. To run the Frontend: Run `npm run frontend:dev`
2. To run the Backend: Run `npm run backend:dev`

## Note to Webstorm users
Due to Webstorm's opinion-ness, throwing within a try block - and hence catching the exception locally is discouraged.
We believe that this flow makes the code more consistent and therefore more readable. This is as usual, however, a personal opinion.

To disable this behaviour, head to: `Settings | Editor | Inspections` and turn off: `JavaScript and TypeScript > Try statement issues > Exception used for local control-flow`.

0 comments on commit dd70f1a

Please sign in to comment.