---
# System prepended metadata

title: 'Tempo - Recommended Tech Stack : -'

---

# Tempo - Recommended Tech Stack : -
## Back end:

### Node.js & Express**

Node.js is a free open source server environment enabling you to use JavaScript on the server. 
Express is a fast, unopinionated, minimalist web framework for Node.js.

*Why*
Node and ExpressJS enable us to create server-side web applications faster and smarter

- Node.js is pretty much the standard, with more than a billion downloads. 
- It enables you to build products with JavaScript across the front and back, one of the most popular programming languages used globally.
- The Node Package Manager you get access to via Node.js provides developers multiple tools and modules to use for free, further boosting productivity

**Alternative: Node.js & GraphQL**
GraphQL is an alternative way to interact with the server developed by Facebook and becoming increasingly popular. 

It's core benefit is you do no work with server-defined endpoints. However, the benefits are not hugely significant and there is much more experience amongst the team in Node.js and Express which means more functionality can be built in vs learning curve requred for GraphQL.


## Front End:

### React

A JavaScript library for building user interfaces developed by Facebook. 

*Why?*

- It hides its complex rendering engine implementation and exposes a simple component API.
- Every UI is composed of components, so there is no mismatch of multiple types to worry about. Since there is only one common object, it makes it easy to nest components inside components and encourages the principle of single responsibility for each component.
- There are many frameworks that can become popular and go out of fashion. However, with React being strongly developed and supported by Facebook we believe it will provide long-term viability
    

### Redux
A Predictable State Container for JS Apps to be used alongside React

*Why?*
- It’s clear that state management gets messy as the app gets complex. This is why you need a state management tool like Redux that makes it easier to maintain these states.
- Redux is the standard State Management Tool to be used alongside React, meaning you have a popular stack for which you will not struggle to find future development resources in the future.

**Alternative: React Hooks and Context**
This would be more lightweight solution to Redux
ADD MORE...

    
### Material UI
Material UI is a library of React components pre-made that you can use (e.g. input fields, dropdown menus, tables)

*Why?*
- React components for faster and easier web development.
- Build your own design system, or start with Material Design.
- Material UI is a very solid and stable set of react components that not only look good, but also are easy to customize.
- Very well documentations are organized and easily to navigable.

**Alternative: Antd**
Antd is a library just like Material UI that we have used. We think both are strong. 



## Testing:

    
### mocha 
Mocha is a feature-rich JavaScript test framework running on Node.js, making asynchronous testing very well. 

**why** : 
- Mocha tests run serially, allowing for flexible and accurate reporting, while mapping uncaught exceptions to the correct test cases. 
- It works across all browsers
- It is the most depended on module on NPM which is a testament to its reliability and also its popularity ensures its long term viability
- Downlaoded over 4million times weekly

WHAT ABOUT JEST? ARE WE SUGGESTING MOCHA INSTEAD?


### cypress
Javascript End to end testing framework 
 
*why?*
- Fast, easy and reliable testing for the functinal , components and logic that runs in a browser.
- Optimizing the front-end performance .


## Authorization Management & Validation:
    
### JSON Web Token 
A compact URL-safe means of transferring data between front end and our server. We would use it throughout Authorization and Verification processes.

*Why?*
- It's an internet standard for creating JSON-based access tokens that assert some number of claims.
- It's a leader in securely transmitting information between parties.
    
### Yup 
Validation library to test any user inputs & requests meet our specific schema.

*Why?*
- Very simply to implement and use ensuring fast development time
- Adds extra security to any inputs and requests
- We can use it in the ***Front-end*** and in the ***back-end*** providing consistency throughout the stack

### bcryptjs 
Enables encryption of passwords. More details here: https://en.wikipedia.org/wiki/Bcrypt 

*Why?*
- Leading tool for industry standard encryption 
- Optimized for javascript


## Developer Tools
  
### ESLint 
- ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.
- we can use it in the ***Front-end*** and in the ***back-end***

### Dotenv 
- to storing configuration in the environment separate from code
- Prevents sensitive data (e.g. api keys) being made available in the codebase online
    

## Database
As outlined in our Data Workshop, we are recommending a Relational Database Management System. A relational database refers to a database that stores data in a structured format, using rows and columns.

