Giter Site home page Giter Site logo

tellma's Introduction

Tellma

For the time being, this document will contain instructions for developers on Windows.

First Time Setup

Follow the steps below to set up the solution for the first time.

Environment

  • Install Visual Studio 2019 (or later) Community Edition with the "ASP.NET and web development" workload
  • Install Visual Studio Code from the official website with the Angular Language Service extension
  • Install SQL Server 2017 (or later) Developer Edition and make sure it is accessible on "." with Windows authentication
  • Install NodeJS (LTS edition) from the official website
  • Install Angular CLI globally by running the following in cmd: npm install -g @angular/cli
  • Install typescript globally by running the following in cmd: npm install -g typescript

IDEs

  • Use Visual Studio to open Tellma.sln
  • Use Visual Studio Code to open the Angular project in (SolutionDir)/Tellma.Api.Web/ClientApp/

Database Tier

  • Right-Click -> Publish the project Tellma.Database.Admin to a database [Tellma] on SQL server "."

  • Right-Click -> Publish the project Tellma.Database.Application to a separate database [Tellma.101] on the same server "." setting the SQLCMD variables as follows:

    SQLCMD Variable Value
    DeployEmail [email protected]
    OverwriteDb 1
    FunctionalCurrency USD
    PrimaryLanguageId en
    SecondaryLanguageId NULL
    TernaryLanguageId NULL
    ShortCompanyName Contoso Ltd.
    ShortCompanyName2 NULL
    ShortCompanyName3 NULL
  • In the Admin database, run the following script:

BEGIN TRANSACTION;

DECLARE @Email NVARCHAR(255) = N'[email protected]'

EXEC [dal].[AdminUsers__CreateAdmin] @Email = @Email, @FullName = N'Administrator'

-- Add [Tellma.101] DB to the sharding catalogue
DECLARE @ServerId INT = (SELECT [Id] FROM [dbo].[SqlServers] WHERE [ServerName] = N'<AdminServer>')
DECLARE @AdminId INT = (SELECT [Id] FROM [dbo].[AdminUsers] WHERE [Email] = @Email)
INSERT INTO [dbo].[SqlDatabases] ([Id], [DatabaseName], [ServerId], [CreatedById], [ModifiedById])
VALUES (101, N'Tellma.101', @ServerId, @AdminId, @AdminId)

-- Add membership for the admin user in [Tellma.101]
DECLARE @DirectoryAdminId INT = (SELECT [Id] FROM [dbo].[DirectoryUsers] WHERE [Email] = @Email)
INSERT INTO [dbo].[DirectoryUserMemberships] ([UserId], [DatabaseId])
VALUES (@DirectoryAdminId, 101)

COMMIT;

Application Tier

  • Make sure the project Tellma.Api.Web is your startup project (Right-Click -> Set as Startup Project)

Client Tier

  • Install all ClientApp npm dependencies as follows: Go inside "(SolutionDir)/Tellma.Api.Web/ClientApp/" in cmd and run: npm install

Running The App

Follow these steps to run the solution on your development machine:

  • Make sure you pull the latest version of the solution from GitHub
  • Make sure the latest version of the admin and app databases are published to [Tellma] and [Tellma.101]
  • Make sure the latest ClientApp npm dependencies are installed: Go inside "(SolutionDir)/Tellma.Api.Web/ClientApp/" and run: npm install
  • Start the backend server on https://localhost:5001/ as follows: Visual Studio -> Debug -> Start Without Debugging. This should launch a debug console similar to this:

image

  • Start the client app server on http://localhost:4200/ as follows:
    • Open cmd
    • Navigate to "(SolutionDir)/Tellma.Api.Web/ClientApp/"
    • Run ng serve -o

image

Optional Configuration

In your development environment you can use the user secrets of project Tellma.Api.Web to add additional functionality or override any of the default settings in appsettings.json and appsettings.Development.json.

To Enable Email

  • Right-Click the project Tellma.Api.Web -> Manage User Secrets, this opens a file secrets.json containing a JSON object
  • Add the following properties inside the JSON object:
  "EmailEnabled": true,
  "Email": {
    "SendGrid": {
      "ApiKey": "(YourSendGridApiKey)",
      "CallbacksEnabled": false
    }
  }
  • Replace (YourSendGridApiKey) with a real SendGrid API key, you can grab one for free from SendGrid.

To Enable SMS

  • Right-Click the project Tellma.Api.Web -> Manage User Secrets, this opens a file secrets.json containing a JSON object
  • Add the following properties inside the JSON object:
  "SmsEnabled": true,
  "Twilio": {
    "AccountSid": "(YourTwilioAccountSid)",
    "AuthToken": "(YourTwilioAuthToken)",
    "Sms": {
      "ServiceSid": "(YourTwilioServiceSid)",
      "CallbacksEnabled": false
    }
  }
  • Replace all placeholders (Your...) with real values, you can grab those values from Twilio

To Use Custom Port Numbers

