nuxt-prawo-jazdy/README.md
2025-12-18 17:25:24 +01:00

5.9 KiB

nuxt-prawo-jazdy

Polish driver's license theoritical exam nuxt web app

What's it do?

It mimicks the official Polish driver's license theoritical exam - has all categories from the database of questions from the Polish Ministry of Infrastructure (AM, A1, A2, A, B1, B, C1, C, D1, D, T, PT), which includes languages Polish, English, German and Ukrainian (not all questions provided by the Ministry are available in Ukrainian, so when using the Ukrainian version, you don't get such questions on the exam mimick).

You can choose above options (category and language) and you're greeted with a replica of an official exam (20 basic questions, 12 advanced questions). Time for each basic question includes 20 seconds to get acquainted with the question, time for media to load, and 15 seconds for an answer. Time for each basic question includes 50 seconds for an answer.

My intent, inspiration and information about the project

My intention is, to share access to test exams free of charge, you don't have to pay me - although you can, I greatly appreciate if you donate!

I'm planning to host this project publicly and to put non-invasive ads if it gains enough traction

All data used by this software is public information by definition provided in the Polish Constitution - article 61., and can be acquired by either checking above links on the gov website, or by writing to the Ministry (if something happened to be missing) ==> (blog post to write in the future)

This project is a website mimicking an official driver's license theoritical exam with a seperate media http server (not included here), connected using drizzle ORM to a SQLite database

Running

Required

db

A python script at db-prawo-jazdy is designed to convert the CSV(s) to a SQLite database for use here. When you acquire your database via that script, insert it at your desired path (default ./db/database.db) and change the DATABASE_URL environment value in .env. Visit db-prawo-jazdy for more details.

The database from November 2025 is included here at ./db/database.db

media

A shell script at media-prawo-jazdy for media files (available on the website of the Ministry of Infrastructure under the link title Pytania egzaminacyjne na prawo jazdy) will convert (copy) all .wmv files to .mp4 and copy all .jpeg files to .jpg. When you have all media and the script completed successfully, host these files on a webserver of your choice (e.g. apache, nginx), and change the CDN_URL environment value in .env to your webserver URL including the folder path to the media files. Visit media-prawo-jazdy for more details.

To-do:

  • re-forge database structure (good for now)
  • come up with how to show results appropriately
  • better answer click recognition
  • beautify website (good for now)
  • Fixed? Needs more testing, but should be fine. (question-mark?) - middleware between pages; finishing exam sometimes redirects to homepage instead of results, major issue
  • question timers
  • exam (& results?) warning leave message on exit and timer end (and definitely on refresh)
  • add keybinds:
    • S - start, D - next question, X - exam end, T/Y - yes, N - no, A - A, B - B, C - C
  • i18n - pl, en, de, ua (not all questions are available in ua, api handle - already handled with sql)
    • UI i18n
      • pl
      • en
      • de
      • ua
    • db: examstore add language field, api handle languages (questions lang)
  • nuxt3 -> nuxt4 (hopefully working fine, seems to do so; so far)
  • clean up js code in exam.vue and result.vue (currently a little bit of a mess)
  • daisyui is stuck on 5.2.5 - newer versions break UI, reason unknown - consider moving to nuxtUI and another tailwind integration with nuxt than nuxtjs/tailwind

Setup

Copy .env.example to .env and modify it to values specified in the Required#db and Required#media sections according to your case.

This project utilizes pnpm, thus it is recommended

pnpm install

Development Server

Start the development server on http://localhost:3000:

pnpm run dev

Production

Build the application for production:

pnpm build

Locally preview production build:

pnpm preview

Check out the Nuxt documentation for more information.

Licensing (AGPL-3.0-only)

nuxt-prawo-jazdy: Polish driver's license theoritical exam nuxt web app

Copyright (C) 2025 NetMan

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, AGPL-3.0-only.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

This is important:

  • Keep all existing copyright headers, give credit
  • Any modified versions or works based on this project must also be AGPLv3
  • Users interacting with this project over a network must have full access to the source code (including of forks, or modified versions)