Topic: Development Progress

Hello Traders,

I'm starting to work on a new trading-related application. I'll share more specific details later.

I'm working on a new backend framework for the new app. I aim to make it more secure, end users friendly, and easier for me to develop, debug, and maintain.

My first step is to develop new helper modules. I'll make all non-critical code open-source and publicly available.


Base64 encoding and decoding module for NodeJS

This module converts an arbitrary text to a combination of hexadecimal digits and letters suitable for online communication.

Example:
The text "Hello, World!" becomes: "SGVsbG8sIFdvcmxkIQ"
Later, the base64 text can be decoded to the original message.

This is very handy for the user's names and emails.

Link: https://github.com/PopovMP/base64


SHA-256 encoding module

This module encodes a piece of text with a private key. It encodes secure tokens to validate users.

For example, logging in to the software encodes your password in the browser. The password and your email go to the server, which checks if it corresponds to a currently active user. If so, the server will issue a secure token for the user.

The encoding works in one direction only. The encoded text cannot be recovered.

Link: https://github.com/PopovMP/sha256


JWT module

JWT stands for Jason Web Token. This is the secure token the server issues for a successfully logged-in user.
This module uses the above Base64 and SHA-256 modules.
The JWT token also contains information for the account type: free, trial, or premium...
It has an expiration time, which makes it handy for features such as "Remember me".

Link: https://github.com/PopovMP/jwt


File-writer

I'm especially happy with this piece of code. It reliably saves files to the disk, even if there are many overlapping save requests with different contents.

I will use this module in the Logger and the DataBase I'm developing.

For example, we can send 1000 append file requests, and the file-writer will ensure the correct file content with only two save operations.

for (let i = 1; i <= 1000; i++) {
    appendAndForget("mambo.txt", "Mambo number: " + i);
}

Link: https://github.com/PopovMP/file-writer


Logger

This module helps the server save log messages to a file or show them on the terminal. It prints the messages in different colours depending on their kind.

https://image-holder.forexsb.com/store/logger-output.png

Link: https://github.com/PopovMP/file-writer

Happy holidays!

Re: Development Progress

The next necessary library is a HTML Template engine

A template engine gathers text files and composes HTML content for display in the browser.

This library is not the fastest nor the most efficient.

My purpose with it is:
  - the source files to be syntactically correct HTML files
  - all template commands to be in  HTML comments
  - no third-party dependencies
  - no need for JavaScript parsing and evaluation.

Link: https://github.com/PopovMP/html-template-engine

Re: Development Progress

Hello Trader,

I just uploaded the next component, Json-DB. This is a "modernized" version of the DataBase engine I developed for EA Studio.

This database is straightforward for me because I understand it completely. This is not the case when I'm using third-party software components. No matter how thoroughly you study something you did not create, there are always questions about how exactly it works or the reasoning behind some solutions.

Link: https://github.com/PopovMP/json-db

I need to update and prepare several more components before assembling the backend server. I'm using parts of my previous projects to assemble the necessary libraries.

Extracting the code into separate modules makes it easy to optimize it or to find problems.

Another essential concept is Unit Testing. A unit test is a small program that tests the main program.

The JSON-DB has 87 unit tests.
Each test has a short description and checks whether a function gets the expected result when given particular parameters. All tests must pass before publishing software.

Example:

✔ dbProjection gets complete doc given {} (0.7249ms)
✔ dbProjection gets complete doc (0.1449ms)
✔ dbProjection gets partial doc (0.1486ms)
✔ dbProjection does not get _id by default (0.0871ms)
✔ dbProjection accepts excluding values (0.1057ms)
✔ dbProjection does not accept mixed values (0.9165ms)
✔ dbQuery gets all _id if the query is empty (1.1526ms)

Have a great holiday season!

Re: Development Progress

Another module is ready:  Request Parser

This module comprises several helper functions for parsing incoming requests:

