This repository serves for me to track the number of hours worked through a React Native app.
- Set the
USER_ID
property in the.env.
files to the ID of your Firebase user. - Install a JavaScript runtime, such as Node, or Bun. I personally prefer Bun, so the guides throughout the project will be using
bun run
instead ofnode run
, but the choice is yours.
There is a number of actions you can perform using either bun run
or npm run
. These are listed in package.json
, but for clarity, I also add them here.
Note: Each action is invoked either through a shell script (scripts
folder), or the _dev/main.ts
file. For further details on any single action, refer to these files.
Here is a list of available actions:
- Add entry:
- Overview: Add a custom hours worked entry to the
data.json
file. - Invocation:
bun run add-entry
- Overview: Add a custom hours worked entry to the
- Remove entry:
- Overview: Remove the last custom hours worked entry from the
data.json
file. - Invocation:
bun run remove-entry
- Overview: Remove the last custom hours worked entry from the
- Backup:
- Overview: Backup a data file to Google Drive.
- Invocation:
bun run backup <backup-file-name> <google-drive-folder-path>
- Note: For the first argument, select just the name of the file inside the
data
folder. For the second argument, provide the full path to the folder inside your google drive.
- Report:
- Overview: Generate a report of hours worked for a given company during a given month of a year.
- Invocation:
bun run report <company-name> <month> <year>
- Note: You can pass the
--no-save
flag to skip saving the report to the output folder. - Alternatives: To run the script in a development environment, use
bun run dev-report <company-name> <month> <year>
.
- Invoice:
- Overview: Generate an example invoice in the
output/invoices
folder. - Invoication:
bun run main create-example-invoice
- Overview: Generate an example invoice in the