You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+77-29Lines changed: 77 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,56 @@
1
1
# Node.js Backend Architecture Typescript Project
2
-
Learn to build a Blogging platform like Medium, MindOrks, and FreeCodeCamp - Open-Source Project By Janishar Ali
2
+
A complete project to build a blogging platform like Medium, and FreeCodeCamp
3
+
4
+
> Note: This is the **latest (version 2)** of the project. If you are using **version 1** then checkout the branch [**version-1**](https://github.com/janishar/nodejs-backend-architecture-typescript/tree/version-1)
This open-source project is for you(community). I (https://janisharali.com) have taken this initiative to promote Backend Learning in the best possible way. I am determined to provide quality content for everyone. Let's do it together by learning from this project.
11
+
# Project Highlights
12
+
1. Node.js
13
+
2. Express.js
14
+
3. Typescript
15
+
4. Mongoose
16
+
5. Redis
17
+
6. Mongodb
18
+
7. Joi
19
+
8. Unit Tests & Integration Tests
20
+
9. Docker
21
+
10. JWT
22
+
23
+
# About The Project
24
+
This project is designed to be used in a production ready environment. It will handle the scale and complexity of very demanding applications. This project is used by companies like Mindorks, AfterAcademy, and CuriousJr, having 10+ million usebase.
25
+
26
+
It can be used to serve websites, mobile apps, and other API services.
27
+
28
+
# About The Author
29
+
I, [Janishar Ali](https://janisharali.com) have created this project using my 10 years of experience in developing software for top tech companies. I enjoy sharing my learnings with the community. You can connect with me here:
## We will learn and build the backend application for a blogging platform.
13
-
The main focus will be to create a maintainable and highly testable architecture.
34
+
[Learn from My YouTube Channel](https://www.youtube.com/@janisharali)
35
+
36
+
# Project Instructions
37
+
We will learn and build the backend application for a blogging platform. The main focus will be to create a maintainable and highly testable architecture.
14
38
<br>
15
39
Following are the features of this project:
16
40
***This backend is written in Typescript**: The type safety at build time and having intellisense for it in the IDE like vscode is unparalleled to productivity. We have found production bug reduced to a significant amount since most of the code vulnerabilities are identified during the build phase itself.
17
-
***Separation of concern principle is applied**: Each component has been given a particular role. The role of the components is mutually exclusive. This makes the project easy to be unit tested.
18
-
***Feature encapsulation is adopted**: The files or components that are related to a particular feature have been grouped unless those components are required in multiple features. This enhances the ability to share code across projects.
19
-
***Centralised Error handling is done**: We have created a framework where all the errors are handled centrally. This reduces the ambiguity in the development when the project grows larger.
20
-
***Centralised Response handling is done**: Similar to Error handling we have a response handling framework. This makes it very convenient to apply a common API response pattern.
41
+
***Separation of concern principle**: Each component has been given a particular role. The role of the components is mutually exclusive. This makes the project easy to be unit tested.
42
+
***Feature encapsulation**: The files or components that are related to a particular feature have been grouped unless those components are required in multiple features. This enhances the ability to share code across projects.
43
+
***Centralised Error handling**: We have created a framework where all the errors are handled centrally. This reduces the ambiguity in the development when the project grows larger.
44
+
***Centralised Response handling**: Similar to Error handling we have a response handling framework. This makes it very convenient to apply a common API response pattern.
21
45
***Mongodb is used through Mongoose**: Mongodb fits very well to the node.js application. Being NoSQL, fast, and scalable makes it ideal for modern web applications.
22
-
***Async execution is adopted**: We have used async/await for the promises and made sure to use the non-blocking version of all the functions with few exceptions.
46
+
***Redis Memcache**: We have used the redis server for caching the items which does not change frequently. It will boost the performance of our system.
47
+
***Async execution**: We have used async/await for the promises and made sure to use the non-blocking version of all the functions with few exceptions.
23
48
***Docker compose has been configured**: We have created the Dockerfile to provide the easy deployability without any setup and configurations.
24
49
***Unit test is favored**: The tests have been written to test the functions and routes without the need of the database server. Integration tests has also been done but the unit test is favored.
25
50
***A pure backend project**: We have experienced that when a backend is developed clubbed with a frontend then in the future it becomes really difficult to scale. We would want to create a separate backend project that servers many websites and mobile apps.
26
51
27
-
##We have also open source a complete blogging website working on this backend project: [Goto Repository](https://github.com/janishar/react-app-architecture)
28
-
> In the above repository [**React.js Isomorphic Web Application Architecture**]we will learn and build a React web application for a blogging platform using this project as its API server.[Visit demo website](https://demo.react-app-architecture.afteracademy.com)
52
+
>We have also open source a complete blogging website working on this backend project: [Goto Repository](https://github.com/janishar/react-app-architecture)
53
+
The repository [**React.js Isomorphic Web Application Architecture**]has a complete React.js web application implemented for a blogging platform which is using this project as its API server.
@@ -51,7 +76,7 @@ Following are the features of this project:
51
76
*[Implement JSON Web Token (JWT) Authentication using AccessToken and RefreshToken](https://janisharali.com/blog/implement-json-web-token-jwt-authentication-using-access-token-and-refresh-token)
52
77
*[TypeScript Tutorial For Beginners](https://afteracademy.com/blog/typescript-tutorial-for-beginners)
53
78
*[From JavaScript to TypeScript](https://afteracademy.com/blog/from-javascript-to-typescript)
54
-
*[Authentication vs Authorization](https://afteracademy.com/blog/authentication-vs-authorization)
79
+
55
80
56
81
## You can find the complete API documentation [here](https://documenter.getpostman.com/view/1552895/SzYUZg52?version=latest)
0 commit comments