- Parse URL path parameters
- Parse request body
- Parse Form Data
- Parse Query String
- Parse JSON values
- Split Authorization Header

Link: https://github.com/PopovMP/request-parser

Re: Development Progress

Added parseJwtPayload to the JWT module.

It helps to parse the token information from an Authorization header.

Re: Development Progress

Another handy library: client-request

It sends GET, POST, or PUT requests and parses the response body depending on the Content-Type response header.

Link: https://github.com/PopovMP/client-request

Re: Development Progress

I'll start assembling the server backend tomorrow.

It needs at least these essential components:
- configuration—it contains and provides the application's generic settings. It also reads private local settings.
- server - this is the main part of the backend. It will construct the request and the response objects
- server-request - it will parse the incoming request and will hold the properties in a handy way.
- server-response - it will compose and send the request's response.
- router - it will map the incoming requests by URL and will redirect them to the corresponding controller actions.
- public-server - it will deal with all public resources like: javascript files, images, styles, fonts, data files...

I have these components working in my previous apps, but I'll "modernize" them and make them suitable for future products without third-party dependencies.

My next steps are:

1) Make a stand-alone backend app using the previously listed components. It must be able to show a static webpage with the corresponding pages, scripts and stiles.

2) Add DataBase and API. Introduce a "User" model. Implement CRUD: Create, Read, Update, and Remove users remotely.

3) Make the basic frame of the application's client-side user interface. Make a Light and Dark theme

4) Make user forms for sign-up, login, change password, and reset password.

I hope all of these will be read to some extent next week. Then, I'll have the foundation of the new application and can start the work on the main functionality.

Happy Holidays!

Re: Development Progress

I have the server running smile)))

https://image-holder.forexsb.com/store/test-server-developemnt-a1-thumb.png

Today, I've been doing a lot of code cleaning and refactoring. I have a good feeling that I'll have the user management working until the evening.

Re: Development Progress

I added an API functionality to Json-DB and cleaned up a lot of code.

I can now control the databases with remote requests.

Re: Development Progress

Hello sir in. Full dawn at 5 am catching up on the forums and I see your post session 

I think I get it, are you writing all the software from scratch? Is the specific purpose safety or performance? Or literally new software for another exporter

Re: Development Progress

> I think I get it, are you writing all the software from scratch?

I usually write a program once. Then, I rewrite it again for optimization, validation, or code cleanup purposes ten times.
This is not how professional software companies work. However, I consider myself an Independent developer and see programming more as an art than a job.

As for now, FSB Pro, EA Studio, and Express Generator are mature products.
Top 10 Robots App and Prop Firms Robot App are also more or less ready (though there are some issues, and I'm still working on improving the validation workflow).

I started working on a new product, which I'll introduce later.

I'm currently working on the server part of the new application. I'm trying to build a frame around which I'll later add the program's actual functionality.

Programming languages, software tools, technology and knowledge change with time. Therefore, I'm rewriting the components I used in the previous products.

(More particularly, I'm converting the code from CommonJS to ES Modules and applying the strictest possible validation with TypeScript, ESLint, and Unit Testing.)

> Is the specific purpose safety or performance?

I achieve better safety and performance, but this is a side effect of my work.
It happens because my programs use only the necessary code for the purpose.

> Or literally new software for another exporter
When the backend is ready, I'll start the work on the actual exporter smile

Re: Development Progress

I added TypeScript definitions for all of the above modules today.
The complete code is also TypeScritp validated.


Many Thanks to all of you!

I wish you a pleasant New Year's celebration filled with health, happiness, and love for you and your families!
May the new year bring you lots of joy and success!

Re: Development Progress

Happy New Year!

I started working on the new application's user interface and ported some of my previous code.
The new server is online in its domain name. We can sign up, log in, change, or reset passwords.
It is an empty frame so far, but I'm satisfied with the progress.
I need several days more to clean up the backend and the client-side framework and improve some messages.

I wish you a prosperous new year full of excitement!