Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First Release #44

Merged
merged 783 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
783 commits
Select commit Hold shift + click to select a range
1d5e61f
#90: Adjusted Logging in track-service a little bit
Sep 4, 2023
d31b13c
Merge branch 'development' into 91-mutating-array-functions-are-not-m…
Sep 4, 2023
99e6ba3
Merge branch 'development' into 90-implement-logging-in-services
Sep 4, 2023
c71ac28
Merge pull request #115 from kieler/91-mutating-array-functions-are-n…
Kebslock Sep 4, 2023
069fbc5
Merge branch 'development' into 90-implement-logging-in-services
Sep 4, 2023
9c47d5e
Merge pull request #119 from kieler/90-implement-logging-in-services
Kebslock Sep 4, 2023
fa2895c
Fixed init route
Sep 4, 2023
3046718
Reordered methods in vehicle.route.ts
Sep 4, 2023
f087d81
Tiny adjustment to remove eslint violations
Sep 4, 2023
e94fb77
Added more a more specific exception to the fetcher
n1kPLV Sep 2, 2023
69bd4a2
Started refactoring
n1kPLV Sep 2, 2023
14975f0
Some error handling
n1kPLV Sep 3, 2023
3b886ab
Further refactorings and UI improvements
n1kPLV Sep 3, 2023
db4629c
Hotfix for updating/deleting things with id 0
n1kPLV Sep 4, 2023
241db7d
#109: Refactor position computation and adjust time intervals
Sep 5, 2023
35ec563
Add README
NicoBiernat Sep 5, 2023
d8d37d9
Fix eslint errors
NicoBiernat Sep 5, 2023
7442222
Merge branch 'development' into 109-adjust-time-interval-for-position…
Sep 5, 2023
58b4627
Merge branch 'development' of github.com:kieler/RailTrail into 64-bac…
Niatsuna Sep 5, 2023
d857122
#65 install zod
JulianGrabitzky Sep 5, 2023
45ffd7c
#65 Create and test UpdateTrack schema
JulianGrabitzky Sep 5, 2023
237748f
Merge pull request #112 from kieler/64-backend-refining-database-conn…
Niatsuna Sep 5, 2023
6e38d96
added pydantic for validating backups
n1kPLV Sep 5, 2023
6754164
Merge branch 'development' into 109-adjust-time-interval-for-position…
Sep 5, 2023
bb239fb
Exclude Prisma directory
Niatsuna Sep 5, 2023
6cbd049
Add database seeding
Niatsuna Sep 5, 2023
1d92178
#129 Add first draft for multi-stage builds
JulianGrabitzky Sep 5, 2023
7aebb5f
#109: Added fallback solution, where it was not used yet
Sep 5, 2023
3f09cee
further refactoring
n1kPLV Sep 5, 2023
ea77b16
#109: Using vehicle speed computation for all position computations
Sep 5, 2023
a328b5f
Change inital region
jge-cap3 Sep 6, 2023
f6d357a
Fix bottom layout to avoid blocking clicks
jge-cap3 Sep 6, 2023
cae8ed5
fixed infinite spinning on standalone track select
n1kPLV Sep 6, 2023
a801102
Merge pull request #117 from kieler/116-error-handling-in-management
n1kPLV Sep 6, 2023
e304184
Preparations for tracker status display.
n1kPLV Sep 2, 2023
866ffe5
provide last known battery charge for each tracker
n1kPLV Sep 4, 2023
fa61be8
display tracker batery information (if known)
n1kPLV Sep 4, 2023
616a5fa
Small dark mode improvements
n1kPLV Sep 4, 2023
890b407
Also provide vehicle speed on request
n1kPLV Sep 6, 2023
adeb32b
Add display of vehicle speed
n1kPLV Sep 6, 2023
f608493
Merge pull request #124 from kieler/109-adjust-time-interval-for-posi…
Kebslock Sep 6, 2023
92e2d0d
Re-enable the default express exception handler
n1kPLV Sep 7, 2023
2585101
#114: Replaced getNearbyVehicles
Sep 7, 2023
9ea016d
Revert "#114: Replaced getNearbyVehicles"
Sep 7, 2023
8d06ad0
#114: Replaced getNearbyVehicles
Sep 7, 2023
b210ca9
added error handling concept
Sep 7, 2023
998ee3e
Merge branch 'development' into 120-prisma-error-handling
Sep 7, 2023
82f8c59
improved error handling
Sep 7, 2023
d092441
Merge pull request #140 from kieler/114-remove-getnearbypois-vehicles
JulianGrabitzky Sep 7, 2023
a3f1088
#133: Add conversion to percentage to track service
Sep 7, 2023
f67fd7b
#133: Replace getVehicleTrackDistancePercentage
Sep 7, 2023
bac391e
#133: Replaced getVehicleTrackDistanceKm
Sep 7, 2023
50f1cd6
Merge pull request #142 from kieler/133-remove-getvehicletrackdistanc…
Kebslock Sep 8, 2023
fc4dad3
Merge pull request #122 from kieler/tracker-components
n1kPLV Sep 8, 2023
1ba2672
Updated package-lock
n1kPLV Sep 10, 2023
c093565
Restructured login process.
n1kPLV Sep 10, 2023
ca1e574
Improved null check of percentagePositions
Sep 10, 2023
cceed95
Improved null check of all occurrences of null checks with the ! oper…
Sep 10, 2023
4544871
little refactoring for services
Sep 10, 2023
3b58c14
some refactoring to get rid of unsafe usages of the exclamation mark …
Sep 10, 2023
b4ce2df
removed unused imports from server.ts
Sep 10, 2023
6c9e292
Added Management of other users
n1kPLV Sep 10, 2023
c443c4d
Made user deletion mechanism useful again
Sep 10, 2023
84ccaf1
Merge pull request #145 from kieler/144-delete-other-users
n1kPLV Sep 11, 2023
8d8aefa
Added requested changes from review
Sep 11, 2023
95cb2d4
Merge pull request #143 from kieler/101-pois-percentage-position
n1kPLV Sep 11, 2023
76f4448
Added Management for the current user
n1kPLV Sep 11, 2023
1c70b49
Some final refactoring
n1kPLV Sep 11, 2023
1ea24f7
Merge branch 'development' into 137-frontend-user-management
n1kPLV Sep 11, 2023
6870b4b
#139: Enforcing order of computation for less redundancy
Sep 11, 2023
8714b3a
Fixed last known vehicle position
Sep 11, 2023
9097d3e
Merge branch 'development' into 139-backend-remove-redundant-calculat…
Sep 11, 2023
b9b2198
Merge pull request #146 from kieler/137-frontend-user-management
n1kPLV Sep 11, 2023
8e5c256
Refactored map components
n1kPLV Sep 11, 2023
341b255
Focus map on track at start and zoom to fit track
n1kPLV Sep 11, 2023
33b9f2a
Replaced redundant fetch functions
n1kPLV Sep 11, 2023
c38cb2f
Added side-by-side map and list view
n1kPLV Sep 11, 2023
cc60849
Translated more text into german
n1kPLV Sep 11, 2023
33ebcb4
Handle long vehicle lists in advanced UI
n1kPLV Sep 11, 2023
14cdfb7
Removed some debug logging
n1kPLV Sep 12, 2023
a10da1d
Fixed client exception occurring and implemented suggested changes fr…
n1kPLV Sep 12, 2023
fb62d9d
#65 add zod schemas
JulianGrabitzky Sep 12, 2023
42751fe
Merge pull request #148 from kieler/136-frontend-side-by-side-map-lis…
n1kPLV Sep 12, 2023
6de62e7
Merge branch 'development' into 65-payload-validation
JulianGrabitzky Sep 12, 2023
f04a435
Merge branch 'development' into 65-payload-validation
JulianGrabitzky Sep 12, 2023
9b5c4fd
#65 Add validation to track route
JulianGrabitzky Sep 12, 2023
4103690
#65 remove schema validation from index route
JulianGrabitzky Sep 12, 2023
eb27c04
#65 add zod to init route
JulianGrabitzky Sep 12, 2023
397b83b
Change first letter to uppercase
JulianGrabitzky Sep 12, 2023
f46305f
#65 zod, login route
JulianGrabitzky Sep 12, 2023
529d2e1
#65 zod, poi route
JulianGrabitzky Sep 12, 2023
53183d1
#65 zod, poitype route
JulianGrabitzky Sep 12, 2023
3471879
Convert api/tracker schema names to uppercase
JulianGrabitzky Sep 12, 2023
5ded28a
#65 zod, tracker route
JulianGrabitzky Sep 12, 2023
d4687c5
#65 zod, user route
JulianGrabitzky Sep 12, 2023
d07830e
#65 zod, vehicle route
JulianGrabitzky Sep 12, 2023
28144e3
#65 zod, vehicletype route
JulianGrabitzky Sep 12, 2023
ae5ff4b
#65 remove jsonschmea
JulianGrabitzky Sep 12, 2023
798637b
#65 adjust types in non-route files
JulianGrabitzky Sep 12, 2023
c324a9e
#65 adjust validation error severity in logging
JulianGrabitzky Sep 12, 2023
ab08764
Adjust build step
JulianGrabitzky Sep 12, 2023
5ae62fb
#65 remove finished todo's
JulianGrabitzky Sep 12, 2023
1d9e6a7
Cascade Delete regarding POITypes and POIs
Niatsuna Sep 12, 2023
cebc1c4
Soft Delete for Vehicles
Niatsuna Sep 12, 2023
f652615
Remove key pair for vehicles
Niatsuna Sep 12, 2023
f643f44
Remove tracker ref for every inactive vehicle
Niatsuna Sep 12, 2023
867e7ee
Fix eslint mishaps
Niatsuna Sep 12, 2023
8baa503
Soft Cascade Delete for VehicleTypes
Niatsuna Sep 12, 2023
42a0259
Adjusted POITypes based on Feedback
Niatsuna Sep 12, 2023
6c16cba
Adjust creation of initial user based on feedback
Niatsuna Sep 12, 2023
6f9e784
Fix unqiue name mishap for vehicle types
Niatsuna Sep 12, 2023
14b00c2
Added crude restore functionality.
n1kPLV Sep 12, 2023
06ea2b6
Adjust error message for updateType
Niatsuna Sep 12, 2023
f5f8828
Fixed updateType
Niatsuna Sep 12, 2023
8161773
Add database Index for Logs
Niatsuna Sep 12, 2023
7054351
Adjust based on feedback
Niatsuna Sep 12, 2023
4763679
Merge pull request #150 from kieler/127-backend-seed-database
Niatsuna Sep 12, 2023
aaba21d
Add getLatestLog
Niatsuna Sep 12, 2023
67c0940
Adjust getAll with limit 1 to getLatestLog
Niatsuna Sep 12, 2023
d1fbe4b
Implemented suggested changes of PR#147
Sep 12, 2023
a57c9ac
Merge branch 'development' into 139-backend-remove-redundant-calculat…
Sep 12, 2023
7bebbbb
Merge branch 'development' into 129-multi-stage-build
JulianGrabitzky Sep 12, 2023
665549d
#65
JulianGrabitzky Sep 12, 2023
a610097
Add endpoint for Oyster 3 LTE tracker
NicoBiernat Sep 12, 2023
88792c6
Merge branch 'integrate-lte-tracker' into development
NicoBiernat Sep 12, 2023
02a1631
Merge pull request #131 from kieler/129-multi-stage-build
JulianGrabitzky Sep 12, 2023
7cd8469
Integrate LTE tracker, send correct status codes
NicoBiernat Sep 13, 2023
300d4e5
Merge branch 'development' of github.com:kieler/RailTrail into develo…
NicoBiernat Sep 13, 2023
766f1f9
Merge pull request #151 from kieler/128-backend-soft-delete-cascading…
Niatsuna Sep 13, 2023
04c4bd7
Merge pull request #141 from kieler/120-prisma-error-handling
JulianGrabitzky Sep 13, 2023
fc67a41
Merge branch 'development' into 65-payload-validation
JulianGrabitzky Sep 13, 2023
1924b9d
#65 add payload validation for lte payload
JulianGrabitzky Sep 13, 2023
2dc1f6b
Merge pull request #125 from kieler/65-payload-validation
JulianGrabitzky Sep 13, 2023
bc97ea2
Fixed JSDoc for getVehicleTrackHeading
Sep 13, 2023
194ad5a
Merge branch 'development' into 139-backend-remove-redundant-calculat…
Sep 13, 2023
e215917
Little fix after merging development
Sep 13, 2023
a326256
Merge pull request #147 from kieler/139-backend-remove-redundant-calc…
Kebslock Sep 13, 2023
7d6bee5
Merge pull request #155 from kieler/app-main
JulianGrabitzky Sep 13, 2023
678708a
Merge branch 'development' into 152-backend-add-getlatest-to-logcontr…
JulianGrabitzky Sep 13, 2023
faab251
Merge pull request #156 from kieler/152-backend-add-getlatest-to-logc…
JulianGrabitzky Sep 13, 2023
673a84d
changed poitypeicon enum in db seed
Sep 13, 2023
d7f64d7
Merge remote-tracking branch 'origin/development' into development
Sep 13, 2023
cce6995
Removed return await calls.
Sep 13, 2023
7d03040
Merge pull request #159 from kieler/158-return-await
liamboddin Sep 13, 2023
a5ea765
Added timestamp in backend code
Sep 13, 2023
c083416
Changed API to better match the gps functionality in the phone
Sep 13, 2023
ad56a0c
Add null as viable trackerId
Sep 13, 2023
b3b0604
Adjust findFirst and findUnique for Error handling
Sep 13, 2023
85cf081
Default error
Sep 13, 2023
1a093fe
Adjust remove to void
Sep 13, 2023
5321c17
Merge branch '161-backend-remap-prisma-calls-for-v500' of github.com:…
Sep 13, 2023
c247b44
Add input validation for init route
JulianGrabitzky Sep 13, 2023
b73f407
Adjusted InitRoute
Sep 13, 2023
364e9ad
Merge remote-tracking branch 'origin/161-backend-remap-prisma-calls-f…
Sep 13, 2023
1a81d2f
Adjusted VehicleTypeRoute
Sep 13, 2023
2384db0
Remove error handling for database from routes vehicletype, vehicle, …
NicoBiernat Sep 13, 2023
1f38e99
Merge branch '161-backend-remap-prisma-calls-for-v500' of github.com:…
NicoBiernat Sep 13, 2023
8d3ed19
Fixed removes with no boolean return
Sep 13, 2023
8835df8
Remove null handeling for db service calls
JulianGrabitzky Sep 13, 2023
ad6309d
Remove comment
JulianGrabitzky Sep 13, 2023
ec79715
DB/Vehicle, check if argument is undefined
JulianGrabitzky Sep 13, 2023
1aa2dc3
Adjust db vehicle controller
JulianGrabitzky Sep 13, 2023
d2e3999
#154: Seperated logic and DB-queries in vehicle service
Sep 13, 2023
9136f62
Fixed typo
Sep 14, 2023
70df23e
Fixed POITypeIcon enum check
Sep 14, 2023
22976c8
#154: Adjusted API calls
Sep 14, 2023
bc4eaa6
Removed database error handling in track route
n1kPLV Sep 14, 2023
a5dd4e0
Removed signup process
n1kPLV Sep 14, 2023
bf8a72b
Removed unnecessary call for trackers in app vehicle route
Sep 14, 2023
0bdcdcb
Some restructuring
Sep 14, 2023
7500004
Reordering in track route
Sep 14, 2023
ba6ab60
Removed whoAmI route
Sep 14, 2023
7583ca0
Removed id from poitype api
Sep 14, 2023
7e5f94f
Fixed formatting in website code
Sep 14, 2023
19ec72d
Fixed battery level display
n1kPLV Sep 14, 2023
fb61626
Moved call from appendLog of app to trackerservice
Sep 14, 2023
ddd9d84
Add internal HTTPError that can be thrown by services
NicoBiernat Sep 14, 2023
dc65b68
Add type constraints to zod schema to avoid checking manually
NicoBiernat Sep 14, 2023
e6bdd07
Improve error handling in user, login, tracker and crypto services, a…
NicoBiernat Sep 14, 2023
c6f61aa
Merge branch '161-backend-remap-prisma-calls-for-v500' of github.com:…
NicoBiernat Sep 14, 2023
4d59997
Additional documentation (#166)
n1kPLV Sep 14, 2023
739ab81
Throw and catch zod errors
JulianGrabitzky Sep 14, 2023
b94c6c5
Expose less with zod errors..
JulianGrabitzky Sep 14, 2023
b8a6469
#154: Changed returned position of getVehicleData for tracker logs only
Sep 14, 2023
2db12b7
Merge branch 'development' into 154-compute-vehicle-data-all-at-once
Sep 14, 2023
25f888f
Remove unused imports (please install a linter so I don't have to be …
NicoBiernat Sep 14, 2023
02d24be
Merge branch '154-compute-vehicle-data-all-at-once' into 161-backend-…
NicoBiernat Sep 14, 2023
f18fa1b
Catch error correctly after refactor
NicoBiernat Sep 14, 2023
fa8d92e
Remove unnecessary null checks for functions that throw exceptions now
NicoBiernat Sep 14, 2023
b64f95d
Merge pull request #168 from kieler/154-compute-vehicle-data-all-at-once
Kebslock Sep 15, 2023
deb6e26
Improved error handling when getting multiple vehicles
n1kPLV Sep 15, 2023
fe21e94
Catch exceptions instead of null-checking, remove including track
NicoBiernat Sep 15, 2023
48fe5be
Fix dereference of undefined if no tracker logs exist, also use track…
NicoBiernat Sep 15, 2023
371422c
Log stack trace for internal server errors
NicoBiernat Sep 15, 2023
b7aa978
Merge branch '161-backend-remap-prisma-calls-for-v500' of github.com:…
NicoBiernat Sep 15, 2023
b27359e
Merge pull request #157 from kieler/153-backend-indexes-for-logs-base…
n1kPLV Sep 15, 2023
be9d4ee
Merge pull request #163 from kieler/161-backend-remap-prisma-calls-fo…
NicoBiernat Sep 15, 2023
092faa2
#169: Filtered app logs for less computation and better performance
Sep 15, 2023
0aaf3be
#170: Using HTTPError instead of returning null in GeoJSONUtils
Sep 15, 2023
07a355d
#170: Using HTTPError instead of returning null in services
Sep 15, 2023
0f40161
Merge branch '170-error-handling-in-services' into 169-fix-vehicle-da…
Sep 15, 2023
59dbad9
Fixed Frontend invalid token handling
n1kPLV Sep 15, 2023
9704030
Merge branch 'development' into 160-add-timestamp
Sep 16, 2023
862810f
Merge branch 'development' into 160-add-timestamp
Sep 16, 2023
553941c
Fixed merging trouble
Sep 16, 2023
87ec095
Document the timestamp
Sep 16, 2023
9f68ece
Fixed create user
Sep 16, 2023
5c5af57
#170: Added JSDoc for throwing errors
Sep 16, 2023
4d58576
#170: Adapted API to changes of error handling in services
Sep 16, 2023
6b39223
Little fix for poi route
Sep 16, 2023
2f619ab
Merge pull request #171 from kieler/170-error-handling-in-services
Kebslock Sep 18, 2023
c200c37
Merge branch 'development' into 169-fix-vehicle-data-computation
Sep 18, 2023
3fcb1b9
#169: Fixed computation of vehicle's position
Sep 18, 2023
c2cb624
#169: Fixed confusing error messages
Sep 18, 2023
dd02441
#169: Really fixed confusing error messages
Sep 18, 2023
46a3e52
#118: Improved computation of vehicle heading and direction
Sep 19, 2023
6283ab8
#165 Add real timestamp from payload to tracker logs
JulianGrabitzky Sep 19, 2023
ce19429
Merge branch 'development' into 160-add-timestamp
JulianGrabitzky Sep 19, 2023
488a208
Merge pull request #172 from kieler/160-add-timestamp
JulianGrabitzky Sep 19, 2023
45b58e6
#162 rework poi db controller
JulianGrabitzky Sep 19, 2023
f0ba9a5
Improved POI Type matching and restoration
n1kPLV Sep 19, 2023
cb0d61c
#169: Added requested changes
Sep 19, 2023
fe19cb7
Merge branch '169-fix-vehicle-data-computation' into 132-refactor-com…
Sep 19, 2023
9ed4bec
#132: Improved computation of vehicle speed
Sep 19, 2023
cbd8649
Restructured Header
n1kPLV Sep 19, 2023
09d7851
Added smart-ish links to the header
n1kPLV Sep 19, 2023
ae51961
Added a modal track selection dialog for most use cases
n1kPLV Sep 19, 2023
f0d847b
Fixed Layout
n1kPLV Sep 20, 2023
510c6dc
Improved some comments
n1kPLV Sep 20, 2023
19a3309
Merge pull request #173 from kieler/169-fix-vehicle-data-computation
Kebslock Sep 20, 2023
7af0f7f
Merge pull request #174 from kieler/118-refactor-computation-for-vehi…
Kebslock Sep 20, 2023
281434c
Merge pull request #176 from kieler/132-refactor-computation-of-vehic…
Kebslock Sep 20, 2023
9d8f70c
Merge pull request #177 from kieler/175-frontend-improve-user-navigation
Kebslock Sep 20, 2023
6dcc6a1
Fixed focus parameter for the map
n1kPLV Sep 20, 2023
b47be78
Mapping also last known vehicle position and heading on track
Sep 20, 2023
092f1c1
Merge pull request #123 from kieler/110-poi-backup-and-restore
n1kPLV Sep 22, 2023
82e475d
Synchronized map position and zoom with React state
n1kPLV Sep 22, 2023
0bd9e0a
Resizing POI icons based on map zoom level
n1kPLV Sep 22, 2023
011195b
Merge pull request #178 from kieler/poi_icon_scaling
n1kPLV Sep 22, 2023
922a8c8
Added timezone information in the vehicle simulator payload
n1kPLV Sep 22, 2023
7087526
Fixed heading calculation with only one tracker
n1kPLV Sep 24, 2023
150f5d9
updated docker-compose.yml with correct backend URI
n1kPLV Sep 26, 2023
5e81b67
Bumped Next.js version and removed an unused dependency
n1kPLV Sep 26, 2023
ab7ec3e
Fully removed an unused dependency
n1kPLV Sep 26, 2023
67064bf
Fixed a type error
n1kPLV Sep 26, 2023
b7e5a61
Added README for POI backup
n1kPLV Sep 27, 2023
c6e4e83
Update README.md
Kebslock Sep 27, 2023
4ab45ab
Update README.md
Kebslock Sep 27, 2023
927afa8
Fixed typo in readme
Sep 28, 2023
916be4f
Refactor deployment (just a few minor things)
NicoBiernat Sep 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .github/workflows/docker-backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Backend

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: ["main", "development"]
tags: ["v*.*.*"]
paths:
- Server/**
pull_request:
branches: ["main", "development"]
paths:
- Server/**

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}-backend

jobs:
# style:
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: Server/
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: "18"
# - name: Install
# run: npm i
# - name: Generate Primsa
# run: npx prisma generate
# - name: Prettier
# run: npx prettier src/ --check
# - name: ESLint
# run: npx eslint src/**

build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./Server
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Clean container registry (backend)
uses: actions/delete-package-versions@v4
with:
package-name: "railtrail-backend"
package-type: "container"
min-versions-to-keep: 3
token: ${{ secrets.GITHUB_TOKEN }}
80 changes: 80 additions & 0 deletions .github/workflows/docker-vehicle-simulator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Vehicle Simulator

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: ["main", "development"]
tags: ["v*.*.*"]
paths:
- vehicle-simulator/**
pull_request:
branches: ["main", "development"]
paths:
- vehicle-simulator/**

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}-vehicle-simulator

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./vehicle-simulator
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Clean container registry (vehicle-simulator)
uses: actions/delete-package-versions@v4
with:
package-name: "railtrail-vehicle-simulator"
package-type: "container"
min-versions-to-keep: 3
token: ${{ secrets.GITHUB_TOKEN }}
80 changes: 80 additions & 0 deletions .github/workflows/docker-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Website

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
branches: ["main", "development"]
tags: ["v*.*.*"]
paths:
- Website/**
pull_request:
branches: ["main", "development"]
paths:
- Website/**

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}-website

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./Website
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Clean container registry (website)
uses: actions/delete-package-versions@v4
with:
package-name: "railtrail-website"
package-type: "container"
min-versions-to-keep: 3
token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore artifacts:
build
logs
**/*.log
**/*.guard.ts
24 changes: 23 additions & 1 deletion App/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -254,4 +254,26 @@ google-services.json
# Android Profiling
*.hprof

# End of https://www.toptal.com/developers/gitignore/api/reactnative
# End of https://www.toptal.com/developers/gitignore/api/reactnative

## Core latex/pdflatex auxiliary files:
*.aux
*.bbl
*.bcf
*.blg
*.fdb_latexmk
*.lof
*.log
*.lot
*.loc
*.fls
*.run.xml
*.soc
*.synctex.gz
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
17 changes: 17 additions & 0 deletions App/RailTrail/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
node_modules/
.expo/
dist/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/

# macOS
.DS_Store

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*
28 changes: 28 additions & 0 deletions App/RailTrail/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { RootNavigation } from "./navigation/root-navigation"
import { SafeAreaView } from "./components/safe-area-view"
import { StatusBar } from "expo-status-bar"
import { initStore } from "./redux/init"
import { Provider } from "react-redux"
import {
GestureHandlerRootView,
gestureHandlerRootHOC,
} from "react-native-gesture-handler"
import { AppRegistry } from "react-native"
import { expo } from "./app.json"

export default function App() {
AppRegistry.registerComponent(expo.name, () => gestureHandlerRootHOC(App))

const { store } = initStore()

return (
<SafeAreaView>
<Provider store={store}>
<GestureHandlerRootView style={{ flex: 1 }}>
<RootNavigation />
<StatusBar style="dark" />
</GestureHandlerRootView>
</Provider>
</SafeAreaView>
)
}
6 changes: 6 additions & 0 deletions App/RailTrail/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
```
cd App/RailTrail/
npm install
yarn install
npm start
```
Loading
Loading