Skip to content

Uploading files to Userbase

10x Resume candidates can use just ↗︎ commands as described below to upload their portfolio to the Userbase database they created before rendering their content.

Uploading rendering content

  • Directory34476472.Brilliant        e.g. the git worktree for the enquiry
    • DirectoryJob
      • DirectoryPortfolio
        • Directorybuild/
          • Directory10x    json, html and zip files for upload
            • _items.json
            • Directoryanalysis.1
              • index.html
            • analysis.1.zip

The 10x Resume .justfile provides an upload command to to upload the 10x Resume content to Userbase.

Note that only a subset of the Job/Portfolio/build/10x files are uploaded:

  • the _items.json index with portfolio metadata
  • a index.html file for each Job/Portfolio/Src/10x source page
  • a .zip file for pages with content in Job/Portfolio/Src/10x-files

Steps

  1. To upload the 10x Resume portfolio for the enquiry, run the following command from the git worktree (e.g. ~/10xresume/34476472.Brilliant)

    Terminal window
    just upload
    Sample output
    % just upload
    dotenvx run -- ./Apps/Cli/dist/10x upload
    [dotenvx@1.19.2] injecting env (19) from .env
    Access init { appId: 'ed070b06-62c8-4da8-a162-e42f756371a4' } +0ms
    Access init session {} +2ms
    Access init user undefined +0ms
    Access init username undefined +0ms
    Access [
    Access 'signIn',
    Access { username: '34476472candidate', password: 'xxxxxxxxxxxxxxxxxxxx' }
    Access ] +0ms
    Access [ 'openDatabase', { databaseName: 'enquiry' } ] +1s
    Access [
    Access 'insertOrUpdateItem',
    Access {
    Access databaseName: 'enquiry',
    Access item: {
    Access kind: 'analysis',
    Access icon: 'icons.1/icon.svg',
    Access dark: 'icons.1/dark.svg',
    Access name: 'Analysis Sample',
    Access desc: 'An analysis sample.',
    Access size: 'tbd'
    Access },
    Access itemId: 'analysis.1'
    Access }
    Access ] +144ms
    added analysis.1
    ...
    added profile.1
    Access [ 'signOut' ] +127ms
    uploaded
    rm -rf __userbase_localStorage

Verifying uploaded content

  • Directory34476472.Brilliant        e.g. the git worktree for the enquiry
    • Directory34476472.download   e.g. directory with downloaded files
      • _items.json
      • Directoryanalysis.1
        • index.html
      • analysis.1.zip

The 10x Resume .justfile provides download and compare commands to download the 10x Resume content from Userbase into a local directory and compare the downloaded files with the ones uploaded from the Job/Portfolio/build/10x directory.

The download command creates a directory with a prefix matching the prefix of the worktree and ending in .download. For example, if the worktree prefix is 34476472 the download directory will be named 34476472.download.

Steps

  1. To download the 10x Resume portfolio data uploaded to Userbase, run the following command from the git worktree (e.g. ~/10xresume/34476472.Brilliant)

    Terminal window
    just download
    Sample output
    % just download
    dotenvx run -- ./Apps/Cli/dist/10x download
    [dotenvx@1.19.2] injecting env (19) from .env
    Access init { appId: 'ed070b06-62c8-4da8-a162-e42f756371a4' } +0ms
    Access init session {} +2ms
    Access init user undefined +0ms
    Access init username undefined +0ms
    Access [
    Access 'signIn',
    Access { username: '34476472candidate', password: 'xxxxxxxxxxxxxxxxxxxx' }
    Access ] +0ms
    Access [ 'openDatabase', { databaseName: 'enquiry' } ] +1s
    Access [ 'downloadFile', 'a8d26d4e-fa16-4d7f-801d-da19b9e433e9' ] +338ms
    wrote 34476472.download/analysis.1/index.html
    ...
    wrote 34476472.download/writing.1.zip
    Access [ 'downloadFile', '16efc6ad-f814-4a63-9785-c4d4dd0dfbc7' ] +116ms
    wrote 34476472.download/writing.2/index.html
    Access [ 'signOut' ] +121ms
    downloaded 66
    rm -rf __userbase_localStorage
  2. Run the following command to compare the downloaded files with those uploaded from Job/Portfolio/build/10x using the diff command.

    Terminal window
    just compare
    Sample output
    % just compare
    ./Scripts/compare.sh
    skipping ./_items.json
    34476472.download files match Job/Portfolio/build/10x files

    Note the script reports that the _items.json file was skipped because items downloaded from Userbase contain addition metadata not present in the file uploaded from Job/Portfolio/build/10x making the results not comparable with diff.