SlideShare a Scribd company logo
1 of 16
Download to read offline
API Economy
A NestJS adventure
17 December 2020
Michele Mastrogiovanni
Michele Mastrogiovanni
Who am I
Ph.D. in computer science @ La Sapienza (Roma):
a wonderful period of my life!
Former Engineering ingegneria informatica
Former Expedia Group (Hotels.com)
Former Konica Minolta
And since “I'm hungry, I'm foolish… (thanks Steve
Jobs) I started in October to work as CTO @
Stonize
Michele Mastrogiovanni
Agenda
1. What is an API and what does API Market mean
2. The “Facts” Project need to go in PRODUCTION
3. NestJS introduction and coding
Michele Mastrogiovanni
What is an API?
Application Programming Interface: A way to interact with your software
Examples: Microservices, IoT services…
The following expose API for their services:
● Google
● Facebook
● Twitter
● Telegram
● ...
Michele Mastrogiovanni
Why create an API for your Business?
Easy customer integration/adoption
Enforce standardisation
Enable your business on pay per use
Can be included in existing marketplace
Mobile friendly
...
Open your wonderful AI stock prediction engine to the world!
Michele Mastrogiovanni
Just few data
Source: https://media2.govtech.com/images/api_infographic_smartfile.jpg
Michele Mastrogiovanni
API Architecture (not today, baby!)
Reverse Proxy
CDN (Content Delivery Network)
API Gateway
Firewall
Load Balancers
...
Michele Mastrogiovanni
API Landscape
And many others
AWS Cognito
Michele Mastrogiovanni
API Design: why NestJS?
● Well designed
● Well documented
● Spring-Like
● Dependency Injection
● Annotated
Michele Mastrogiovanni
We work for the Stonize company
We need to create an API for our most
valuable service “Chuck Norris Facts”.
We need to go… in production!!!
Stonize Pillars
● Quality
● Security
● Performances
The “Facts” Project
High performant,
Reliable, Efficient,
Privacy Aware,
Secure, Testable,
Fault tolerant
...
Michele Mastrogiovanni
● Unit tests
● End-to-End tests
● Quality metrics: coverage, static code analysis...
● ...Did I mention to test the code?
● Code review
● Standard responses
● Validation everywhere: DTO, responses,
extreme conditions...
● Documentation: e.g. OpenAPI (Swagger API)
● Monitoring in production
Stonize’s pillars: Quality (1/3)
Michele Mastrogiovanni
Stonize’s pillars: Security (2/3)
External threats
● Authorization and authentication (e.g. JWT token)
● Headers protection
● Upload limits
● DoS protection (whitelist/blacklist)
● Throttling: Rate Limiting
● Penetration tests
● Software vulnerabilities
● ...
Internal risks
● Log’s anonymity
● ...
Michele Mastrogiovanni
Stonize’s pillars: Performance (3/3)
● Use of Cache
● Compression
● CDN for static contents
● Scalable architecture (someone mentioned containers?)
● Distribute load / Automatic provisioning
● Leverage also on client computational power
● Performance test
● ...
Michele Mastrogiovanni
Demo Time: let’s rock some code!
15
Thank you!
Michele Mastrogiovanni
michele.mastrogiovanni@stonize.com
https://www.linkedin.com/in/michele-mastrogiovanni/
Michele Mastrogiovanni
Resources
NestJS: https://www.postman.com/
Postman: https://www.postman.com/
Portainer:
https://documentation.portainer.io/v2.0/deploy/linux/#deploy-portainer-in-docker
HTTPie: https://httpie.io/
Chuck Norris Facts: https://chucknorrisfacts.net/top-100
Code: https://github.com/mastrogiovanni/codegarden-API-nest-17-12-2020

More Related Content

Similar to Codegarden - API economy (NestJs)

Technology scouting and how to exploit the periphery dbm workshop
Technology scouting and how to exploit the periphery dbm workshopTechnology scouting and how to exploit the periphery dbm workshop
Technology scouting and how to exploit the periphery dbm workshopStefano Mizio
 
