2.0.2-SNAPSHOT • Published 2 years ago
marketfeed v2.0.2-SNAPSHOT
MarketFeed Backend
Features:
- TypeScript
- ESLint
- GitLab CI/CD -
build
->lint
->test
->deploy-staging
(develop) |deploy-production
(master) - Firestore - Storage Abstraction, Repository Pattern, Factory Pattern
- Dependency Injection:
Storage
->Repositories
->Service
->Controller
- Testing with Mocha
Development Setup:
- Install dependencies:
npm i
- Build project:
npm run build
- Run express server:
npm run serve
Contributing
Development Workflow
Gitflow branching model is used to build and release the project, Hubflow can be used to implement this model.
Integration
GitLab CI runners have been configured to set up integration, a 3 stage pipeline with build
, lint
and test
have been set. The pipeline is set up to ensure proper linting and automated tests are passing before committing to the develop/master branch.
Deployment
- Every time a commit is made to
develop
,staging
environment on Cloud Functions automatically deploysdevelop
branch. Every time a commit is made to
master
,production
environment on Cloud Functions automatically deploysmaster
branch.
Appendix
controllers
: This layer contains the basic handler to process a given function. This represents theC
aspect ofMVC
design pattern.repositories
: This layer helps us interacts with the storage layer, implements repository pattern and factory pattern.services
: This layer contains business logic, wrappers around third party services, DTO and HTTP clients.storage
: This layer contains all abstractions to read/write with to database.- getOne
- getMany
- save
- update
- delete
model
: This folder contains all the domain models (DAO and DTO).typings
: This folder contains all type definitions used through out the project.
2.0.2-SNAPSHOT
2 years ago