Conduct and document pre-trip inspections for commercial vehicles with ease. View current and past trips, and create new ones quickly and efficiently. Built using TypeScript, Next.js, and Auth Kit for secure authentication, and GeoApify for geolocation services. Get started today! This description showcases the technologies used in the project, including:
- TypeScript for robust and maintainable code.
- Next.js for server-side rendering and static site generation.
- Auth Kit for secure authentication and authorization.
- GeoApify for Geo Location services for obtaining users address from coordinates. Feel free to modify it as needed to fit your project's specific requirements!
Pat's Pre-Trips is currently in development and is provided free of charge. As such, we disclaim any liability for damages or issues incurred while using the app. Our service is intended to be used as a convenience and not relied upon as the sole means of conducting pre-trip inspections. We are not responsible for any consequences resulting from its use. By using Pat's Pre-Trips, you acknowledge that it is a beta product and may contain errors or inaccuracies. We are continually working to improve the app, but we make no warranties or guarantees regarding its performance or reliability. Pat's Pre-Trips is a fun project created to explore the feasibility of a pre-trip inspection app. We hope you find it helpful, but please use it at your own risk. Let me know if you'd like me to make any adjustments!
Here you can try the app for your self(still in development) https://pats-pretrip.vercel.app/
- Security
- Using Auth Kit by Work OS for authentication, user login and sign up.
- Trip Management
- Ability to see current trips less than 24 hours old.
- Ability to see past trips more than 24 hours old.
- Defect Management
- Ability to add on route defects.
- Ability to add remarks to defects on route.
- Automation
- Time automatically selected by device.
- Location Populated for inspection address if user allows browser permissions.
- Defect Management
- Ability to correct defects and list invoice number (Potentially take photo of invoice).
- Serverless PostgreSQL DB with Vercel. https://vercel.com/
- Work OS Account. https://workos.com/
- Geoapify Api account. https://www.geoapify.com/
- Clone repository run this command:
git clone https://github.com/Pmacdon15/pats-pretrip.git
After cloning run:
cd pats-pretrip
Once you are inside of the project directory you will have to run a few commands from the root directory to set the project up. The commands are:
- Install dependencies:
npm i
- Set up .env.local with Vercel Postgres, Work OS and Geoapify info:
# Created by Vercel CLI
NX_DAEMON=""
POSTGRES_DATABASE=""
POSTGRES_HOST=""
POSTGRES_PASSWORD=""
POSTGRES_PRISMA_URL=""
POSTGRES_URL=""
POSTGRES_URL_NON_POOLING=""
POSTGRES_URL_NO_SSL=""
POSTGRES_USER="default"
TURBO_REMOTE_ONLY=""
TURBO_RUN_SUMMARY=""
VERCEL=""
# Needed for authkit-nextjs library example, must defined in WorkOS dashboard to work.
WORKOS_REDIRECT_URI="http://localhost:3000/auth/callback"
# Needed for authkit-nextjs library example. Must be at least 32 characters long
WORKOS_COOKIE_PASSWORD=""
WORKOS_CLIENT_ID=""
WORKOS_API_KEY=""
REVERSE_GEOCODING_API_KEY="You get this from Geoapify"
It might be easiest to associate your fork with your Vercel Postgres database with your project and add these 5 variables to your Vercel projects .env and then use the Vercel Cli to pull the env, making hosting later much easier.
Note This project was meant to be used with a Vercel Postgres database, Work os Auth Kit and I use the Vercel Sdk to communicate with the database.
- If you want to run it in development run:
npm run dev
Other words we have to build the project, which is easily done by running:
npm run build
Project can be easily started from the root by running:
npm run start
Then you can go to:
http://localhost:3000
and click login to sign up.
Note This project is still in development and is not meant to be relied upon as your daily driver but can be for free in a pinch.