Empirical evaluation in 2020: how big, how beautiful?
Empirical evaluation in 2020: how big, how beautiful?Empirical evaluation in 2020: how big, how beautiful?
Empirical evaluation in 2020: how big, how beautiful?Massimiliano Di Penta
 
UX Workshop: How to design a product with great user experience
UX Workshop: How to design a product with great user experienceUX Workshop: How to design a product with great user experience
UX Workshop: How to design a product with great user experienceRaj Lal
 
INSECURE Magazine - 35
INSECURE Magazine - 35INSECURE Magazine - 35
INSECURE Magazine - 35Felipe Prado
 
CSA Raleigh application security and deception in the cloud
CSA Raleigh   application security and deception in the cloudCSA Raleigh   application security and deception in the cloud
CSA Raleigh application security and deception in the cloudPhillip Maddux
 
Log Analytics for Distributed Microservices
Log Analytics for Distributed MicroservicesLog Analytics for Distributed Microservices
Log Analytics for Distributed MicroservicesKai Wähner
 
Microservices: The Future-Proof Framework for IoT
Microservices: The Future-Proof Framework for IoTMicroservices: The Future-Proof Framework for IoT
Microservices: The Future-Proof Framework for IoTCapgemini
 
Stermedia - AI and software solutions for manufacturing/industry 4.0
Stermedia - AI and software solutions for manufacturing/industry 4.0Stermedia - AI and software solutions for manufacturing/industry 4.0
Stermedia - AI and software solutions for manufacturing/industry 4.0stermedia
 
Penetration testing as an internal audit activity
Penetration testing as an internal audit activityPenetration testing as an internal audit activity
Penetration testing as an internal audit activityTranscendent Group
 
System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...
System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...
System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...NECST Lab @ Politecnico di Milano
 
Spellpoint - Securing Access for Microservices
Spellpoint - Securing Access for MicroservicesSpellpoint - Securing Access for Microservices
Spellpoint - Securing Access for MicroservicesUbisecure
 
Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...
Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...
Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...SpagoWorld
 
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?Chris Swan
 
DevOps at ING Analytics: combining data engineering with data operations - Gi...
DevOps at ING Analytics: combining data engineering with data operations - Gi...DevOps at ING Analytics: combining data engineering with data operations - Gi...
DevOps at ING Analytics: combining data engineering with data operations - Gi...Codemotion
 
Trends on Data Graphs & Security for the Internet of Things
Trends on Data Graphs & Security for the Internet of ThingsTrends on Data Graphs & Security for the Internet of Things
Trends on Data Graphs & Security for the Internet of ThingsGhislain Atemezing
 
Software Engineering Research @ Simula
Software Engineering Research @ SimulaSoftware Engineering Research @ Simula
Software Engineering Research @ SimulaPhu H. Nguyen
 
Identity Management with midPoint
Identity Management with midPointIdentity Management with midPoint
Identity Management with midPointRadovan Semancik
 
Current state of industrial IoT / Industrie 4.0 markets - IoT Tech Expo
Current state of industrial IoT / Industrie 4.0 markets - IoT Tech ExpoCurrent state of industrial IoT / Industrie 4.0 markets - IoT Tech Expo
Current state of industrial IoT / Industrie 4.0 markets - IoT Tech ExpoIoTAnalytics
 

Similar to Codegarden - API economy (NestJs) (20)

Technology scouting and how to exploit the periphery dbm workshop
Technology scouting and how to exploit the periphery dbm workshopTechnology scouting and how to exploit the periphery dbm workshop
Technology scouting and how to exploit the periphery dbm workshop
 
Empirical evaluation in 2020: how big, how beautiful?
Empirical evaluation in 2020: how big, how beautiful?Empirical evaluation in 2020: how big, how beautiful?
Empirical evaluation in 2020: how big, how beautiful?
 