If you want to run the client app server on a port number other than 4200, follow these steps:

  • Right-Click the project Tellma.Api.Web -> Manage User Secrets, this opens a file secrets.json containing a JSON object
  • Add the following property inside the JSON object:
  "ClientApplications": {
    "WebClientUri": "http://localhost:(YourClientPortNumber)"
  }
  • Replace (YourClientPortNumber) with your custom port number

If you want to run the backend server on a port number other than 5001, follow these steps:

  • Launch the client app in the browser
  • Using the browser's developer tools open the console and run localStorage.appsettings = "{\"apiAddress\":\"https://localhost:(YourBackendPortNumber)\"}" replacing (YourBackendPortNumber) with your custom port number
  • Refresh the client app in the browser
  • The preconfigured credentials for Google and Microsoft redirect only to http://localhost:5001, so either remove them or add your own credentials for your custom port number:
    • Right-Click the project Tellma.Api.Web -> Manage User Secrets, this opens a file secrets.json containing a JSON object
    • To remove the preconfigured credentials, add the following property inside the JSON object:
       "EmbeddedIdentityServer": {
         "Google": {
           "ClientId": "",
           "ClientSecret": ""
         },
         "Microsoft": {
           "ClientId": "",
           "ClientSecret": ""
         }
       }
    • Or you can grab your custom credentials from Google Developer Console and Microsoft Azure

tellma's People

Contributors

ahmadakra avatar mohamadakra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tellma's Issues

Export for import may not maintain fidelity of definition Ids

These are some of the entities that refer to the definition Id without a foreign key constraint.

  1. Permissions -> View
  2. LineDefinitionGenerateParameters -> ControlOptions
  3. ReportDefinitions -> DefinitionId
  4. ReportDefinitionParameters -> ControlOptions
  5. ReportDefinitionRows -> ControlOptions
  6. ReportDefinitionColumns -> ControlOptions
  7. ReportDefinitionMeasures -> ControlOptions

When exporting those entities and importing them in a different tenant it can cause a successful yet erroneous import, where the data in the destination is semantically different from the data in the source.

Add AVCO recalculation button in the UI

Make AVCO recalculation stored procedure available as a button in the financial settings screen. Handle the case when the processing takes longer than the timeout.

Support unary operators in Template expressions

1 - Template expressions (unlike query expressions) currently do not support unary operators like -2.
2 - Also bad input like Func(1, 2, +) returns a meaningless error message. Store the function arguments outside the operator stack to fix this.

Optimize entity queries with temporary tables

Use temporary tables to store principal queries that need to be subsequently joined with related queries. This should improve the performance of some screens, especially the document details screen.

Add user management screen to admin portal

The screen allows a central admin to create identity users and set their passwords when the Tellma installation has Email disabled (e.g. in an offline deployment). The screen should be disabled when Email is enabled.

Implement Markup Template based reports

Markup Template reports:
Pros

  1. Are very flexible in their style and layout (HTML and CSS)
  2. Can be exported to PDF
  3. Can be sent as email attachments

Cons

  1. Expensive to develop
  2. No native support for drilldown
  3. No export to CSV

Support null entries

Some line definitions have too many entries that are sparsely used. Right now every time a line belonging to such definition must have all entries saved with 0 values. Which is a waste of database space.
We would like the ability to specify in the save logic which entries we wish to save and the code in the entire pipeline should be able to handle a missing entry slot.

Ability to edit your own comments on documents

Right now any document comment a user adds is fixed in stone forever, they don't have a chance to fix typos for example. We need a way to edit a comment that was already added, but make it clear in the UI that the comment was edited after it was created.

Need a way to download attachments.

Right now you can view an attachment in the browser, but there is no straightforward way to download it on your computer, this is especially true for image attachments.

Utilize Signal-R to update the client side cache in real-time

The client app caches definitions, permissions and company/user settings, all information that affect the UI. The client only detects that there is a new version of these when it makes an API call to the server and the server returns cache-bust signal in the response headers.
It would be better if we can make use of the Signal-R infrastructure to send a cache-bust signal to all the clients instantly resulting in a real time update of the UI when definitions and permissions are modified.

Keyboard shortcuts for common tasks

Implement keyboard shortcuts for common tasks, such as edit, save and post. As well as navigating through search results, opening a search result and clearing search.

Remove invisible character from all UI screens

The invisible zwnj (zero-width non-joiner) character used to maintain height of empty fields is causing issues when users copy values from the UI and paste them somewhere that doesn't know how to handle that character.
Need to find an alternative way of maintaining empty field height without the zwnj character.

Lookups are better sorted by code

By default lookups should be sorted by their codes. They are currently sorted by Id which cannot be influenced by the user. Sorting by code will not cause performance degradation since lookups tend to be few per lookup definition

Improve the UX of Show In Main Menu of Reports and Dashboards

Users consistently enable "show in Main Menu" without adding any roles, and feel confused when they don't find it in the main menu. Options are:

  1. Either prevent ShowInMainMenu = true when there are no roles.
  2. Or remove ShowInMainMenu all together and rely only on the list of roles.

Freeze definitions mode

Add a boolean flag FreezeDefinitions per company settings that can only be set from the admin console.
When set to true, all definition screens become inaccessible.

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.