Statistics interest me, and I've always wanted something that could keep track of overall life stats, so I decided to make a simple app where I can log that information.
- Clone repo
- cd repo
npm i
(this repo uses npm workspaces, so you only need to be in root dir)npm run api
in a dedicated terminalnpm run ui
in a dedicated terminal- Navigate to http://localhost:5173
- Potentially use the browserPlugin in your browser (for FireFox) and use the Copy Details context menu that shows on a job description on LinkedIn or Indeed
It's good to note that SQLite is used for the database, and because SQLite does not allow usernames/passwords, I created encryption/decryption functionality for the DB. Basically, if you set the DATABASE_PATH to something other than the default, then when the app starts, we'll attempt to decrypt the file at that location.
The very first time you run this app, the encrypted file won't exist, unless you're clairvoyant or something. When it does exist, we'll decrypt and copy it over to src/db/data.db
. When the server is stopped, we attempt to encrypt and save it back to DATABASE_PATH
. This will be saved as a gzipped tar, encrypted with the DATABASE_PASSWORD that you set, and only that password can decrypt it.
- Vue 3
- Vue Router
- TailwindCSS v4
- Reka UI for some core components, like ComboBox and DateField
- TanStack Table for data tables
- TanStack Query for API calls
- TanStack Virtual for virtual scrolling in ComboBox
- Redux Toolkit for minor state management
- PapaParse for pasting job details from plugin
- NestJS
- OpenAPI Plugin for generating Swagger doc
- Sequelize
- PapaParse for CSV upload from existing Excel spreadsheet
- SQLite3 for using local SQLite DB
When the API starts, it generates the Swagger doc based on the endpoint markups. This Swagger doc gets thrown in the spec dir. The dist and generated dirs are created from running the openapi-generator-cli through Docker, so there's no need to download Java on your local machine... you just need Docker in order to run this. It knows to use Docker through this config file.
This all started because I didn't want to manage job applications in an Excel spreadhseet, so I decided to build my own UI, with accompanying API and DB. It's a fairly simple interface, but I also wanted to try out some framework agnostic libraries in a Vue 3 app.
- Job Applications
- Allows uploading CSV data
- Allows creating new applications
- Allows adding comments to applications
- Allows linking applications to others (for things like reposted roles)
- Exercises
- Allows uploading Strava CSV data
- Allows importing from Strava, but you will have to auth first
- Conversions between Metric and Imperial (given your browser's language setting)
- Auditing
- Each feature has a "History" tab that shows your actions that have taken place throughout that feature
The test environment was something I wanted to get up, so I could use it as part of my application portfolio, and I decided to use the following architecture:
- Cloudflare - for all my DNS concerns, using origin rule rewrites for the API and UI
- AWS
- EC2 - for hosting my docker containers, added swap memory due to 1 GB micro instance limit and vite being a pig when building
- Lambda - for running functions to start/stop the instance
- EventBridge - for crontab scheduling of Lambda to start/stop instance
- Let's Encrypt/certbot - for SSL certs
- DDClient - for updating the EC2 IP every time it starts, due to not having an Elastic IP
- Docker - for containerizing my API and UI code for easy deployments
- Google Analytics - for my analytics needs, had to customize vite build to only include in test build