UX Workshop: How to design a product with great user experience
UX Workshop: How to design a product with great user experienceUX Workshop: How to design a product with great user experience
UX Workshop: How to design a product with great user experience
 
INSECURE Magazine - 35
INSECURE Magazine - 35INSECURE Magazine - 35
INSECURE Magazine - 35
 
CSA Raleigh application security and deception in the cloud
CSA Raleigh   application security and deception in the cloudCSA Raleigh   application security and deception in the cloud
CSA Raleigh application security and deception in the cloud
 
Log Analytics for Distributed Microservices
Log Analytics for Distributed MicroservicesLog Analytics for Distributed Microservices
Log Analytics for Distributed Microservices
 
Microservices: The Future-Proof Framework for IoT
Microservices: The Future-Proof Framework for IoTMicroservices: The Future-Proof Framework for IoT
Microservices: The Future-Proof Framework for IoT
 
IOT Consulting Service in Bangalore
IOT Consulting Service in BangaloreIOT Consulting Service in Bangalore
IOT Consulting Service in Bangalore
 
Stermedia - AI and software solutions for manufacturing/industry 4.0
Stermedia - AI and software solutions for manufacturing/industry 4.0Stermedia - AI and software solutions for manufacturing/industry 4.0
Stermedia - AI and software solutions for manufacturing/industry 4.0
 
Penetration testing as an internal audit activity
Penetration testing as an internal audit activityPenetration testing as an internal audit activity
Penetration testing as an internal audit activity
 
System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...
System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...
System Security @ NECSTLab and Breaking the Laws of Robotics: Attacking Indus...
 
Spellpoint - Securing Access for Microservices
Spellpoint - Securing Access for MicroservicesSpellpoint - Securing Access for Microservices
Spellpoint - Securing Access for Microservices
 
Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...
Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...
Towards an Effective Process Improvement Platform: Spago4Q and the QEST nD Mo...
 
Kba talk track 2018
Kba talk track 2018Kba talk track 2018
Kba talk track 2018
 
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
EMFcamp2022 - What if apps logged into you, instead of you logging into apps?
 
DevOps at ING Analytics: combining data engineering with data operations - Gi...
DevOps at ING Analytics: combining data engineering with data operations - Gi...DevOps at ING Analytics: combining data engineering with data operations - Gi...
DevOps at ING Analytics: combining data engineering with data operations - Gi...
 
Trends on Data Graphs & Security for the Internet of Things
Trends on Data Graphs & Security for the Internet of ThingsTrends on Data Graphs & Security for the Internet of Things
Trends on Data Graphs & Security for the Internet of Things
 
Software Engineering Research @ Simula
Software Engineering Research @ SimulaSoftware Engineering Research @ Simula
Software Engineering Research @ Simula
 
Identity Management with midPoint
Identity Management with midPointIdentity Management with midPoint
Identity Management with midPoint
 
Current state of industrial IoT / Industrie 4.0 markets - IoT Tech Expo
Current state of industrial IoT / Industrie 4.0 markets - IoT Tech ExpoCurrent state of industrial IoT / Industrie 4.0 markets - IoT Tech Expo
Current state of industrial IoT / Industrie 4.0 markets - IoT Tech Expo
 

Recently uploaded

The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfkalichargn70th171
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdftimtebeek1
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...OnePlan Solutions
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...drm1699
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Andreas Granig
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Lisi Hocke
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Andrea Goulet
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxNeo4j
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfkalichargn70th171
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Chirag Panchal
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AIAGATSoftware
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit MilanNeo4j
 

