Coder Social home page Coder Social logo

vsimakhin / web-logbook Goto Github PK

View Code? Open in Web Editor NEW
21.0 6.0 7.0 13.46 MB

EASA Web Pilot Logbook

License: MIT License

Makefile 0.58% Go 42.07% CSS 2.65% JavaScript 54.52% Dockerfile 0.18%
easa logbook pdf fcl050 golang pilot go opensource electronic free

web-logbook's Introduction

GitHub Release GitHub Downloads (all assets, latest release) GitHub Downloads (all assets, all releases) GitHub License "Buy Me A Coffee"

Web-logbook

This is a simple, free and opensource EASA-style logbook application written in golang.

You can clone the repo and compile the binaries yourself, or just download the latest ones for your operating system from the releases.

Once you start the app it automatically creates an SQLite local DB and starts listening on port 4000 by default. So you can open it in your standard web browser at http://localhost:4000

You also can easily export all flight records into EASA style pdf format, print it, sign and use it as a usual paper logbook.

Changelog

[2.40.0] - 10.07.2024

  • Update: The page will no longer reload when saving a new flight record.
  • Update: During validation, fields with correct values will no longer be highlighted in green. Only fields with incorrect values will be highlighted in red.
  • New: Added a "Copy" button to the Flight Record page.
  • Update: When the arrival or departure time is changed and the total time is recalculated, the other time fields will also be checked against the old total.

[2.39.0] - 03.07.2024

  • Fix: Incorrect night time calculation when flying inside the polar circle

[2.38.0] - 25.06.2024

  • Fix: Bug with columns for the extended PDF format, both A4 and A5.
  • Update: Update golang to 1.21.11 and golang packages
  • Fix: The daterange picker on the main Logbook page didn't recognize the settings for the first day of the week (Monday or Sunday)

[2.37.0] - 02.06.2024

  • Update: Session manager now stores tokens in the database instead of memory. In this case it's possible to run the application in the Cloud platforms (AWS ECS, Google Cloud Run, Kubernetes) without always keeping it live and active.

The full changelog is here

Usage

  1. Download the latest release from https://github.com/vsimakhin/web-logbook/releases
  2. Extract the archive to some folder/directory
  3. Run:
  • Windows:
    • Double-click on the web-logbook.exe file. It will show you some warning about how unsafe it can be (need to solve it later), but just run it.
  • Linux/MacOS:
    • Open a terminal and navigate to the directory
    • Run ./web-logbook
  1. Open your browser, type http://localhost:4000 and the application is ready to use
  • (first run) Go to the Settings->Airports page and click on the Update Airport DB button
  1. To close the application, use Ctrl+C in the terminal window or just close it

CLI options

$ ./web-logbook -h
  -cert string
      certificate path (default "certs/localhost.pem")
  -disable-authentication
      Disable authentication (in case you forgot login credentials)
  -dsn string
      Data source name {sqlite: file path|mysql: user:password@protocol(address)/dbname?param=value} (default "web-logbook.sql")
  -enable-https
      Enable TLS/HTTPS
  -engine string
      Database engine {sqlite|mysql} (default "sqlite")
  -env string
      Environment {dev|prod} (default "prod")
  -key string
      private key path (default "certs/localhost-key.pem")
  -port int
      Server port (default 4000)
  -url string
      Server URL (default empty - the app will listen on all network interfaces)
  -version
      Prints current version

Supported operating systems

Since it's written in Golang, it can run on any system after compiling the sources. Currently, on the Release page, there are binaries available for Linux, MacOS, and Windows.

Interface

  • Logbook
    • Flight records with date filter and global search through all data
    • Quick export to PDF (A4, A5) and CSV/XLS
  • Flight records
    • Flight data
    • Attachments for the flight records
    • Automatic night-time calculation
    • Map drawing and distance calculation for the flight record
  • Licensing & Certification
    • List of licenses, certificates and endorsements
    • Document attachments and preview
    • Expiration time tracking
  • Map
    • Map of the flights
    • Date filters
    • Routes and airports filters
    • Aircraft filters
  • Statistics
    • Totals
    • By Year
    • By Month
    • By Aircraft
    • By Aircraft group/class
    • Limits (EASA flight time limitations)
  • Export
    • Export to EASA PDF format (A4 and A5)
    • PDF export formats with custom title pages (for example, include your CV automatically)
    • Additional export formats (XLSX, CSV)
    • Adjustable settings for each export format
  • Import
    • CSV support
    • Automatic WebLogbook profile load
  • Settings
    • Owner name, license and address, signature for the PDF exports
    • Signature pad to automatically include signatures to the PDF exports
    • Enable/Disable authentication (in case you need to expose the app to the public internet)
    • Aircraft groups/classes
    • Global airport database
    • Your own custom airfields or heliports
    • Some interface settings

Logbook

EASA Logbook

Flight record

Flight record

Licensing & Certification

Licensing & Certification

Map

Map of the flights

Stats example

Flight stats example

Export

Export

A4

Export to PDF

A5

Export to PDF Export to PDF

So in real life the logbook could look like Pilot logbook

Import

Import

Settings

Settings