For more details, please refer to our documentation here: https://www.notion.so/Database-Approach-Recommendation-cbc70c1dc84b468b936c15296bec6a0a

### Our main recommendation: PostgrSQl

Postgres bills itself as “the most advanced open-source relational database in the world.” It was created with the goal of being highly extensible and standards compliant. PostgreSQL is an object-relational database, meaning that although it’s primarily a relational database it also includes features, and there is many resons to choose it:
    
**Advantages**:
1. ***Supported Data Types***:
    Supports numeric, string, date and time data types, data types for     geometric shapes, network addresses, bit strings, text searches, and JSON, so it provides maximum flexibility.
    * Numeric types:
         - (bigint, bigserial, double precision	, integer, numeric or decimal, etc...)
    * Character types: 
        - (character, character varying or varchar, text) 
    * Date and time types:
        - (date, interval, time or time without time zone, time with time zone, etc...)
    * Other data types:
        - (json, boolean, uuid, etc...)
            
2. SQL compliance: 
    More so than others, PostgreSQL aims to closely adhere to SQL standards.

3. Open-source and community-driven:  
    A fully open-source project, PostgreSQL’s source code is developed by a large and devoted community. This means it is strongly supported providing long term viability.

4. Popularity:
    As one of the world’s most popular database systems, again helping ensure long term viability.
    
**Disadvantages**:
1. Memory performance: For every new client connection, PostgreSQL forks a new process. Each new process is allocated about 10MB of memory, which can add up quickly for databases with lots of connections. Accordingly, for simple read-heavy operations, PostgreSQL is typically less performant than other RDBMSs.


### Alternatives: 
There are many alternatives, and the first of the two open-source relational databases after the PostgrSQL is  

#### **SQLite**
SQLite is a software library that provides a relational database management system. The lite in SQLite means light weight in terms of setup, database administration, and required resource.

SQLite has the following noticeable features: self-contained, serverless, zero-configuration, transactional. 
 
**Advantages of SQLite:**
1. **User-friendly:** SQLite is sometimes described as a “zero-configuration” database that’s ready for use out of the box.
            
2. **Portable:** Unlike other database management systems, which typically store data as a large batch of separate files,Portable: Unlike other database management systems, which typically store data as a large batch of separate files.
            
3. **Small footprint:** As its name implies, the SQLite library is very lightweight. Although the space it uses varies depending on the system where it’s installed, it can take up less than 600KiB of space. Additionally, it’s fully self-contained, meaning there aren’t any external dependencies you have to install on your system for SQLite to work.

**Disadvantages of SQLite:**
1. **Limited concurrency:** Although multiple processes can access and query an SQLite database at the same time, only one process can make changes to the database at any given time. 
2. **No user management:** Database systems often come with support for users, or managed connections with predefined access privileges to the database and tables. 
3. **Security:** A database engine that uses a server can, in some instances, provide better protection from bugs in the client application than a serverless database like SQLite. 

#### **MySql**
MySQL is a relational database management system, used for a wide range of purposes, including data warehousing, e-commerce, and logging applications. was designed for speed and reliability, at the expense of full adherence to standard SQL.

**Advantages of MySql:**
1. **Security:** MySQL comes installed with a script that helps you to improve the security of your database by setting the installation’s password security level, defining a password for the root user, removing anonymous accounts, and removing test databases that are, by default, accessible to all users.
2. **Replication:** MySQL supports a number of different types of replication, which is the practice of sharing information across two or more hosts to help improve reliability, availability, and fault-tolerance. This is helpful for setting up a database backup solution or horizontally scaling one’s database.
          
**Disadvantages of MySql:**
1. **Known limitations:** Because MySQL was designed for speed and ease of use rather than full SQL compliance, it comes with certain functional limitations.
            
2. **Licensing and proprietary features:** not all the features are free.
            
3. **Slowed development:**: there have been complaints from users that the development process for the DBMS has slowed down significantly, as the community no longer has the agency to quickly react to problems and implement changes.
 

## Deployment & Third Party Applications
To deploy the product for users to be able to access online we need to use third party platforms, such as Heroku and AWS. 

In addition, there are a number of external services we would recommend using.

Full details of our recommendations are here: 
https://www.notion.so/Recommendations-about-deployment-hosting-and-other-services-f50d8197e9784effa78d64727be563c5