Recently uploaded (20)

Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
Test Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdfTest Automation Design Patterns_ A Comprehensive Guide.pdf
Test Automation Design Patterns_ A Comprehensive Guide.pdf
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024Food Delivery Business App Development Guide 2024
Food Delivery Business App Development Guide 2024
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
Abortion Clinic Pretoria ](+27832195400*)[ Abortion Clinic Near Me ● Abortion...
 
BusinessGPT - Security and Governance for Generative AI
BusinessGPT  - Security and Governance for Generative AIBusinessGPT  - Security and Governance for Generative AI
BusinessGPT - Security and Governance for Generative AI
 
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
Workshop -  Architecting Innovative Graph Applications- GraphSummit MilanWorkshop -  Architecting Innovative Graph Applications- GraphSummit Milan
Workshop - Architecting Innovative Graph Applications- GraphSummit Milan
 

Codegarden - API economy (NestJs)

  • 1. API Economy A NestJS adventure 17 December 2020 Michele Mastrogiovanni
  • 2. Michele Mastrogiovanni Who am I Ph.D. in computer science @ La Sapienza (Roma): a wonderful period of my life! Former Engineering ingegneria informatica Former Expedia Group (Hotels.com) Former Konica Minolta And since “I'm hungry, I'm foolish… (thanks Steve Jobs) I started in October to work as CTO @ Stonize
  • 3. Michele Mastrogiovanni Agenda 1. What is an API and what does API Market mean 2. The “Facts” Project need to go in PRODUCTION 3. NestJS introduction and coding
  • 4. Michele Mastrogiovanni What is an API? Application Programming Interface: A way to interact with your software Examples: Microservices, IoT services… The following expose API for their services: ● Google ● Facebook ● Twitter ● Telegram ● ...
  • 5. Michele Mastrogiovanni Why create an API for your Business? Easy customer integration/adoption Enforce standardisation Enable your business on pay per use Can be included in existing marketplace Mobile friendly ... Open your wonderful AI stock prediction engine to the world!
  • 6. Michele Mastrogiovanni Just few data Source: https://media2.govtech.com/images/api_infographic_smartfile.jpg
  • 7. Michele Mastrogiovanni API Architecture (not today, baby!) Reverse Proxy CDN (Content Delivery Network) API Gateway Firewall Load Balancers ...
  • 9. Michele Mastrogiovanni API Design: why NestJS? ● Well designed ● Well documented ● Spring-Like ● Dependency Injection ● Annotated
  • 10. Michele Mastrogiovanni We work for the Stonize company We need to create an API for our most valuable service “Chuck Norris Facts”. We need to go… in production!!! Stonize Pillars ● Quality ● Security ● Performances The “Facts” Project High performant, Reliable, Efficient, Privacy Aware, Secure, Testable, Fault tolerant ...
  • 11. Michele Mastrogiovanni ● Unit tests ● End-to-End tests ● Quality metrics: coverage, static code analysis... ● ...Did I mention to test the code? ● Code review ● Standard responses ● Validation everywhere: DTO, responses, extreme conditions... ● Documentation: e.g. OpenAPI (Swagger API) ● Monitoring in production Stonize’s pillars: Quality (1/3)
  • 12. Michele Mastrogiovanni Stonize’s pillars: Security (2/3) External threats ● Authorization and authentication (e.g. JWT token) ● Headers protection ● Upload limits ● DoS protection (whitelist/blacklist) ● Throttling: Rate Limiting ● Penetration tests ● Software vulnerabilities ● ... Internal risks ● Log’s anonymity ● ...
  • 13. Michele Mastrogiovanni Stonize’s pillars: Performance (3/3) ● Use of Cache ● Compression ● CDN for static contents ● Scalable architecture (someone mentioned containers?) ● Distribute load / Automatic provisioning ● Leverage also on client computational power ● Performance test ● ...
  • 14. Michele Mastrogiovanni Demo Time: let’s rock some code!
  • 16. Michele Mastrogiovanni Resources NestJS: https://www.postman.com/ Postman: https://www.postman.com/ Portainer: https://documentation.portainer.io/v2.0/deploy/linux/#deploy-portainer-in-docker HTTPie: https://httpie.io/ Chuck Norris Facts: https://chucknorrisfacts.net/top-100 Code: https://github.com/mastrogiovanni/codegarden-API-nest-17-12-2020