Dark mode

Dark mode

Mobile friendly

Mobile friendly

Airports Databases

The app supports 3 sources:

If you enable the No ICAO codes filter option, the app will ignore ICAO airport codes that contain numbers and dashes, which are not commonly used ICAO codes. By default, this option is unchecked, which makes the database slightly smaller and cleaner.

Advanced configuration

Docker

Check readme for dockerized app for more details.

HTTPS enable

Since the app is running on localhost it's not possible to create a public certificate that would be valid by public CAs. As an option, you can create a self-signed certificate and add it to the root CA in your operating system. For that, you can use mkcert tool.

  • Open a terminal/console and navigate to the web-logbook directory
  • Create a directory certs
  • In this new directory run commands:
    • mkcert -instal - it will create a new local CA
    • mkcert localhost - it will generate a key(localhost-key.pem) and a certificate(localhost.pem)
  • Now just run the Web Logbook App with the new parameter: web-logbook --enable-https

You don't need to install a new local CA in you system, but in this case, browser will always show you a warning message, that certificate is self-signed and not trusted.

Also, you can always generate your own certificate and key and store it in the different directories in your operating system. For that use --key and --cert parameters to specify the exact location.

MySQL database

To store all data, you can use MySQL database. To get started, create a database and a user with access to it. On the first run, the application will create all necessary tables and views. If you want to migrate your data from SQLite to MySQL, you can use the export to CSV function first and then import from CSV.

The DSN format for MySQL connections

user:password@protocol(address)/dbname?param=value

For example,

./web-logbook -engine mysql -dsn "web-logbook-user:pwd@tcp(192.168.0.222)/web-logbook"

New features/Issues

In case you'd like to add some other features to the logbook or you found a bug, please open an "issue" here https://github.com/vsimakhin/web-logbook/issues with a description. I cannot promise I'll implement it or fix it at a reasonable time but at least I can take a look.

Buy Me A Coffee

Contributors

Used libraries

web-logbook's People

Contributors

vsimakhin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

web-logbook's Issues

Add date range filter

It would be great to add a date range filter in every part of the logbook, export included

Dark mode

Need to check dark mode switch with new bootstrap 5.3 version

Adding flying limitations

Could be useful, maybe in the "stats" page, the computation of the flying limitations of EASA, daily, 7 days, 14 days, etc...

A really love this project and I'd like to contibuting.

Rewrite JS part

Need to make it, lets say, in a more proper way so it doesn't look like it was written by a completely newbie (which is I am in JS :))

Last update change something

I've make the last update and, fare the build i've copied back my SQLite DB inside the dist folder, as always (automatized by a script), now the flight tab and the licesing are empty, the other are populated.

Is something in the structure of the DB changed?

add aircraft classes

Need to have a possibility to combine aircraft to the classes (like C150,C152,C172 -> SEP), and to show them in the stats

New import features

  • Automatic time format recognition HH:MM and HHMM
  • Option to recalculate night time
  • Add check if the records already exist (same time and airports)

Remark visualization with big boxes

The remarks column show online a small part of the text inside the field even if the box is bigger:

image

The content of that box, in this specific case is: "PPL-H Check Ride"

Show Cross-country time

Calculate Cross-country time, flights with different origin and destination, and show in Stats.

Add opening totals

Add fields to allow the user put their previous experience without the need to enter all the flights.

What is the source of the airport DB? Any way of adding aerodromes?

My home aerodrome (LPSO) is not on the airport database. That kind of sucks because the maps feature ends up being a bit useless for my use case. Any way to add it to the database? Or for me to manually do it? (Preferentially a way that wouldn't break "update function" of the database).

"ERROR 2022/10/27 15:37:44 handlers_airport.go:24: cannot find LPSO in the database - sql: no rows in result set"

Incorrect A5 export

The last "right" page is printed 2 times with wrong margins if the amount of flights exactly fits to the page and no new "left" page is needed

Hiding some stats fields mess the chart

Hi, thanks for your work.

This is a (partially, look only at the first 3 colums) correct visualization of my stats:

Screenshot 2023-03-27 at 11-05-19 Stats

hiding the ME fields from the settings cause a shift and an error to the visualization:

Screenshot 2023-03-27 at 11-05-36 Stats

The ME value should be zero, this doesn't work for any fields.

Lateral table spacing

Is really a minor stuff, the path on the left, the orange one, is correct and well-balanced, the one on the right, blue, is too small:

image

Having the same spacing could improve the general style of this page.

STATS - Aircraft class totals

If you have an aircraft type that is C172, and another that is C172-SEA, the query sure has a like %type% so time from first is added to second.

In the attached image, C172SEA time should be 9:13 instead of 10:43. Time from C172LAND is added to C172SEA.

image

image

image

I hope I have described the issue well :)

Number in chart decimal

The number in the chart is in decimal and not in hh:mm format:

image

The pop-up windows should show 98:58 (hh:mm) and not 98.98 the is the decimal version of the correct one.

Error when trying to access night time script (Windows)

I have executed the Windows version, and when I enter a new flight that is done at night, it throws the following log:

INFO    2022/10/23 00:26:29 Web Logbook 2.5.0 is ready on http://localhost:4000
ERROR   2022/10/23 00:26:55 server.go:3195: http: panic serving [::1]:52987: time: missing Location in call to Time.In
goroutine 147 [running]:
net/http.(*conn).serve.func1()
        /usr/local/go/src/net/http/server.go:1825 +0xbf
panic({0x16042a0, 0x1ecb110})
        /usr/local/go/src/runtime/panic.go:844 +0x258
time.Time.In(...)
        /usr/local/go/src/time/time.go:1105
github.com/vsimakhin/go-nighttime.(*Place).SunriseSunset(0xc0005894a8)
        /home/vsimakhin/go/pkg/mod/github.com/vsimakhin/[email protected]/nighttime.go:129 +0x105
github.com/vsimakhin/go-nighttime.(*Place).Sunrise(0x0?)
        /home/vsimakhin/go/pkg/mod/github.com/vsimakhin/[email protected]/nighttime.go:139 +0x19
github.com/vsimakhin/go-nighttime.(*Route).NightTime(0xc0005894a8)
        /home/vsimakhin/go/pkg/mod/github.com/vsimakhin/[email protected]/nighttime.go:198 +0x38
main.(*application).HandlerNightTime(0xc0002aa230, {0x1ecef98, 0xc000d6c230}, 0xc0000c2500)
        /home/vsimakhin/Documents/github/github.com/vsimakhin/web-logbook/cmd/web/handlers_flightrecord.go:255 +0x718
net/http.HandlerFunc.ServeHTTP(0x162b480?, {0x1ecef98?, 0xc000d6c230?}, 0xc00029e180?)
        /usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc003f46f60, {0x1ecef98, 0xc000d6c230}, 0xc0000c2500)
        /home/vsimakhin/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:442 +0x216
net/http.HandlerFunc.ServeHTTP(0xe?, {0x1ecef98?, 0xc000d6c230?}, 0xc0001d22a0?)
        /usr/local/go/src/net/http/server.go:2084 +0x2f
main.(*application).Auth.func1({0x1ecef98?, 0xc000d6c230?}, 0xc00029e180?)
        /home/vsimakhin/Documents/github/github.com/vsimakhin/web-logbook/cmd/web/handlers_auth.go:21 +0xf0
net/http.HandlerFunc.ServeHTTP(0x0?, {0x1ecef98?, 0xc000d6c230?}, 0xefdd90?)
        /usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc003f46f60, {0x1ecef98, 0xc000d6c230}, 0xc0000c2500)
        /home/vsimakhin/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:71 +0x48d
github.com/go-chi/chi/v5.(*Mux).Mount.func1({0x1ecef98, 0xc000d6c230}, 0xc0000c2500)
        /home/vsimakhin/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:314 +0x19c
net/http.HandlerFunc.ServeHTTP(0x162b480?, {0x1ecef98?, 0xc000d6c230?}, 0xc00001e165?)
        /usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/go-chi/chi/v5.(*Mux).routeHTTP(0xc003f46f00, {0x1ecef98, 0xc000d6c230}, 0xc0000c2500)
        /home/vsimakhin/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:442 +0x216
net/http.HandlerFunc.ServeHTTP(0xc0002b2aa0?, {0x1ecef98?, 0xc000d6c230?}, 0x0?)
        /usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/alexedwards/scs/v2.(*SessionManager).LoadAndSave.func1({0x1ecf658, 0xc0003c22a0}, 0xc0000c2400)
        /home/vsimakhin/go/pkg/mod/github.com/alexedwards/scs/[email protected]/session.go:148 +0x34d
net/http.HandlerFunc.ServeHTTP(0x1ecfe00?, {0x1ecf658?, 0xc0003c22a0?}, 0x2e7e480?)
        /usr/local/go/src/net/http/server.go:2084 +0x2f
github.com/go-chi/chi/v5.(*Mux).ServeHTTP(0xc003f46f00, {0x1ecf658, 0xc0003c22a0}, 0xc0000c2300)
        /home/vsimakhin/go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:88 +0x442
net/http.serverHandler.ServeHTTP({0x1ecdf30?}, {0x1ecf658, 0xc0003c22a0}, 0xc0000c2300)
        /usr/local/go/src/net/http/server.go:2916 +0x43b
net/http.(*conn).serve(0xc003ffe000, {0x1ecfea8, 0xc000d74180})
        /usr/local/go/src/net/http/server.go:1966 +0x5d7
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:3071 +0x4db
ERROR   2022/10/23 00:26:55 server.go:3195: http: panic serving [::1]:52988: time: missing Location in call to Time.In

Add our own airports in the database

Some small airports do not have an ICAO code and are not shown on the map.

Being able to create our database with those airports so that it can be represented on the map together with the default airport database.

Option to hide fields in the flight form

"Ability to specify which fields are displayed in the flight creation form. For example, the ability to hide Simulator Type and Time, MCC, ... This makes it easier to enter a flight.

Tooltips on flight record page

Tooltips on the flight record page is a good help, but they become annoying for the experienced users. Need to add some checkbox to the setting page to hide them

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.