Project to learn some TypeScript/JavaScript backend development.
This project has been created to improve my knowledge on backend development with TypeScript and Express framework. It started as a simple idea for a small app but it evolved into something a bit more complex as it handles authentication with JWT, database interactions, server side pagination with data filtering and utilizes Nx to structure the code with libs and monorepo approach.
While creating the app, my goal was to follow good practices and write code which is easy to understand and maintain.
So to achieve it, I splitted the app with Nx into small and feature oriented libs which are independent and reusable. In that way they're only concerned with a specific functionality what encourages separation of concerns.
Additionally in the Angular app I'm following most of the recommended practices to make the app better, e.g.:
- Lazy Loading
- Feature, shared and core modules
- Async pipes are used whenever possible
- Manual subscriptions are cleared when a component is destroyed
- No nested subscriptions - subs are composed with pipeable operators
- Smart and dumb components
- OnPush change detection and immutability
- State management done with RXJS and one-way dataflow
- No methods or complex logic in the templates
- Interfaces are used to strongly type entities
- Compodoc as documentation tool
- run
npm install
in the root of the project - to run frontend app execute
nx serve or npm start
- to run api project execute
npm run start:api:dev