Giter VIP home page Giter VIP logo

tybalt's Introduction

tybalt

Corporate time and expense tracking, computer asset management, and reporting in firebase

  • Send raw login data from the radiator powershell script to the tybalt rawLogins endpoint and have it sorted by user, login, and computer.
  • Log in to firebase with credentials presented by Azure AD
  • have employees enter time and bundle time entries into time sheets for approval
  • have employees submit expenses including receipt attachments
  • generate reports for invoicing and payroll

install

  1. edit .firebaserc

  2. Set environment variables

    firebase functions:config:set tybalt.azureuserautomation.secret="COMPANYAzureTenant secret" 
    firebase functions:config:set tybalt.wireguard.secret="WireGuard server secret" 
    firebase functions:config:set tybalt.radiator.secret="tybalt secret"
    firebase functions:config:set tybalt.openai.key="openai key"
    
    firebase functions:config:set algolia.apikey="algolia key with addObject and deleteObject permission"
    firebase functions:config:set algolia.appid="algolia app id"
    
    firebase functions:config:set mysql.host="mysql hostname"
    firebase functions:config:set mysql.port="mysql port number"
    firebase functions:config:set mysql.user="mysql username"
    firebase functions:config:set mysql.pass="mysql password"
    firebase functions:config:set mysql.db="mysql database"
    
    firebase functions:config:set mysqlSSH.host="mysql ssh tunnel hostname"
    firebase functions:config:set mysqlSSH.port="mysql ssh tunnel port number"
    firebase functions:config:set mysqlSSH.user="mysql ssh tunnel username"
    firebase functions:config:set mysqlSSH.pass="mysql ssh tunnel password"
  3. Setup credential in Azure Automation account with username COMPANYAzureTenant and secret matching the secret in step 2. This is used for dumping AD to Tybalt cloud function.

  4. Setup the "Trigger Email" extension in firebase. The email documents collection is Emails and the users collection is Profiles. Also set an appropriate FROM address and SMTP connection URI.

  5. rename config.ts.template to config.ts and set the required values.

  6. Add the Variables in the Automation account in Azure. Variables are in Execute-UserMutations.ps1 and Dump-ADUsersToTybalt.ps1

  7. firebase deploy

tybalt's People

Contributors

stamler avatar dependabot[bot] avatar

Watchers

 avatar

tybalt's Issues

Refactor List components

Switching to mobile-friendly individual List components creates a lot of duplicate code. Most of this can be implemented in a new MobileList.vue component with a slot template.

Store custom claims in database rather than auth

Currently Profiles exports data from firebase Auth and is not the source of Authority. Examine the possibility of using Profiles as the source of role authority then writing custom claims from profiles as tokens are minted.

TimeEntries Project Typeahead

Create an auto-complete module so that creating / editing a TimeEntry provides typeahead when entering project from the database.

Planned Implementation:

  1. Create an onWrite() firestore trigger on Projects collection
    functions.firestore.document('Projects/{projectId}').onWrite(updateSearchString);
  2. Write the updateSearchString() function which takes string value from specific properties and tokenizes them then adds the tokens to a searchStrings array property.
  3. Create the Typeahead field which tokenizes the input the same way that the backend does then provides each token to a where() query:
    .where('searchStrings', 'array-contains', token1). NB that firestore does not support chained array-contains queries so a separate query needs to be performed for each search term(!) and then ANDed together with the others to find the intersect. This can be done on the client side or in a cloud function. a stackoverflow answer explanation

Alternative Simple implementation (search project number only)

Update README

README is very outdated. Update it to document installation and deployment procedures as well as technical information about the frontend, backend, and code layout.

Fix Edit Components for Mobile

Editing for Projects, Divisions, and TimeTypes doesn't work properly on mobile. Model them after the Editor for TimeEntries.

Sort UserMutations docs by date in descending order

With many mutations it can become difficult to identify the important ones. Sort the mutations by statusUpdated timestamp in descending order so that the most recently changed mutations appear at the top of the list.

Further, UserMutations with a status of complete should appear at the bottom while all others statuses should appear above. Thus it's a double sorting, grouping first by status of either complete or not complete then sorting by statusUpdated within each group.

Implement Timesheets Bundle button

User should be able to click the bundle button and all TimeEntries from a given week will be validated and bundled into a TimeSheet document which contains TimeEntries and extra metadata. This will be ready for submission.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.